Hi, .Net Experts,
I know this question may not belong to here, but I could not find a better place to ask.
My network admin has asked me to come up with a piece of windows scripting, which will be saved as myUninstall.bat on clients' desktop machines (OS win2k/win xp pro).
When it is run, it should work as if you were going through control panel, add/remove programs, then remove.
My google searched led me to following microsoft link.
And here is the sample script from it:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("SELECT * FROM Win32_Product WHERE Name = 'Personnel database'")
For Each objSoftware in colSoftware
I have changed line 1 and 5 as follow, where wks126.myCompany.com is the machine name as seen under My Computer, and c:\Program Files\xyz\xyz.exe is the executable I want to remove.
strComputer = "wks126.myCompany.com"
("SELECT * FROM Win32_Product WHERE Name = 'C:\Program Files\xyz\xyz.exe '")
Are they all the changes I have to make? and the script will run as design?