#162230 - 2006-05-22 05:26 PM
Symantec 10 Management script
|
mobious
Fresh Scripter
Registered: 2002-03-20
Posts: 11
|
This is the script that I use to setup management upon login of sav 10 clients in this way if they move from site to site they will always be managed and get their updates.
Replace agyxxx with your servername
The messageboxes can be changed to whatever you want for warnings.
$homedir=%windir% $systemdir=$homedir + \SYSTEM32
:checkinstallation $checkinstall=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\LiveUpdate\CmdLines\CmdLine4", "ProductVersion") IF $checkversion="" ;Symantec antivirus not installed MessageBox ("Symantec Antivirus is not installed, Please see your techspecialist to get it installed", "Server Compliance Notice") Goto End Else goto checksavverversion 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 $checkverupdate, Please see your techspecialist to get upgraded to version 10", "Incorrect version of Symantec Antivirus Detected") Goto End Else ;Symantec version 10.0 ;MessageBox ("Symantec Antivirus Version is $checkverupdate", "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 Application 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" If Exist ($workstationfolderpath) ;MessageBox ("Directory Exists, and is $workstationfolderpath", "Debug") ;now that I have the correct directory structure, I can continue goto checkserver Else MessageBox ("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 ("$grcfull", "Grc.dat File Check") If "$workstationfolderpath\$grcfile" ;MessageBox ("File Does Not Exist, and is $workstationfolderpath\$grcfile", "Grc.dat File Check") ELSE ;MessageBox ("File Exists", "Grc.dat File Check") del "$workstationfolderpath\grc.dat" /f ENDIF
:delfiles1 $cerfile = "*.cer" $cerfull = $workstationfolderpath + "\" + $cerfull ;MessageBox ("$cerfile", "cer File Check") ;MessageBox ("$cerfull", "cer File Check") If "$checkinstallationpath\pki\roots\*.cer" ;MessageBox ("File Does Not Exist, and is $checkinstallationpath\pki\roots\*.cer", "*.cer File Check") ELSE ;MessageBox ("File Does Not Exist", "Grc.dat File Check") ;del "$checkinstallationpath\pki\roots\$cerfile" /f ENDIF
:checkserver ;This section will then check if it can see the server \\AGYXXX\vphome directory ;To copy the grc.dat file down (grc.dat should be in \\AGYXXX\vphome $ServerFolderPath = "\\AGYXXX\VPHOME\" If Exist ($ServerFolderPath) ;MessageBox ("Folder exist!", "Debug");if the folder exists then it will commence the copy COPY "\\AGYXXX\vphome\grc.dat" "$checkappdatapath\Symantec\Symantec AntiVirus Corporate Edition\7.5" /r COPY "\\AGYXXX\vphome\*.cer" "$checkinstallationpath\pki\roots" /r ;if it can't find the file it will continue on error Else ;no rights to the server ;MessageBox ("Folder Doesn't Exist!", "Debug") goto end EndIf
:End
|
Top
|
|
|
|
#162233 - 2006-05-22 08:18 PM
Re: Symantec 10 Management script
|
mobious
Fresh Scripter
Registered: 2002-03-20
Posts: 11
|
This takes care of the pki certificate, it will wipe the file out and copy the new one down from the local server.
I am going to update this to a newer version in about 15 minutes.
|
Top
|
|
|
|
#162234 - 2006-05-22 09:32 PM
Re: Symantec 10 Management script
|
mobious
Fresh Scripter
Registered: 2002-03-20
Posts: 11
|
here's the final script
One caveat here, you have to give the everyone group rights to the C:\Program Files\Symantec AntiVirus\pki\roots I gave them list and read rights not read&execute
This will allow the certificate copy
Code:
$homedir=%windir% $systemdir=$homedir + \SYSTEM32
:checkinstallation $checkinstall=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\LiveUpdate\CmdLines\CmdLine4", "ProductVersion") IF $checkversion="" goto checksavverversion Else ;Symantec antivirus not installed ;MessageBox ("Symantec Antivirus is not installed, Please see your techspecialist to get it installed", "Server Compliance Notice") Goto End 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 $checkverupdate, Please see your techspecialist to get upgraded to version 10", "Incorrect version of Symantec Antivirus Detected") Goto End Else ;Symantec version 10.0 ;MessageBox ("Symantec Antivirus Version is $checkverupdate", "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 "\\AGYxxx\vphome\grc.dat" "$checkappdatapath\Symantec\Symantec AntiVirus Corporate Edition\7.5" /r COPY "\\AGYxxx\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
Edited by NTDOC to place within Code Tags
Edited by NTDOC (2006-05-22 10:09 PM)
|
Top
|
|
|
|
#173027 - 2007-01-21 08:41 AM
Re: Symantec 10 Management script
[Re: NTDOC]
|
Megabit
Fresh Scripter
Registered: 2007-01-21
Posts: 13
Loc: Miami, FL
|
Is there any way to check Symantec Corporate Edition to see the subversion beyond 10.1 ? The registry key mentioned here only displays 10.1
If you've seen some of the recent activity around 10.1 you'd know that certain versions prior to 10.1.4.4000 (?) had a vulnerability that modern viruses could attack. For that reason I would like to deploy newer versions based on the current full version string. Any ideas?
|
Top
|
|
|
|
#173032 - 2007-01-21 09:50 AM
Re: Symantec 10 Management script
[Re: NTDOC]
|
Megabit
Fresh Scripter
Registered: 2007-01-21
Posts: 13
Loc: Miami, FL
|
Nevermind, the GetNavAntiVirusInfo UDF reports the full version string. I just tested it on SAV 10.1.4.4000 and v4.53
|
Top
|
|
|
|
#173035 - 2007-01-21 08:22 PM
Re: Symantec 10 Management script
[Re: Les]
|
Megabit
Fresh Scripter
Registered: 2007-01-21
Posts: 13
Loc: Miami, FL
|
Sealeopard,
You are correct. However, we do a test and approval of all new versions and currently we have only approved 10.1.4.4000. We are trying to get the entire enterprise on one current version before moving on. Current the firewalls are all over the place in terms of management and policies so remote deployment was hindered. Bringing me to login script again.
|
Top
|
|
|
|
#181833 - 2007-10-22 11:47 PM
Re: Symantec 10 Management script
[Re: Sealeopard]
|
scott_s
Fresh Scripter
Registered: 2004-06-15
Posts: 15
|
GetNavAntiVirusInfo() does not work for the New SAV 11 (Symantec End Point) Any chance someone is going to update it?
thanks
|
Top
|
|
|
|
#181862 - 2007-10-23 05:33 PM
Re: Symantec 10 Management script
[Re: NTDOC]
|
scott_s
Fresh Scripter
Registered: 2004-06-15
Posts: 15
|
Yes I have disabled all the firewalls, It looks like they have finally got rid of all the Landesk Keys, Here is an export of my HKLM symantec,Symantec Endpoint Protection key.
|
Top
|
|
|
|
#181863 - 2007-10-23 05:35 PM
Re: Symantec 10 Management script
[Re: scott_s]
|
scott_s
Fresh Scripter
Registered: 2004-06-15
Posts: 15
|
Here is the File,
Attachments
sep.zip (459 downloads) Description:
Edited by scott_s (2007-10-23 06:29 PM)
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 259 anonymous users online.
|
|
|