![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: Uninstall application script "Gary" <Gary@xxxxxx> wrote in message news:BA08B7B7-7D59-4310-975B-BC45848AF6D0@xxxxxx Quote: > Hello, > > I am using the below script to uninstall an application: > > Dim shell, systempath > set shell = WScript.CreateObject( "WScript.Shell" ) > systempath = shell.ExpandEnvironmentStrings("%SystemRoot%") > shell.Run Chr(34) & systempath & "\system32\msiexec.exe" & Chr(34) & " /x > {2F1A8F7C-0C38-464B-A61B-32C7F7AEAD9F}" > WScript.Quit > > When I invoke this, i get a prompt "Are you sure you want to uninstall > this > product?" > with the Yes and No buttons. > > Is there a way I can customize this text to put in the application name in > place of "this product" in the above msg. Also, is it possible to place > an > icon in this message? > > mode with no user interaction. You could then display your own message using the MsgBox method, which has options for title, buttons, and icons. For example: ========== Dim objShell, strPath, strCmd, Response Set objShell = CreateObject("Wscript.Shell") strPath = objShell.ExpandEnvironmentStrings("%SystemRoot%") strCmd = "%comspec% /c """ & strPath & "\system32\msiexec.exe"" /quiet /x {2F1A8F7C-0C38-464B-A61B-32C7F7AEAD9F}" Response = MsgBox("Are you sure you want to uninstall my application?", vbYesNo + vbInformation, "My Title") If (Response = vbYes) Then objShell.Run strCmd, 2 End If Check VBScript/WSH documentation on the MsgBox function and the button and icon options available, such as: vbOKOnly, vbYesNoCancel, vbQuestion, vbExclamation, vbCritical, etc: -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Uninstall application script Thanks Richard. The "/qb" option worked for me. "Richard Mueller [MVP]" wrote: Quote: > > "Gary" <Gary@xxxxxx> wrote in message > news:BA08B7B7-7D59-4310-975B-BC45848AF6D0@xxxxxx Quote: > > Hello, > > > > I am using the below script to uninstall an application: > > > > Dim shell, systempath > > set shell = WScript.CreateObject( "WScript.Shell" ) > > systempath = shell.ExpandEnvironmentStrings("%SystemRoot%") > > shell.Run Chr(34) & systempath & "\system32\msiexec.exe" & Chr(34) & " /x > > {2F1A8F7C-0C38-464B-A61B-32C7F7AEAD9F}" > > WScript.Quit > > > > When I invoke this, i get a prompt "Are you sure you want to uninstall > > this > > product?" > > with the Yes and No buttons. > > > > Is there a way I can customize this text to put in the application name in > > place of "this product" in the above msg. Also, is it possible to place > > an > > icon in this message? > > > > > msiexec.exe has a /quiet parameter. If you specify this it runs in quiet > mode with no user interaction. You could then display your own message using > the MsgBox method, which has options for title, buttons, and icons. For > example: > ========== > Dim objShell, strPath, strCmd, Response > Set objShell = CreateObject("Wscript.Shell") > strPath = objShell.ExpandEnvironmentStrings("%SystemRoot%") > strCmd = "%comspec% /c """ & strPath & "\system32\msiexec.exe"" /quiet /x > {2F1A8F7C-0C38-464B-A61B-32C7F7AEAD9F}" > Response = MsgBox("Are you sure you want to uninstall my application?", > vbYesNo + vbInformation, "My Title") > If (Response = vbYes) Then > objShell.Run strCmd, 2 > End If > > Check VBScript/WSH documentation on the MsgBox function and the button and > icon options available, such as: vbOKOnly, vbYesNoCancel, vbQuestion, > vbExclamation, vbCritical, etc: > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| how can I uninstall an application from multiple PC's? | PowerShell | |||
| Script for Uninstall Access 2002 | VB Script | |||
| How to uninstall stubborn (or corrupt) application? | Vista General | |||
| Cannot uninstall any application thru Programs and Features of Vis | Vista installation & setup | |||
| Uninstall an application using Powershell | PowerShell | |||