cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
samiracr
Level 3

How to run a custom action after user cancels uninstall (rollback)

InstallShield-2009 Premier: Basic msi project:

What to do when I want a custom action to run when user clicks cancel button during uninstall?

(You can see from the attached zip file) I put a custom action (a C# exe which would just show a message box) with

Action Type:
Type: Launch an executable

Location: Stored in the Binary table


Action Parameters:
Source: exe path

Target: a b c (doesn't matter, I don't need it)


Additional Options:
Return Processing: Synchronous (Check exit code)

Run Only During Path Uninstall: unchecked


Respond Options:
In-Script Execution: Rollback Execution in System Context

Executing Scheduling: disabled


Insert into Sequence:
Install UI-Sequence:

Install Execute Sequence: After InstallServices (what should I set here?)

Install Execute Condition: (do I need to set? I left it blank)


but it didn't fire the message box when I canceled the uninstall.
Labels (1)
0 Kudos
1 Reply
TsungH
Level 12

There will be rollback only after Execute Sequence is already in deferred phase. If a user cancels during Immediate Execute Sequence, there won't be any rollback. Theoretically, no system changes should have been made prior to Deferred Execute Sequence, hence nothing to roll back.

You can generate a verbose log and determine where in Execute Sequence when cancel is triggered. Also, you will want to set a condition so that your custom action will only run during uninstallation.
0 Kudos