JamesT,
My apology for jumping into your thread with this long post.

Masken,
VPLog32.exe is the installer that VPLogon.bat would have called. No this part of the script does not run at every logon. I write the version to the registry and check it to see if install is required.

At the top of the script, I check if installed:

code:

$currentbuildver = "7.50.00.846"
$regbuildver = ReadValue("HKEY_LOCAL_MACHINE\software\symantec", "regbuildver")
if $regbuildver = $currentbuildver goto finish endif

After the install, I write to the registry:

code:

;to make clear that we've been here before
WriteValue("HKEY_LOCAL_MACHINE\software\symantec", "regbuildver",$currentbuildver,"REG_SZ")


I can't test for an exit code on the install to see if sucessful because it runs in the backgroung silently. I have code in the script to check version as follows:

code:

;checking product version number of rvtscan.exe (equals build number)
;if client is NT/2000, $versionNT gets filled with the NAV CE version number
;if client is 9x, $version9X gets filled
;finally, the version number is put in $buildver, independent of the client platform
;
$versionNT = GetFileVersion("c:\program files\navnt\vpc32.exe","ProductVersion")
$version9X = GetFileVersion("c:\program files\norton antivirus\vpc32.exe","ProductVersion")
if $versionNT <> ""
$buildver = $versionNT
endif
if $version9X <> ""
$buildver = $version9X
endif
;
? "NAV CE build " + $buildver
;
;-----------------------------------------------------------------------------------
;we compare the version number of the client to the latest build version

if $buildver = $currentbuildver
" is up-to-date!"
? " "
goto finish
else
" needs updating!"
? " "
endif


I can't take credit for the script as most of it was written by the Original author, Kristof Vermeire. I simply modified to suit.

VPLog32.exe works for all 32 bit platforms, Win9x/NT/2K.

Ah, what the heck, I may as well post the whole script:

code:

SETCONSOLE("MINIMIZE")
;-----------------------------------------------------------------------------------
; Norton Antivirus Corporate Edition 7.x Updater - KiXtart 32
; version 1.0
; 11-Dec-2000
; Original author: Kristof Vermeire - kristof.vermeire@azstlucas.be
; (C) 2000 - AZ Sint-Lucas Hospital Ghent (Belgium)
;
; Modified by Les Ligetfalvy
;
;-----------------------------------------------------------------------------------
;update is executed only when user is NOT in the global group "NO_NAV"
;this can be left out if everyone should get the update
;
IF INGROUP("NO_NAV") goto finish ENDIF
;-----------------------------------------------------------------------------------
; check if already installed and if so exit
;
$currentbuildver = "7.50.00.846"
$regbuildver = ReadValue("HKEY_LOCAL_MACHINE\software\symantec", "regbuildver")
if $regbuildver = $currentbuildver goto finish endif
;-----------------------------------------------------------------------------------
; - check OS WinNT = 1, Win95 = 2
;
if @INWIN = 2 goto OSRightsOK endif
;-----------------------------------------------------------------------------------
;must not be Win95, therefor must be WinNT so more checks are in order
;-----------------------------------------------------------------------------------
; - 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 $PRODUCTTYPE = "WinNT" goto NTwks endif
;
;if logon to server as non-admin, just exit without notice (for WTS users) else nag and exit
;
if INGROUP ("Domain Admins") <> 2 goto finish
beep
MessageBox("NOTICE!" + Chr(13) + "YOU ARE LOGGED ON TO A SERVER, installation aborting!" + Chr(13) + "Maybe you should add yourself to the Global group NO_NAV","Norton AntiVirus 7.5 Install",48,60)
goto finish
ENDIF
;-----------------------------------------------------------------------------------
:NTwks
; - check if NT User has Local Admin rights
;
if INGROUP ("\\" + @WKSTA + "\Administrators") = 2 goto OSRightsOK
else
beep
MessageBox("NOTICE!" + Chr(13) + "Insufficient rights, installation aborting!" + Chr(13) + "Please notify the FF HelpDesk at ext. 1864","Norton AntiVirus 7.5 Install",48,60)
goto finish
endif
;-----------------------------------------------------------------------------------
:OSRightsOK
; - check if VP5 is installed
;
$vp5uninstall = "C:\Program Files\LANDesk\VP5\vpremove.exe"
$isvp5installed = ReadValue("HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\ldvp 5.0", "uninstallstring")
if $isvp5installed <> $vp5uninstall goto skipuninstall
endif
if @INWIN = 2
MessageBox("NOTICE!" + Chr(13) + "LANDesk Virus Protect must first be uninstalled." + Chr(13) + "System must REBOOT when complete!" + Chr(13) + "Choose Yes to uninstall and Yes to reboot" + Chr(13) + "on the two options that follow","Norton AntiVirus 7.5 Install",48,60)
RUN "C:\Program Files\LANDesk\VP5\vpremove.exe"
goto finish
endif
RUN "C:\Program Files\LANDesk\VP5\vpremove.exe"
sleep( 1 )
setfocus("Uninstall Message")
sendkeys({ENTER})
sleep( 15 )
setfocus("Uninstall Message")
sendkeys({ENTER})
endif
;
:skipuninstall
;-----------------------------------------------------------------------------------
; - check if MS Installer is up-to-date (needed for NAV CE 7.5 and later)
;
;we simply declare the current build level here and use it throughout the script
$currentbuildver = "7.50.00.846"
$returncode = existkey("HKEY_LOCAL_MACHINE\software\symantec")
if $returncode <> 0 addkey("HKEY_LOCAL_MACHINE\software\symantec")
endif
;-----------------------------------------------------------------------------------
;now we prevent the 'double update' by checking our own registry key value
;
$regbuildver = ReadValue("HKEY_LOCAL_MACHINE\software\symantec", "regbuildver")
if $regbuildver = $currentbuildver goto finish endif
;
CLS
;-----------------------------------------------------------------------------------
;checking product version number of rvtscan.exe (equals build number)
;if client is NT/2000, $versionNT gets filled with the NAV CE version number
;if client is 9x, $version9X gets filled
;finally, the version number is put in $buildver, independent of the client platform
;
$versionNT = GetFileVersion("c:\program files\navnt\vpc32.exe","ProductVersion")
$version9X = GetFileVersion("c:\program files\norton antivirus\vpc32.exe","ProductVersion")
if $versionNT <> ""
$buildver = $versionNT
endif
if $version9X <> ""
$buildver = $version9X
endif
;
? "NAV CE build " + $buildver
;
;-----------------------------------------------------------------------------------
;we compare the version number of the client to the latest build version

