Page 1 of 1 1
Topic Options
#57799 - 2001-07-31 09:08 PM grc.dat norton antivirus
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 Offline
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
#57801 - 2001-08-21 04:35 PM Re: grc.dat norton antivirus
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
has anyone tried this with NAV CE 7.5x?

I found a doc over at Symantec's site where the following was written:

quote:

Where to put the Grc.dat file on the client

If you are running NAVCE 7.0x, then copy the Grc.dat file to the folder where Norton AntiVirus is installed on the client.
o The default folder for Windows 95/98 client is C:\Program Files\Norton AntiVirus.
o The default folder for Windows NT/2000 clients is C:\Program Files\NavNT.
If you are running NAVCE 7.5:
o The default folder for Windows 95/98 client is:
C:\Program Files\Norton AntiVirus.
o The default folder for Windows NT clients is:
C:\WinNT\Profiles\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5
o The default folder for Windows 2000 clients is:
C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5



Document ID: 2000012009324748

The question is whether NAV on the client still finds the GRC.DAT if you out it in the NAV CE installation dir (would be simpler...). Has anyone tried this (i'm working on a NAV install/Update/Remove script)?

[ 21 August 2001: Message edited by: masken ]

_________________________
The tart is out there

Top
#57802 - 2001-08-21 07:45 PM Re: grc.dat norton antivirus
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello Masken,

The answer to your question is NO.

If the GRC.DAT file is copied to the wrong folder it will not work.

My sample script copies files based on the NAV CE 7.0x model. You can easily adapt it to both find out your version and copy to the correct location based upon your findings.

If you need help let me know, but should be pretty easy. Do a ReadValue on the Registry to determine version, then copy accordingly.

HTH...

Top
#57803 - 2001-08-22 09:35 AM Re: grc.dat norton antivirus
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Ok, thanks NTDOC, that wall all I wondered!
_________________________
The tart is out there

Top
#57804 - 2001-08-30 09:15 PM Re: grc.dat norton antivirus
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
#57805 - 2001-09-05 01:06 AM Re: grc.dat norton antivirus
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hi TonyRoZe

FYI

There is no need to stop the NAV services. The GRC only updates the Registry and the definition files when they do update on the client handle all of the stop/start on its own. Once NAV is installed you only need to copy the GRC to make it a Managed client and or to change the parent server.

Top
#57806 - 2001-09-06 08:04 AM Re: grc.dat norton antivirus
Anonymous
Unregistered


FYI

The 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
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
#57808 - 2001-09-06 09:38 PM Re: grc.dat norton antivirus
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Thanks for the sample tealm.

TonyRoZe,

FYI
I can understand the change, but there must be something wrong with the program or installation if you need to stop and start the service. This was a problem in the past, but is supposed to be working now. (works for us on our clients without touching the services).

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2175 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.138 seconds in which 0.073 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org