Option Explicit
Dim objShell, objNetwork
Set objShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
If KeyExists("HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\UNINSTALL\{5783F2D7-7001-0409-0002-0060B0CE6BBA}\") Then
objShell.Run "psexec -accepteula -e -u sa\super11 -p mine$22 \\" & objNetwork.ComputerName & " MsiExec.exe /norestart /q/x{5783F2D7-7001-0409-0002-0060B0CE6BBA} REMOVE=ALL", 1, True
ElseIf KeyExists("HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\UNINSTALL\{5783F2D7-4001-0409-0002-0060B0CE6BBA}\") Then
objShell.Run "psexec -accepteula -e -u sa\super11 -p mine$22 \\" & objNetwork.ComputerName & " MsiExec.exe /norestart /q/x{5783F2D7-4001-0409-0002-0060B0CE6BBA} REMOVE=ALL", 1, True
ElseIf KeyExists("HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\UNINSTALL\{5783F2D7-5001-0409-0002-0060B0CE6BBA}\") Then
objShell.Run "psexec -accepteula -e -u sa\super11 -p mine$22 \\" & objNetwork.ComputerName & " MsiExec.exe /norestart /q/x{5783F2D7-5001-0409-0002-0060B0CE6BBA} REMOVE=ALL", 1, True
End If
Function KeyExists(key)
Dim objShell
Set objShell = CreateObject("WScript.Shell")
On Error Resume Next
objShell.RegRead(key)
If Err.number <> 0 Then
KeyExists = False
Err.Clear
Else
KeyExists = True
End If
End Function
|