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.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

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!

8.2

Add progress bar to script to remove Norton AV

Asked by kevlause in VB Script, Visual Basic Programming, Windows XP Operating System

Tags: , , ,

I have this script to remove norton\Symantec antivirus. The problem is there is no feedback on if it is running or not. Then it randomly reboots the PC (not every pc just some of them). I wanted to use it in a log in script, but do to the reboot I don't think I can. My next choice to to at least add some feedback that the script is running or a progess bar or something can anyone help?
Here is the script (I want to thank Chey for this too!!!!)
Start Free Trial
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
[+][-]12.29.2007 at 02:27AM PST, ID: 20547382

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Visual Basic Programming, Windows XP Operating System
Tags: bar, progress, script, symantec
Sign Up Now!
Solution Provided By: gecko_au2003
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628