This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to know user click "cancel" button during uninstall?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
01:58 PM
How to know user click "cancel" button during uninstall?
I had a basic MSI project. When user uninstall from ""Add or Remove Programs", I will use a custom action to reset some settings. Howerver, if user click "cancal" button, I want to use another custom action to set those settings back.
The problem is how can I know user clicked "cancel" button.
Anyone has idea about that? Thanks!
The problem is how can I know user clicked "cancel" button.
Anyone has idea about that? Thanks!
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
02:34 PM
You'll want to investigate rollback custom actions, a type of custom action intended to reverse the effects of deferred actions during a failed or canceled installation or uninstallation.
(Commit actions can clean up temporary data saved for the possible use of a rollback action, but first things first.)
(Commit actions can clean up temporary data saved for the possible use of a rollback action, but first things first.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
06:18 PM
Hi Thanks for reply!
I just tried to use rollbeck custom action. What I did is first , I created custom action named as "StopService" which will stop a service. I set it as immediate execution. Then I created another custom action named as "StartService" which will start the service. I set it as Rollback Exection. In the sequences, StartService is behind StopService.
I hope, when I uninstalled the product, StopService will be called first. Then, if I clicked cancel button, StartServoce will be called. It can just reverse what StopService did.
In fact, when I clicked cancel button during, StartService was not be called.
Can anyone tell me why? Thanks a lot!!!
I just tried to use rollbeck custom action. What I did is first , I created custom action named as "StopService" which will stop a service. I set it as immediate execution. Then I created another custom action named as "StartService" which will start the service. I set it as Rollback Exection. In the sequences, StartService is behind StopService.
I hope, when I uninstalled the product, StopService will be called first. Then, if I clicked cancel button, StartServoce will be called. It can just reverse what StopService did.
In fact, when I clicked cancel button during, StartService was not be called.
Can anyone tell me why? Thanks a lot!!!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
06:33 PM
Some general points:
Only deferred actions can be rolled back (which makes sense, since only deferred actions should make system changes). Immediate actions should set properties and query the system, but not touch the target machine.
A rollback action should be placed in the sequences before the action it rolls back.
Not a technical issue, but there are standard actions called StartServices and StopServices, so you might slightly rename yours to avoid confusion.
If all else fails, creating an MSI log file should help understand whether/why actions are or are not being executed.
Only deferred actions can be rolled back (which makes sense, since only deferred actions should make system changes). Immediate actions should set properties and query the system, but not touch the target machine.
A rollback action should be placed in the sequences before the action it rolls back.
Not a technical issue, but there are standard actions called StartServices and StopServices, so you might slightly rename yours to avoid confusion.
If all else fails, creating an MSI log file should help understand whether/why actions are or are not being executed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
06:37 PM
Thanks a lot!!!
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)