Hi
Love the product, to pay back, here is the installation from a domain logon script using kix.
Prerequisites:
All workstations are called workstation1, 2, 3..
User must be local admin (script tests for this).
Chuck the installer and a copy of a working clamwin.conf into the $instpath
Substitute as required.
Code as follows, fair use at own risk:
$instpath = "\\server\stuff$\applications" ;Installers base location, put installer here
$pctype = LEFT(@WKSTA, 6) ; returns the first six characters of the computers netbios name to determine server wor workstation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Per Computer Settings
; This secton deploys settings and software that affect the whole computer.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$BuildVer = "3" ; a counter that determines the script version
If not exist ("c:\build."+ $Buildver) ; checks for current script verion activity and ignores script section if the tasks are already done
del "c:\build.*" /c ; clears all script version counters
If InGroup("\\" + @WKSTA + "\Administrators") ; checks to see if the current user is a local admin
if $pctype = "WORKST" ; checks to see if the netbios name starts witht he string 'workst' or 'server'
; ;Check and update ClamWin if required
If Getfileversion("%ProgramFiles%\ClamWin\bin\ClamWin.exe","FileVersion") < "0.95.3.0"
$Selection=MessageBox("The AntiVirus must be updated. @CRLF @CRLF - Continue? @CRLF @CRLF Default is YES in 5 seconds.","Ukhona?", 52, 5)
if $Selection = 7
MessageBox("Good, updated Antivirus is required. @CRLF @CRLF Either you opted out or the install failed, either way, you are not allowed access to network shares, this script will end now.","Sizobonana!", 64)
QUIT 0 ; Logon script terminates before network drives are connected
endif
shell "%comspec% /c $instpath\clamwin\clamwin-0.95.3-setup.exe /sp- /NOTB /silent /norestart"
endif
; ;Remove ASK toolbar if present
$ReturnCode = KeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{86D4B82A-ABED-442A-BE86-96357B70F4FE}")
If $ReturnCode
shell "%comspec% /c msiexec /X {86D4B82A-ABED-442A-BE86-96357B70F4FE} /qn"
EndIf
endif
endif
copy "\\server\stuff$\nothing.txt" "c:\build."+ $Buildver ; copies an empty file called nothing.txt to a specific filename to create the version file
endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Per User Settings
; This secton deploys settings that affect the user.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
use "*" /DELETE
use h: "\\server\home$\" + @USERID
copy "$instpath\clamwin\clamwin.conf" "%appdata%\.clamwin\clamwin.conf" ; copies the config file to the user profile |
Hope this helps somebody, no responsibility accepted by me, milage may vary beware of line wraps.
Gundar