View Full Version : Creating local uninstallations?

08-02-2005, 01:32 PM
Could someone send me a link with information on how to create a localized uninstallation app that can be installed along with the installed product? As it is now I can only find information relating to "Maintenance" installation processes which are seemingly dependent on the user utilizing the original install disk.

Thank you!

08-02-2005, 03:12 PM
During setup I modify the uninstall string to include some text. In my case I append the switch -nomode.

During Maintenance I detect if the switch -nomode is present. If it is present then I just ask the user if they want to completely remove the selected application. If it is not present then I display the Modify/Repair/Remove options.

CMDLINE and UNINSTALL_STRING are the values I use to accomplish this task.

if (CMDLINE == "") then //Not run from Add/Remove Programs
bRemove = 0;



08-02-2005, 03:41 PM
Thanks for the info - what I'm asking (and what I believe is different from what you suggest) is how may I create an executeable "Uninstall" that is placed along with my installed application. This is by spec so that end user does not need to run the "Setup" via install disk (and the maintenance install therefore) to remove our product.

Is this do-able or am I mistaken/confused?


08-03-2005, 05:21 AM
Do you want to create a complete new programme or just an uninstall link in the programme menu?

08-03-2005, 12:49 PM
A whole new program - since the installed product will be a single executable file - the setup program will be on the installation disk.

I suppose it could be a link to the setup file on the installation disk that prompts user to enter the disk.

08-04-2005, 07:55 AM

I guess I am confused with your request. I thought you wanted to provide a shortcut to uninstall a currently installed app.

You should not need any disc to uninstall an app.
However, now it sounds as if you are not interested in uninstalling the current app - but that you want to install something different? :confused:

08-04-2005, 09:28 AM
I thought you wanted to provide a shortcut to uninstall a currently installed app.

that is *exactly* what I want to do : )

Sorry for the confusion!

08-04-2005, 12:28 PM
So, what you want to do is to create a seperate setup and compile it as a self-extracting exe. And then include this self-extracting exe somewhere on the computer. The self-extracting exe does not contain the actual files to be copied, but should prompt the user to insert the CD.

Are the files to be installed uncompressed on the CD? If so then the process should be rather easy. If not then you would have to do something like this.

Setup 1 = Original Install
Setup 2 = Self Extracting exe (contains no data, just logic to move files)

Setup 1 runs and installs Setup 2 to a program directory
Setup 2 runs (by user selection) and looks for the correct CD - prompts user to insert and validates that the *flag* file is there (usually setup.ini (which will contain a unique GUID)).

Once the correct CD is in the drive then setup 2 launches the setup.exe and passes in some type of parameter such as -CustomSetup.
Since Setup 1 is already installed, running setup 1 again (no matter if it is called from Setup 2 or not) will execute in Maintenance Mode. In OnBegin you will read the CMDLINE value and see if it contains -CustomSetup. If it does then you show dialogs based on this installation request, if not, then it will show the default Modify, Repair, Remove options.

This above scenario is far more complex and a lot of planning will have to go into "what-if" scenarios.

However, if the necessary files are uncompressed on the CD - then you could do a simple XCopyFile to move the files to the correct directory.

If I am mistaken and the files are included in the self-extracting exe then ignore everything I said above and just go ahead and include the exe as a feature of the install :)