#148776 - 2005-09-29 09:01 AM
Propagate Symantec Antivirus Client Groups GRC.DAT to clients
|
oyvinn
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
|
|
|
|
#148778 - 2005-09-29 11:39 AM
Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
|
oyvinn
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
|
|
|
|
#148780 - 2005-09-29 12:01 PM
Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
|
oyvinn
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
|
|
|
|
#148782 - 2006-09-11 09:21 PM
Re: Propagate Symantec Antivirus Client Groups GRC.DAT to clients
|
mobious
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|