Link to home
Create AccountLog in
Avatar of dgarza7816
dgarza7816

asked on

how to do a script that can remove office 2007?

i have like 600 computers that need to remove office 2007. Is here a script that i can run to move that program from the computers.
Avatar of yelbaglf
yelbaglf
Flag of United States of America image

Try something like this...be sure to replace 'LogMeIn' with the name of the app in Add/Remove Programs.

strComputer = "." 
Set objWMIService = GetObject("winmgmts:" _ 
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
 
Set colSoftware = objWMIService.ExecQuery _ 
    ("Select * from Win32_Product Where Name = 'LogMeIn'") 
 
For Each objSoftware in colSoftware 
    objSoftware.Uninstall() 
Next

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer