Question : How can I write a vbscript to uninstall programs remotely, thoroughly?

How can I write a vbscript to uninstall programs remotely, thoroughly?

In add/remove programs when you uninstall an app it is removed from the registry along with many associations. If control panel can find what it needs to uninstall something, why not script it. Then using WMI run it on a remote machine??

thx

Answer : How can I write a vbscript to uninstall programs remotely, thoroughly?

strComputer = "."

Dot means current computer
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
 
Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product Where Name = 'Personnel database'")
 
For Each objSoftware in colSoftware
    objSoftware.Uninstall()
Next
Random Solutions  
 
programming4us programming4us