PDA

View Full Version : Installscript project - writing an uninstaller



Johnny Thunder
11-07-2013, 09:10 PM
I am trying to write an an uninstaller for an installscript project. I originally wrote my project in basic MSI, but needed the functionality of install script. I tried installscript Msi, but that freezes on me when I build it. All I would like to know is how to make a certain method run only when I try to uninstall the project.

ch_eng
11-19-2013, 03:27 PM
Johnny,
For an InstallScript Only project, you would probably want to use OnMaintUIBefore and/or OnMaintUIAfter, and put your code in an "if" statement when nType = REMOVEALL
Note: when you have Setup.rul selected, choose "Before Move Data" in the first dropdown, then "OnMainUIBefore" and it will autogenerate the basics. This is where the user determines whether to Modify/Repair/Remove:


nType = SdWelcomeMaint(szTitle, szMsg, REMOVEALL);

HTH