I need to run the following script against each one of my servers. These are mostly Windows 2003 SP1 and a couple of Windows 2000 SP4 servers. I am trying to disable McAfee scriptscan by reading a registry key and if it isn't the correct value calling a batch file to run regsvr32 /u scriptproxy.dll.
; Check for servers with scriptscan enabled
;How do I read from a text file with some server names inside and process the below code 1 at a time?
$scriptscancheck = "" $scriptscancheck = READVALUE ("HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32", "Default")
IF $scriptscancheck = "C:\Program Files\Network Associates\VirusScan\scriptproxy.dll" $correct_scriptscanvalue="no" ; Scriptscan Check REDIRECTOUTPUT ("\\servername\global$\mcafee\scriptscanverson_wrong.txt",0) ? "Scriptscan chkd " + $scriptscancheck + " " REDIRECTOUTPUT ("") Goto Unreg_scriptscan ELSE $correct_script="yes" Goto (how do i get back to the text file from here?) ENDIF
;************************************************************ :Goto Unreg_scriptscan
;How do I get the server to unregister a dll if I am running this script from my desktop and then loop to the next server in the text file
;************************************************************ :END
EXIT
|