cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
danwize
Level 4

Custom Uninstall Behavior

I added a checkbox to my ReadyToRemove dialog. If the checkbox is selected (this is the default behavior) I want to remove some user data from a location in programData. If not, I want to leave that data there. I assume I need to edit the Remove Event? My RemoveEvent now looks like this:

{Event:Remove, Argument: ALL, Condition: WILL_REMOVE_ROLLBACK}

I'm not sure what to put in argument and how to go from here to remove that data during my uninstall. WILL_REMOVE_ROLLBACK is the "property" value for my checkbox. Any insights would be much appreciated!

Danwize
Labels (1)
0 Kudos
(6) Replies
danwize
Level 4

BTW, this is a basic MSI project. I guess I need to add custom actions and sequences to delete the directories I need to get rid of? How do I call/execute custom actions based on the remove event from the GUI?
0 Kudos
TsungH
Level 12

You will want to familiarize yourself with Remove ControlEvent.
danwize wrote:
{Event:Remove, Argument: ALL, Condition: WILL_REMOVE_ROLLBACK}

I'm not sure what to put in argument and how to go from here to remove that data during my uninstall.
If you have not, please refer to REMOVE Property.
danwize wrote:
I guess I need to add custom actions and sequences to delete the directories I need to get rid of? How do I call/execute custom actions based on the remove event from the GUI?
0 Kudos
danwize
Level 4

Thanks for the suggestion!
0 Kudos
danwize
Level 4

I've got the custom actions working during a GUI uninstall, but now I can't quite get it to work during a silent install.

I have a public property called WILLREMOVEROLLBACKS in my basic installshield projet. I also have a check box called REMOVEROLLBACKBOX. The checkbox is selected by default and the property of that check box is WILLREMOVEROLLBACKS. If WILLREOMVEROLLBACKS is true, then the rollbacks folder is deleted by VBScript during the uninstall of my product. During a silent install, how do I set WILLREMOVEROLLBACKS to false, in case the user does not want to remove the rollback data? I pass the parameter, but it seems that my command is being ignored. Any ideas?

This is the command line I am using:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=False
I also tried:
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACKS=0
0 Kudos
danwize
Level 4

I've got this to work, kind of. I had to do some weird things to make my checkbox to remove rollback data. I couldn't just set the default to false in the dialog dialog editor, that didn't do what I expected it to (See the first image below). Look here to see how to get around that problem:

http://community.installshield.com/showthread.php?t=195739&highlight=default+checkbox

Now here is another weird thing. Since I made the default to be not to remove rollback data, I can just leave that argument off my parameters. However, even if I set WILLREMOVEROLLBACK to false, or 0, the installer still removes the rollback data. Here are the commands I tried:

msiexec /x JVDI.msi /qn WILLREMOVEROLLBACK=0
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACK=False
msiexec /x JVDI.msi /qn WILLREMOVEROLLBACK=True

All of these commands cause the rollback data to be removed. Do I need to change the conditions on my custom action (See the second image below)? The only way I can get the uninstaller to not remove rollback data is to leave off the WILLREMOVEROLLBACK parameter off.
0 Kudos
TsungH
Level 12

According to CheckBox Control, "unselected state sets the property to null."
0 Kudos