Advertisement
Advertisement
| 12.20.2007 at 06:35AM PST, ID: 23035823 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: |
'Script to uninstall SAV 10
'Created by Chey Harden 11.26.07
On Error Resume Next
Const HKLM = &H80000002
strComputer = "."
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
strRegPath = "SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\AdministratorOnly\Security"
strValue2 = ""
intShortSleep = 5000
intSleep = 240000
strProcessKill = "'msiexec.exe'"
strProcessKill2 = "'cmd.exe'"
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
oReg.EnumKey HKLM, strKeyPath, arrSubKeys
SetRegKey()
RemoveSAV()
Function RemoveSAV()
For Each subkey In arrSubKeys
'WScript.Echo subkey ' For Trouble shooting
strNewKeyPath = strKeyPath & "\" & subkey
strValueName = "DisplayName"
strValueNameUninstall = "UninstallString"
oReg.GetStringValue HKLM,strNewKeyPath,strValueName,strValue
If strValue = "Symantec AntiVirus" Then 'edit this for software key
'WScript.Echo "Found Key"'used for trouble shooting
'WScript.Echo strValue'used for trouble shooting
oReg.GetStringValue HKLM,strNewKeyPath,strValueNameUninstall,strValue2
'WScript.Echo strValue2'used for trouble shooting
If InStr(strValue2, "/I") Then
strValue2 = Replace(strValue2,"/I","/X")
'WScript.Echo "Replaced " & strValue2 'used for trouble shooting
Else
'WScript.Echo "Not Found " & strValue2 'used for trouble shooting
End If
ExecuteUninstall()
Else
'WScript.Echo "Not Found" 'used for trouble shooting
End If
Next
End Function
Function ExecuteUninstall()
Set WShell = CreateObject("WScript.Shell")
'WScript.Echo strValue2'used for trouble shooting
WShell.Run "%COMSPEC% /c " & strValue2 & " /qn",0,TRUE
Set WShell = Nothing
WScript.Sleep intSleep
'KillProcess() ' Used to kill the process if it runs too long, curently this function is disabled
End Function
Function SetRegKey()
strValueNameDword1 = "UseVPUninstallPassword"
strValueNameDword2 = "LockUnloadServices"
dwSetValue = 0
oReg.GetDWORDValue HKLM,strRegPath,strValueNameDword1,dwValue
If dwValue = 1 Then
oReg.SetDWORDValue HKLM,strRegPath,strValueNameDword1,dwSetValue
oReg.SetDWORDValue HKLM,strRegPath,strValueNameDword2,dwSetValue
End If
End Function
Function KillProcess()
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = " & strProcessKill )
For Each objProcess in colProcess
objProcess.Terminate()
Next
WScript.Sleep intShortSleep
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = " & strProcessKill2 )
For Each objProcess in colProcess
objProcess.Terminate()
Next
End Function
|