Question : A vbs script help

I have SMS environment and I am looking for some help to remove old packages from the computers.

I would like a VBScript that will look for these softwares on users registy and remove the the ones it finds.

1)MsiExec.exe /X{5783F2D7-5001-0409-0002-0060B0CE6BBA} /QN /NORESTART
AND
2)MsiExec.exe /X{5783F2D7-0301-0409-0002-0060B0CE6BBA} /QN /NORESTART
AND
3)MsiExec.exe /X{BA3B0FA5-1EAD-476B-8E8D-6569CBC3E154} /QN /NORESTART

I am going to check if there are more applications that i need to remove but for now these will do.

Regards,

Answer : A vbs script help

Hi, is it really worth looking for the packages first?  What if you just attempt to run the uninstall? It would only fail if the package didn't exist.

Regards,

Rob.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
arrCommands = Array( _
	"MsiExec.exe /X{5783F2D7-5001-0409-0002-0060B0CE6BBA} /QN /NORESTART", _
	"MsiExec.exe /X{5783F2D7-0301-0409-0002-0060B0CE6BBA} /QN /NORESTART", _
	"MsiExec.exe /X{BA3B0FA5-1EAD-476B-8E8D-6569CBC3E154} /QN /NORESTART" _
	)

Set objShell = CreateObject("WScript.Shell")
strResult = "Software uninstalled:" & VbCrLf & String(21, "=")
For Each strCommand In arrCommands
	intReturn = objShell.Run(strCommand, 0, True)
	If intReturn = 0 Then
		strResult = strResult & VbCrLf & "SUCCESS: " & strCommand
	Else
		strResult = strResult & VbCrLf & "FAILURE: " & strCommand
	End If
Next

MsgBox strResult
Random Solutions  
 
programming4us programming4us