Ok, I have been trying to get this to work for a while now, I got this script off of this board a while ago, and it works great on Win2k, & WinXP machines, however kix32 always crashes at the $NAVHome = ReadValue("HKEY_LOCAL_MACHINE\software\INTEL\LANDesk\VirusProtect6\CurrentVersion\", "Home Directory") line on Win9x/ME clients. Now on some clients this key does not exist at all (new un-NAVed computers) Would that cause the script to Fail?
I've done some searching and I have not been able to find a solution. Can anyone point me off in the correct direction?
Here is the script:
code:
; Check Workstation type, exit if server or DC.
;
; Check OS Version, if Win9x goto Workstation Section
; INWIN = WinNT = 1, Win9x = 2
if @INWIN = 2
goto WKS
ENDIF
; Check if logon to Server or Workstation
; PRODUCTTYPE - WinNT = Workstation, ServerNT = Member Server, LanmanNT = Domain Controller
$PRODUCTTYPE = READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\CONTROL\PRODUCTOPTIONS","PRODUCTTYPE")
; if not Workstation, just exit without notice
if $PRODUCTTYPE = "WinNT"
goto WKS
ENDIF
if $PRODUCTTYPE = "ServerNT"
goto END
ENDIF
if $PRODUCTTYPE = "LanmanNT"
goto END
ENDIF
:WKS
IF INGROUP("ZETAFAX USERS") = 1
USE Z: /DELETE
USE Z: "\\NTSERVER\ZFAX$"
ENDIF
IF INGROUP("UPSU") = 1
USE F: /DELETE
USE F: "\\NTSERVER\MAIN"
ENDIF
; Norton Antivirus Specific Section
; checking product version number of vpc32.exe
; if already installed, exit
;
$CurrentBLDVer = "7.60.0.926"
$NAVHome = ReadValue("HKEY_LOCAL_MACHINE\software\INTEL\LANDesk\VirusProtect6\CurrentVersion\", "Home Directory")
;
If GetFileVersion($NAVHome +"\vpc32.exe","ProductVersion") = $CurrentBLDVer
goto GRC
ENDIF
:NAVINST
IF INGROUP("NAV") = 1
USE X: "\\NTSERVER\VPHOME"
SHELL "%COMSPEC% /E:1024 /C"+@LDRIVE+"VPLOGON.BAT" ; Call NAVCE Install Script
ENDIF
GOTO NavDone
:GRC
SHELL "XCOPY X:\GRC.DAT $NAVHome /C /R/ Y"
:NavDone
USE X: /DELETE
SHELL "NET TIME \\DOMAIN /SET /Y"
SLEEP 1
GOTO "END"
:END
exit