Hi Will,
Yes, this can be done with another custom action. Here is some sample VBScript code:
Code: Select all
Function Ask
MsiMsgBox("Do you want to completely uninstall the application?")
End Function
Function MsiMsgBox(msg)
Const msiMessageTypeUser = &H03000000
Const msiMessageStatusYes = 6
Set record = Session.Installer.CreateRecord(1)
record.StringData(0) = "[1]"
record.StringData(1) = CStr(msg)
ans=Session.Message(msiMessageTypeUser + vbYesNo, record)
If ans=msiMessageStatusYes Then
Session.Property("UNINSTALL_COMPLETE")="YES"
Else
Session.Property("UNINSTALL_COMPLETE")="NO"
End If
End Function
This custom action will set the "UNINSTALL_COMPLETE" property to "YES" or "NO", depending on the answer of the user. You can use this property to condition the custom action which does the cleanup. Please note that the condition of a custom action can be set in the "Expression" field of the
Custom Action Properties page.
The above custom action can be scheduled under "InstallExecuteSequence" -> "Begin" with the condition:
Code: Select all
(REMOVE = "ALL") AND (UNINSTALL_COMPLETE = "YES")
Regards,
Cosmin