If I do something like
Option Explicit
MsgBox "Product cannot be uninstalled when it is running.", vbOKOnly
WScript.Quit(1602)
as a vbs custom action:
1) I see my new message box => great
2) I get a 2nd message box that states "There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor.
3) I get a 3rd message box that is the infamous error message dialog box that I'm trying to get rid of.
Even if I set my Quit value to be 0, I still get the above message boxes on "uninstall".
-----
Also tried
UninstallErrorMesg() : Function UninstallErrorMesg() : On Error Resume Next : MsgBox "Product cannot be uninstalled when it is running.", vbOKOnly : UninstallErrorMesg = 2 : Exit Function : End Function
but that gives me the error dialog box, but doesn't abort the uninstall.
FOLLOW US
Get the latest news in Application Packaging