Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Silent uninstall of WinZip 1

Status
Not open for further replies.

58sniper

MIS
Apr 25, 2004
9,152
US
I've got this script that I found, that allows for running the uninstallstring to uninstall programs like the google toolbar, etc.

I've modified it for winzip, but I need some help with a minor detail.

Code:
' (c) 2006 Plamdi.com. This file silently uninstalls WinZip.
Option Explicit:On Error Resume Next
Dim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinZip\UninstallString")
If a<>"" Then WshShell.Run(a&" /S"),1,True:i=1
WshShell=Nothing:Wscript.Quit(i)

The switch for the silent uninstall is /quninstall (note the "q"), but the switch in the uninstallstring is /uninstall

The full uninstallstring that's in the registry is
Code:
"C:\Program Files\WinZip\WINZIP32.EXE" /uninstall

How can I use the script to do this? I like the script because if it doesn't find the application, it doesn't generate an error.

Thanks!

Pat Richard, MCSE MCSA:Messaging CNA
Microsoft Exchange MVP
Want to know how email works? Read for yourself -
 
Something like this ?
If a<>"" Then WshShell.Run Replace(a,"/un","/qun"),1,True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Ah - like they say in those wacky beer commercials, "brilliant".


Flinging a star your way. Thanks.

Pat Richard, MCSE MCSA:Messaging CNA
Microsoft Exchange MVP
Want to know how email works? Read for yourself -
 
If I wanted to uninstall two things in succession, one after the other, but only after the first one is finished how would I go about that? Is there a way using the existing script here with a small added amount? Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top