Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

How to add a confirmation when removing a product

Updated: 21 May 2010 | 3 comments
olivier_sophia's picture
0 0 Votes
Login to vote
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

AngelD's picture
27
Nov
2009
0 Votes 0
Login to vote

Remove the "/qb" parameter

Remove the "/qb" parameter meaning; do only executed the command "msiexec /x {ProductCode}"

Munna's picture
27
Nov
2009
0 Votes 0
Login to vote

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

olivier_sophia's picture
27
Nov
2009
0 Votes 0
Login to vote

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.