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

Uninstall script

Status
Not open for further replies.

Peanut2005

Technical User
Apr 26, 2005
11
GB
Hi Everyone,

I've just been tasked with removing our backup agent client software of from 71 random servers, which would require me to logon to each server, add/remove programs and then remove the agent software. After this has been done it requires a reboot. Is there any way that I could script this at all?

Many thanks in advance.

Shaun
 
How about this to take care of the uninstall:
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product Where Name = 'Name of software'")

For Each objSoftware in colSoftware
    objSoftware.Uninstall()
Next
I got this off of Microsoft's script archive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top