BitOver
9th December 2003 09:23 UTC
Multiple uninstalls
Hi,
For one of my products I need to have 2 uninstallers intead of one.
The kit is installing an exe and a dll. I need to be able to see in Add/Remove programs 2 unsintallers, one for exe and one for dll.
It is this posiible or not ?
If it is posisble please give me some tips on how I can do this.
Thanks,
BitOver
kichik
9th December 2003 13:50 UTC
There are two options I can think of:
- Create two "uninstallers" on your computer, package them inside your installer and extract both upon installation. These "uninstallers" can be installers that delete, real uninstallers that you have generated using WriteUninstaller or even batch files or any other program if you want.
- Have your uninstaller process the command line for switches like /UNINSTALLEXE and /UNINSTALLDLL which you will include in the UninstallString. For example:
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgDLL" "UninstallString" '"$INSTDIR\uninst.exe" /UNINSTALLDLL'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgEXE" "UninstallString" '"$INSTDIR\uninst.exe" /UNINSTALLEXE'
If you choose this method you'd have to delete the uninstaller only when both components have been uninstalled. The easy way around this would be to use WriteUninstaller twice with two different names:
WriteUninstaller uninstall-exe.exe
WriteUninstaller uninstall-dll.exe
According to the command line switch, each would delete itself and not the other one.