Page 1 of 1 1
Topic Options
#148776 - 2005-09-29 09:01 AM Propagate Symantec Antivirus Client Groups GRC.DAT to clients
oyvinn Offline
Fresh Scripter

Registered: 2000-12-05
Posts: 10
Loc: Kongsberg
I made a small kix script to deploy Symantec Antivirus v10 GRC.DAT based on Client Groups to individual Clients.
The deployment works ok, the file is copied, but the changes are not done, even after a reboot.

All Clients are put into Client Groups dependant of Nameing conventions ie a laptop is named DRKBGMOBxxx, a desktop DRKBGWSxxx etc.

Code
$NavParent = "xxxxx"
$DataLocation = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Common AppData")
MessageBox("Workstation:"+@WKSTA+" DataLocation:"+$DataLocation,"Symantec Antivirus",,10)
Select
Case (InStr(@WKSTA,"DRKBGTEST04"))
$ClientGroup="SWDistribution"
Case (InStr(@WKSTA,"DRKBGSCA")) OR (InStr(@WKSTA,"DRKBGFEL")) OR (InStr(@WKSTA,"DRKBGKUR"))
$ClientGroup="SpecialEquip"
Case (InStr(@WKSTA,"DRKBGMOB")) OR (InStr(@WKSTA,"MOB"))
$ClientGroup="Laptops"
Case (InStr(@WKSTA,"DRKBGWS"))
$ClientGroup="Desktops"
Case (InStr(@WKSTA,"DRKBGW")) OR (InStr(@WKSTA,"DRDRMW"))
$ClientGroup="Servers"
EndSelect

