ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Silent Install Using KIX in a Logon Script
gundar


Joined: 26 Nov 2009
Posts: 2
Location: Here
Reply with quote
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:

Code:
$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
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 1748
Reply with quote
Thanks!
View user's profileSend private message
gundar


Joined: 26 Nov 2009
Posts: 2
Location: Here
Reply with quote
Hi

This needs to be updated but I have no time. I noticed recently that the ASK toolbar is not being removed, so if you use this script, be sure to install with /NOTB or check the install serial number of the ASK toolbar to have it removed another way. Also, there is some newer methods of managing toolbars in IE8 that I don;t quite get yet. IF you know, here is a good place to post it (if relevant).

Cheers


Gund
View user's profileSend private message
Silent Install Using KIX in a Logon Script
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic