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

Add/Remove programs uninstall remotely via vbscript?

Status
Not open for further replies.

Ross1811

MIS
Oct 1, 2004
122
US
Hello everyone,

I am looking for a way to uninstall some programs from the "Add/Remove" control component within windows xp. Is there anyway to automate this so I could uninstall something remotely?


Thanks,
Ross
 
There are several ways, you can use WMI
Code:
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top