MessageBox ("Copying file:"+ $DataLocation+"\Symantec\Symantec AntiVirus\7.5\","Symantec Antivirus",,10)
Copy "\\$NavParent\vphome\groups\$ClientGroup\grc.dat" "$DataLocation\Symantec\Symantec AntiVirus Corporate Edition\7.5\"

Top
#148777 - 2005-09-29 11:23 AM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Version 10 now uses Security Certificate technology so you can't just copy the GRC.DAT file as you could in previous versions. You need to copy the certificates as well from the Parent Server to the client.

Please check the documentation that ships with version 10 of SAV-CE 10 which will explain in more details what is required to manage a client.

Idea is good, but the method used by Symantec is still new and (imho) at least a little flawed or flaky.

Top
#148778 - 2005-09-29 11:39 AM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
oyvinn Offline
Fresh Scripter

Registered: 2000-12-05
Posts: 10
Loc: Kongsberg
The certificate is distributed to ALL clients, but do you have to copy a new certificate EVERY time the grc.dat file is copied?

PS. All (190 clients are Managed)

Top
#148779 - 2005-09-29 11:54 AM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
There is no need to copy the GRC.DAT file at all unless trying to manage an unmanaged client. Once the systems are installed and managed by the console there should not be an issue or need to recopy the GRC.DAT file manually.

Perhaps if an installation becomes corrupted or something like that, otherwise there should not really be a need to modify or manage via scripting.

What issues are you having?

Top
#148780 - 2005-09-29 12:01 PM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
oyvinn Offline
Fresh Scripter

Registered: 2000-12-05
Posts: 10
Loc: Kongsberg
According to Symantec, in version 10, the GRC.DAT file MUST be distributed MANUALLY to each client when using clients are managed by CLIENT GROUPS and not SERVER GROUPS.

The issue is that no matter WHAT changes i do in the Client Groups, the changes are never made on the client! The GRC.DAT file is changed on the server, and dissapears on the client after Symantec have read the file. So everything looks to work perfect!

Top
#148781 - 2005-09-29 12:07 PM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Okay, have not used the GROUPS myself. If the file copy works and applies the changes manually then a copy by KiXtart should work just as well.

Does it work properly if you manually copy the GRC.DAT file?

Top
#148782 - 2006-09-11 09:21 PM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
mobious Offline
Fresh Scripter

Registered: 2002-03-20
Posts: 11
I wrote this script for my sites, it works every day on several thousand desktops..

all you have to do is change the name agydev to whatever the server name is.. it also copies down the certificate file

on the server you will need to give the users group access to the pki\roots folder (read access).

$homedir=%windir%
$systemdir=$homedir + \SYSTEM32

:checkinstallation
$checkinstall=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\LiveUpdate\CmdLines\CmdLine4", "ProductVersion")
IF $checkinstall=""
;Symantec antivirus not installed
MessageBox ("Symantec Antivirus is not installed, Please see your tech specialist to get it installed", "Server Compliance Notice")
Goto End
Else
goto checksavverversion
;MessageBox ("$checkinstall", "Server Compliance Notice")
ENDIF

:checksavverversion
$checksavver=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\LiveUpdate\CmdLines\CmdLine4", "ProductVersion")
IF $checksavver="8.0"
;Symantec Version 8.0
MessageBox ("Your Symantec Antivirus Version is $checksavver, Please see your tech specialist to get upgraded to version 10", "Incorrect version of Symantec Antivirus Detected")
Goto End
Else
;Symantec version 10.0
;MessageBox ("Symantec Antivirus Version is $checksavver", "Sav Version")
ENDIF

:checkappdata
$checkappdatapath=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Common AppData")
;MessageBox ("Your Application Path is $checkappdatapath", "Application Data Path is")

:checkinstallpath
$checkinstallationpath=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion", "Home Directory")
;MessageBox ("Your Install Path is $checkinstallationpath", "Home Directory Path is")

:checkdir
;This section checks to see if the local workstation path for the grc exists for symantec 10.0
$workstationfolderpath = "$checkappdatapath\Symantec\Symantec AntiVirus Corporate Edition\7.5"
;MessageBox ("Default Grc path is $workstationfolderpath", "Workstation folder path")
If Exist ($workstationfolderpath)
;MessageBox ("Grc Directory Exists, and is $workstationfolderpath", "Debug")
;now that I have the correct directory structure, I can continue
goto delfiles
Else
;MessageBox ("Grc Directory Does not Exist, and is $workstationfolderpath", "Debug")
;what this means is that sav was installed but currently there is no directory structure left.
goto end
EndIf

:delfiles
$grcfile = "grc.dat"
$grcfull = $workstationfolderpath + "\" + $grcfile
;MessageBox ("Grc path is $grcfull", "Grc.dat File Check")
If EXIST ($grcfull)
;MessageBox ("File Exists", "Grc.dat File Check")
del $grcfull
ELSE
;MessageBox ("File Does Not Exist, and is $grcfull", "Grc.dat File Check")
ENDIF

:delfiles1
$cerfile = "*.cer"
$cerfull = $checkinstallationpath + "pki\roots\" + $cerfile
;MessageBox ("$cerfile", "cer File Check")
;MessageBox ("The full path for the certificate file is $cerfull", "cer File Check")
If EXIST ($cerfull)
;MessageBox ("File Exists", "*.cer File Check")
del $cerfull
ELSE
;MessageBox ("File Does Not Exist, and is $cerfull", "*.cer File Check")
ENDIF

:checkserver
;This section will then check if it can see the server \\AGYDEV\vphome directory
;To copy the grc.dat file down (grc.dat should be in \\AGYDEV\vphome
$ServerFolderPath = "\\AGYDEV\VPHOME"
If Exist ($ServerFolderPath)
;MessageBox ("Server Folder Path exists!", "Sav Path on server");if the folder exists then it will commence the copy
COPY "\\AGYDEV\vphome\grc.dat" "$checkappdatapath\Symantec\Symantec AntiVirus Corporate Edition\7.5" /r
COPY "\\AGYDEV\vphome\pki\roots\*.cer" "$checkinstallationpath\pki\roots" /r
;if it can't find the file it will continue on error
Else
;no rights to the server
;MessageBox ("Sav Folder on server Doesn't Exist!", "Sav Path on server")
goto end
EndIf


:End

Top
#148783 - 2006-09-11 11:56 PM Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Thanks for sharing but can you please edit your file and place your code between the CODE TAGS so as to preserve the formatting of your code.
Top
Page 1 of 1 1


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

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.072 seconds in which 0.04 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