if $buildver = $currentbuildver
" is up-to-date!"
? " "
goto finish
else
" needs updating!"
? " "
endif
;
;----------------------------------------------------------------------------------
;if regMSI = 1, we already updated MS Installer

$regMSI = ReadValue("HKEY_LOCAL_MACHINE\software\symantec", "regMSI")
if $regMSI = "1" goto moveon2 endif
;----------------------------------------------------------------------------------
;now we will install the most recent MS Installer build
;
WriteValue("HKEY_LOCAL_MACHINE\software\symantec", "regMSI","1","REG_SZ")
;----------------------------------------------------------------------------------
;creation of network drive map L: => this is \\FFRAS\vplogon
USE L: /DELETE
USE L: "\\FFRAS\vphome"
;run the version specific to the OS
if @INWIN = 2
SHELL("L:\clt-inst\win32\instmsia.exe /q")
else
SHELL("L:\clt-inst\win32\instmsiw.exe /q")
endif
;
:moveon2
;----------------------------------------------------------------------------------
;we have an older build on the client so we need to perform the update
;beep and emulate vplogon.bat for 32-bit clients
;
beep
if @INWIN = 2
MessageBox("NOTICE!" + Chr(13) + "NAV silent install will run in the background." + Chr(13) + "System will REBOOT automatically when complete!","Norton AntiVirus 7.5 Install",48,60)
else
MessageBox("NAV silent install will run in the background." + Chr(13) + "You may continue working.","Norton AntiVirus 7.5 Install",48,60)
endif
USE L: /DELETE
USE L: "\\FFRAS\vplogon"
SHELL("L:\vp_LOG32 /p=L:")
;
;----------------------------------------------------------------------------------
;we don't want the 'double update', so we write our own registry key value
;to make clear that we've been here before
WriteValue("HKEY_LOCAL_MACHINE\software\symantec", "regbuildver",$currentbuildver,"REG_SZ")

:finish


_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.