How to add a confirmation when removing a product
Updated: 21 May 2010 | 3 comments
This issue has been solved. See solution.
Hello
I have recently created a shorcut in our product to remove it easily (without use add/remove programs ...)
My command line was : msiexe /x {[productcode]} /qb
This command don't include a confirmation to remove the product (i assume it).
Is there a way to add a confirmation ? i would to have a screen that display "Are you sure you wan to remove XXX from your computer" with Yes No button.
Maybe there are somes options in msiexec to do it ?
An other solution will be to create a new dialog in wise and call it when uninstall (using shortcut) is requested ? i have tried this solution but i can't add an action "Display dialog" in msi script, do you know why ?
Best Regards
Wise 6.2
Discussion Filed Under:
Comments
Remove the "/qb" parameter
Remove the "/qb" parameter meaning; do only executed the command "msiexec /x {ProductCode}"
VBScript
If you are allowed to use VBscript then try this
Dim oShell, Uninstall, Mymsg, MyApp, resp
Set oShell = CreateObject("WScript.Shell")
Uninstall = "MsiExec.exe /X{[productcode]}" & " /qb" & " /norestart"
Mymsg = "Are you sure you wan to remove XXX application from your computer"
MyApp = "Application Name"
resp = MsgBox(Mymsg, vbYesNo+vbInformation, MyApp)
If resp = 6 Then
oShell.Run Uninstall, 1, True
Else
WScript.Quit
End If
Thanks
Munna
Thanks Munna for you script,
Thanks Munna for you script, but i have to manage multi-langage in my product, and we have chinese characters to manage and it's not possible with VBS (except if we use property from wise).
I keep you example for next time.
Would you like to reply?
Login or Register to post your comment.