(imported topic written by jmlafreniere91)
Hello, we have created a VBS script that installs Symantec Endpoint Protection 11.x antivirus a few months ago. Basically, the script checks if an older version is present and uninstalls it, then checks the OS language to deploy the antivirus based on it. We were deploying it using a GPO, but now we’re trying to transfer all installation GPOs to Bigfix.
I’m trying to create a Bigfix package using the wizard that does the same operations, but it doesn’t seem to be working. The actual action says it is completed, but the antivirus remains not installed on the computer.
I’ve tried uploading the .vbs, the .msi, as well as the whole directory that contains the .msi to the Bigfix server, but it still doesn’t work.
Here’s the VBS script:
Option Explicit
Dim MessageLog
Dim Windows
Dim Machine
Set Windows = WScript.CreateObject(“WScript.Shell”)
MessageLog = “”
'---------------------------------------------------------------------
’ Detect machine name
'---------------------------------------------------------------------
Dim WshNetwork
Set WshNetwork = WScript.CreateObject(“WScript.Network”)
Machine = WshNetwork.ComputerName
MessageLog = Machine
'---------------------------------------------------------------------
’ Checks presence of AV
'---------------------------------------------------------------------
Dim Cle
On Error Resume Next
Cle = Windows.RegRead (“HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection”)
If err.number 0 Then
'---------------------------------------------------------------------
’ Detects OS language (1036 / 1033) and machine name
'---------------------------------------------------------------------
Dim strComputer
Dim objWMIService
Dim colOSes
Dim objOS
Dim LangueOS
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\” & strComputer & “\root\cimv2”)
Set colOSes = objWMIService.ExecQuery(“Select * from Win32_OperatingSystem”)
For Each objOS in colOSes
LangueOS = objOS.OSlanguage
Next
'-----------------------------------------------------------------------
'Disable the password from the registry and uninstalls SAV 8.1
'-----------------------------------------------------------------------
Windows.RegWrite “HKLM\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\AdministratorOnly\Security\UseVPUninstallPassword”, 0, “REG_DWORD”
Windows.Run “msiexec.exe /x {0EFC6259-3AD8-4CD2-BC57-D4937AF5CC0E} /quiet /norestart”,TRUE
MessageLog = MessageLog & " | -SAV81"
'---------------------------------------------------------------------
’ Installs SEP 11 (OS language based)
'---------------------------------------------------------------------
If LangueOS = 1036 Then
Windows.CurrentDirectory = “\10.1.7.22\packages\FRENCH”
Windows.Run “msiexec.exe /i ““Symantec AntiVirus.msi”” /quiet /norestart”,TRUE
MessageLog = MessageLog & " | +SEP11 FR"
ElseIf LangueOS = 1033 Then
Windows.CurrentDirectory = “\10.1.7.22\packages\ENGLISH”
Windows.Run “msiexec.exe /i ““Symantec AntiVirus.msi”” /quiet /norestart”,TRUE
MessageLog = MessageLog & " | +SEP11 EN"
End If
End If
'---------------------------------------------------------------------
’ Creates a log or add to the existing log
'---------------------------------------------------------------------
Dim Sortie
Dim FichierLog
Set FichierLog = CreateObject(“Scripting.FileSystemObject”)
If FichierLog.FileExists("\10.0.2.14\pwd$\SEP" & Machine & “.txt”) Then
Set Sortie = FichierLog.OpenTextFile("\10.0.2.14\pwd$\SEP" & Machine & “.txt”, 8, True)
Else Set Sortie = FichierLog.CreateTextFile("\10.0.2.14\pwd$\SEP" & Machine & “.txt”, True)
End If
Sortie.WriteLine MessageLog & " | " & Date & " | " & Time
Sortie.Close
WScript.Quit
Here’s my action script:
Relevance 1
exists value “InstallLanguage” whose (it as string = “040C”) of keys “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language” of registry
Action1 (default) (the .MSI only)
Script Type BigFix Action Script
continue if {(size of it = 6110394 AND sha1 of it = “f8db246d2cad7a44dbb3037c7ba7b8c2a8246fb6”) of file “Symantec%2520AntiVirusmsi.tmp” of folder “__Download”}
extract Symantec%20AntiVirusmsi.tmp
wait “{pathname of system folder & “\msiexec.exe”}” /i “{(pathname of client folder of current site) & “__Download\Symantec AntiVirus.msi”}” /qn /norestart
OR (the full directory)
download http://bigfix.cogeco.com:52311/Uploads/1b3a0bec776afc136ea150c7c08b556255c4a5ba/ENGLISH.tmp
continue if {(size of it = 100290959 AND sha1 of it = “1b3a0bec776afc136ea150c7c08b556255c4a5ba”) of file “ENGLISH.tmp” of folder “__Download”}
extract ENGLISH.tmp
wait “{pathname of system folder & “\msiexec.exe”}” /i “{(pathname of client folder of current site) & “__Download\Symantec Antivirus.msi”}” /qn /norestart
Please help !
JML