View Full Version : Detect Prior Installation
tpriest
07-07-2009, 10:46 AM
I have created muliple installations for our application and now am runninginto a issue. I have a radio button screen that if someone choose a certain buttom I want the applicaiton for check to see if the previous version is installed. If it is, to copy some files from that Directory to a temp Dir and and unistall the application. If it is not istalled to just go head with the normal install. Is this possible. I am guessing it woudl be on the Next button but have no clue where to go from here. Any help woudl be helpful.
Thank
Todd
jassing
07-07-2009, 11:18 AM
Well; only you would know the details of how to detect, but some ways are:
Check the registry, especially for "Uninstall" string -- that could point to the folder the user previously installed to.
Or if you saved the installation folder in teh registry.
You could scan the system for an exe or other filename....
tpriest
07-07-2009, 11:23 AM
So would I do the check on the "next" screen then check for the Registry? What is the code to check registry and run the unistall then?
jassing
07-07-2009, 11:30 AM
Where you place the code is up to you.
OnNext button (don't know about a 'next screen')
Have a look at the Registry object/functions.
Your installer will point you to where you added the registry items for uninstall (Look in the uninstall)
Peek at the registry to see the registry entries/data for your uninstall data -- in there is a command line to uninstall; you could just shell out to that.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.