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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uninstalling software Forcefully and Silently 1

Status
Not open for further replies.

k3y3n1n

IS-IT--Management
Mar 6, 2009
15
US
I made vbs to uninstall act v6 from my computer. The vbs works but I have to click next and Yes to all. I need help on making it by pass that and automatically uninstall everything with out prompting me.
---------------------------------------------------------
Set WshShell = Nothing
Set oReg = Nothing

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
Set WshShell = WScript.CreateObject("WScript.Shell")

' Uninstall first application...
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ACT!"
strValueName = "UninstallString"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath
If IsNull(strUninstallFullPath) Then
' wscript.echo "Uninstall path for app1 is null"
Else

WshShell.Run strUninstallFullPath,8,true

End If



 
You probably want some entirely different forum, since this one is intended for questions about programming in VB5 and VB6.

However...

This isn't nearly as easy as you might hope. Every installer technology is somewhat different. In many cases you'll find that the program you find at that registry location cannot even be run in the manner you are trying.

The VB6 PDW's ST6UNST.EXE for example will most likly pop up a dialog complaining that it wasn't run from Add/Remove programs.

For other installer technologies you might consult resources such as Unattended.
 
Yes I notice after I posted it, that it was for Visual basic form not vb scripting so sorry about that. So would you know any other sites that can help me on this? Also I really appreciate you commenting on my question and the unattended site is a nice reference. Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top