How can I tell if someone has previously installed my application on their PC? And also if possible, how can I find where they installed it?
(This is so an autorun CD either installs, or runs the program if it's already installed...)
Printable View
How can I tell if someone has previously installed my application on their PC? And also if possible, how can I find where they installed it?
(This is so an autorun CD either installs, or runs the program if it's already installed...)
Maybe Put somthing in the registry that doesn't get deleted by the uninstall program?
If the program is uninstalled I don't want to leave things behind. How would I enter something in the registry, and where?
I would just do a SaveSetting the first time the program is run. Any key not written directly by the installer should not be deleted on an uninstall.
:)
Yeah, that's prolly a go-er. Cheers. :)
The installer should ideally create two entries for the application in the registry:Quote:
Originally posted by rjlohan
How can I tell if someone has previously installed my application on their PC? And also if possible, how can I find where they installed it?
(This is so an autorun CD either installs, or runs the program if it's already installed...)
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths: The path where the application has been installed, and
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall: The uninstallation information about the application.
If everything goes right, assuming the installer has made an entry at least in the first key (App Paths) and the user has not played around with the registry, you can check if a key exists in your application's name under the App Paths. If it exists, the application has been installed on the machine and exists. In the same key you can also get the folder where the main EXE has been installed.
PDW creates these entries, I have no idea about other installers.
.