|
-
Oct 17th, 2002, 09:58 PM
#1
Thread Starter
PowerPoster
Detect previous install?
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...)
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 17th, 2002, 10:00 PM
#2
Maybe Put somthing in the registry that doesn't get deleted by the uninstall program?
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Oct 17th, 2002, 10:07 PM
#3
Thread Starter
PowerPoster
If the program is uninstalled I don't want to leave things behind. How would I enter something in the registry, and where?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 17th, 2002, 10:23 PM
#4
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.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Oct 18th, 2002, 12:28 AM
#5
Thread Starter
PowerPoster
Yeah, that's prolly a go-er. Cheers.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 18th, 2002, 01:59 AM
#6
Well ...
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...)
The installer should ideally create two entries for the application in the registry:
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.
.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|