#57799 - 2001-07-31 09:08 PM
grc.dat norton antivirus
|
Anonymous
Anonymous
Unregistered
|
I need some help creating a script that will copy the grc.dat file to the client pc.Can someone help me with a solution... Thanks, FR
|
|
Top
|
|
|
|
#57800 - 2001-08-01 05:40 AM
Re: grc.dat norton antivirus
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Hello Mr. FRichter,Here is a sample piece of code I found laying around... Please modify to suite your needs... code:
SELECT ;*** Parent Server MYSERVER1 CASE ((SUBSTR(@IPADDRESS0,1,11)="125.214.121")) or ((SUBSTR(@IPADDRESS0,1,11)="125.214.122")) IF @INWIN=2 IF EXIST ("C:\PROGRAM FILES\NORTON ANTIVIRUS")=0 MD "C:\PROGRAM FILES\Norton Antivirus" ENDIF COPY \\MYSERVER1\VPHOME\GRC.DAT ("C:\PROGRAM FILES\NORTON ANTIVIRUS") ELSE IF (READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions","ProductType")="WinNT") IF EXIST ("C:\PROGRAM FILES\NAVNT")=0 MD "C:\PROGRAM FILES\NAVNT" ENDIF COPY \\MYSERVER1\VPHOME\GRC.DAT ("C:\PROGRAM FILES\NAVNT") ENDIF ENDIF ;*** Parent Server MYSERVER2 CASE ((SUBSTR(@IPADDRESS0,1,11)="145.204. 9")) or ((SUBSTR(@IPADDRESS0,1,11)="145.204. 10")) IF @INWIN=2 IF EXIST ("C:\PROGRAM FILES\NORTON ANTIVIRUS")=0 MD "C:\PROGRAM FILES\Norton Antivirus" ENDIF COPY \\MYSERVER2\VPHOME\GRC.DAT ("C:\PROGRAM FILES\NORTON ANTIVIRUS") ELSE IF (READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions","ProductType")="WinNT") IF EXIST ("C:\PROGRAM FILES\NAVNT")=0 MD "C:\PROGRAM FILES\NAVNT" ENDIF COPY \\MYSERVER2\VPHOME\GRC.DAT ("C:\PROGRAM FILES\NAVNT") ENDIF ENDIF ;*** Parent Server MYSERVER3 CASE ((SUBSTR(@IPADDRESS0,1,11)="122. 5. 15")) or ((SUBSTR(@IPADDRESS0,1,11)="122. 5. 16")) or ((SUBSTR(@IPADDRESS0,1,11)="122. 5. 17")) or ((SUBSTR(@IPADDRESS0,1,11)="122. 5. 81")) or ((SUBSTR(@IPADDRESS0,1,11)="122. 5. 82")) or ((SUBSTR(@IPADDRESS0,1,11)="122. 5. 85")) IF @INWIN=2 IF EXIST ("C:\PROGRAM FILES\NORTON ANTIVIRUS")=0 MD "C:\PROGRAM FILES\Norton Antivirus" ENDIF COPY \\MYSERVER3\VPHOME\GRC.DAT ("C:\PROGRAM FILES\NORTON ANTIVIRUS") ELSE IF (READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions","ProductType")="WinNT") IF EXIST ("C:\PROGRAM FILES\NAVNT")=0 MD "C:\PROGRAM FILES\NAVNT" ENDIF COPY \\MYSERVER3\VPHOME\GRC.DAT ("C:\PROGRAM FILES\NAVNT") ENDIF ENDIF ENDSELECT
|
|
Top
|
|
|
|
#57804 - 2001-08-30 09:15 PM
Re: grc.dat norton antivirus
|
Anonymous
Anonymous
Unregistered
|
Here is my code for NAV 7.5. The only differece is the location of the GRC.dat between NT and W2K ;GRCupdate.kix ;Updates GRC.dat based on IP address, this will prevent users from downloading updates across the wan or lost Nav Parents ;Script will find out if computer is NT/2000 and copy GRC.dat to correct location ;Nav Service is then stopped and restarted for changes to take effect ;Also writes to event log of parent server
cls select Case @dos=5.0 $system="Win2k" endselect select Case @dos=4.0 $system="WinNT" endselect If $system = "Win2k" GOTO W2k else GOTO NT4 :W2k $TCPIP = @IPAddress0 $3octet = val(substr($TCPIP,9,3)) ;New Jersey if $3octet = 25 USE W: "\\bssnjlan\vphome" SHELL '%comspec% /c COPY W:\GRC.dat c:\docume~1\alluse~1\applic~1\symantec\norton~1\7.5' USE W: /DEL SHELL '%comspec% /c NET STOP "Norton AntiVirus Client" >NUL' SHELL '%comspec% /c NET START "Norton AntiVirus Client" >NUL' IF @ERROR = 1 $BAk = "GRC.DAT UNSUCCESSFUL" ELSE $BAk = "GRC.DAT SUCCESSFUL" ENDIF IF $Bak = "GRC.DAT SUCCESSFUL" LOGEVENT(4,1000,"GRC.DAT file on @WKSTA Was Sucessfully Updated", "\\bssnjlan", "GRC.dat Process") Else LOGEVENT(4,1001,"GRC.DAT file on @WKSTA Was NOT Updated Sucessfully", "\\bssnjlan", "GRC.dat Process") ENDIF else :NT4 ;New Jersey $TCPIP = @IPAddress0 $3octet = val(substr($TCPIP,9,3)) if $3octet = 25 USE W: "\\bssnjlan\vphome" SHELL '%comspec% /c COPY W:\GRC.dat c:\winnt\profiles\alluse~1\applic~1\symantec\norton~1\7.5' USE W: /DEL SHELL '%comspec% /c NET STOP "Norton AntiVirus Client" >NUL' SHELL '%comspec% /c NET START "Norton AntiVirus Client" >NUL' IF @ERROR = 1 $BAk = "GRC.DAT UNSUCCESSFUL" ELSE $BAk = "GRC.DAT SUCCESSFUL" ENDIF IF $Bak = "GRC.DAT SUCCESSFUL" LOGEVENT(4,1000,"GRC.DAT file on @WKSTA Was Sucessfully Updated", "\\bssnjbdc", "GRC.dat Process") Else LOGEVENT(4,1001,"GRC.DAT file on @WKSTA Was NOT Updated Sucessfully", "\\bssnjbdc", "GRC.dat Process") ENDIF
|
|
Top
|
|
|
|
#57806 - 2001-09-06 08:04 AM
Re: grc.dat norton antivirus
|
Anonymous
Anonymous
Unregistered
|
FYIThe purpose of this script is to refresh the settings based by ip. IE changing the parent server depending upon where (my highly mobile) work force is located. This saves bandwitdh and time zone headaches by having the client update from the closest possible parent. Stopping and starting is needed so that NAV process this update. BTW - I stripped my posted script so that it only had 1 IP address, my real script has 10 subnets and 6 parents to look for. 
|
|
Top
|
|
|
|
#57807 - 2001-09-06 11:41 AM
Re: grc.dat norton antivirus
|
Anonymous
Anonymous
Unregistered
|
I have also written a grc.dat script, after losing all my clients after an IP address change. This script will update 95/98/NT and W2k, for NAV versions 7 and 7.5. $ver=readvalue("hkey_local_machine\software\intel\landesk\virusprotect6\currentversion","productversion") $hd=readvalue("hkey_local_machine\software\intel\landesk\virusprotect6\currentversion","home directory") $ip=substr(@ipaddress0,1,12) if $ip=" 10.1. 1." if @inwin=2 copy "\\navserver\vphome\grc.dat" "$hd" else if $ver="49283774" copy "\\navserver\vphome\grc.dat" "$hd" else if @inwin=1 and @dos=5.0 copy "\\navserver\vphome\grc.dat" "c:\documents and settings\all users\application data\symantec\norton antivirus corporate edition\7.5\" else copy "\\navserver\vphome\grc.dat" "c:\winnt\profiles\all users\application data\symantec\norton antivirus corporate edition\7.5\" endif endif endif endif
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2375 anonymous users online.
|
|
|