Page 1 of 1 1
Topic Options
#30143 - 2002-10-03 09:11 PM Calling vplogon.bat for Symantec
MaxGen Offline
Lurker

Registered: 2002-10-03
Posts: 2
Hi,

I'm having a great deal of trouble keeping my users Virus software up to date.

I've tried the recommended:

(After mapping T:)

SHELL T:\vplogon.bat
and
SHELL "%comspec% /e:1024 /c T:\vplogon.bat"
and even
SHELL ("%comspec% /c T:\vp_LOG32 /p=T:")

In all instances, the command seems to execute correctly. I see the message that "A new version has been foundon the server". The unfortunate part is that nothing seems to happen after that. NAV doesn't update... Instead, the script completes and the user get's their desktop.

Can anyone offer any insight as to what is wrong?

I'm using KiXtart 3.63, I'll include the NAV portion of my script

Thanks in advance,

;--------------------------------------------------------------------------------
;
; Norton Antivirus Install/Check
;
;--------------------------------------------------------------------------------
;
;First we check in in NoNav group. If in Group, install will exit.
;
IF INGROUP ("NoNav") GOTO FINISH ENDIF
;Now we install
;
?
? Checking Norton Antivirus........
;
Use T: /Delete
Use T: \\CAZFSM01\VPLOGON
SHELL ("%comspec% /c T:\vp_LOG32 /p=T:")
Use T: /Delete
:FINISH

Top
#30144 - 2002-10-03 09:13 PM Re: Calling vplogon.bat for Symantec
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Does the user actually have proper rights to update the AV software?

Also, please take a look at the KiXtart Manual for the correct SHELL syntax, since only the middle one is actually correct.

[ 03. October 2002, 21:15: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#30145 - 2002-10-04 02:12 AM Re: Calling vplogon.bat for Symantec
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you search the board you'll find lots of NAV install scripts including mine. Basically, I emulate the functionality of the VPLOGON.BAT in KiX.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#30146 - 2002-10-04 07:49 AM Re: Calling vplogon.bat for Symantec
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Hello MaxGen and welcome to the board.

Take a look at these...

grc.dat norton antivirus

Has anyone done scripts for NAV 7.6 yet?

Ripping the NAV pattern date and version from the registry

Howto, if file A or B don't exist do this....??

How to make sense of the virus definition version

ReadValue problems - Norton AntiVirus

Hope one or more of these are helpful for you.

Once again... Welcome to the board and I hope your stay here is as good as mine has been.

Top
#30147 - 2002-10-04 06:41 PM Re: Calling vplogon.bat for Symantec
MaxGen Offline
Lurker

Registered: 2002-10-03
Posts: 2
Thanks Guys! It's working now.

I had tried some of the other script methods ie: GetFileVersion but it hadn't worked.

I've given up on the vplogon.bat method and debuged my read value problems. It's working like a charm now.

I'll include the code in case it helps someone else out in the future.
Almost all of it was pieced together from other members scripts. Thanks to all of you..

;--------------------------------------------------------------------------------
;
; Norton Antivirus Install/Check
;
;--------------------------------------------------------------------------------
;
;First we check to see if user is logging on to the File server
;
$PRODUCTTYPE =
READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\CONTROL\PRODUCTOPTIONS","PRODUCTTY
PE")
if $PRODUCTTYPE = "ServerNT" GOTO FINISH ENDIF
;
;Now we check in in NoNav group. If in Group, install will exit.
;
IF INGROUP ("NoNav") GOTO FINISH ENDIF
;
;Now we check installed version
;
?
? "Checking Norton Antivirus........"
Sleep 3
;
$currentbuildver = "7.60.00.926"
$NAVHome = ReadValue("HKEY_LOCAL_MACHINE\software\INTEL\LANDesk\VirusProtect6\CurrentVersion\", "Home Directory")
;
If GetFileVersion($NAVHome +"\vpc32.exe","ProductVersion") = $currentbuildver
goto FINISH
ENDIF
;
; If version not equal, newer version is installed
;
:NAVINST
;
RUN "%COMSPEC% /E:1024 /C \\cazfsm01\distribute\nav732.exe" ; Call NAVCE Install Package
;
;
MESSAGEBOX("A newer version of Anti-Virus software has been found on the server. Please wait while the newer version installs on your PC. Please note, the PC will automatically reboot once installation is complete. Approximatly 30 to 60 seconds", "Norton AntiVirus Installation...",64,45)
;
:FINISH

Top
#30148 - 2002-10-04 08:19 PM Re: Calling vplogon.bat for Symantec
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You could use @PRDUCTTYPE for a more granular operating system check instead of the registry read.
_________________________
There are two types of vessels, submarines and targets.

Top
#30149 - 2002-10-14 11:14 PM Re: Calling vplogon.bat for Symantec
mps581 Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 12
Loc: Atlanta, GA
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


Top
#30150 - 2002-10-14 11:36 PM Re: Calling vplogon.bat for Symantec
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Are you sure about the last back-slash '\' in the registry key?
_________________________
There are two types of vessels, submarines and targets.

Top
#30151 - 2002-10-15 12:30 AM Re: Calling vplogon.bat for Symantec
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
hmmm... Looks like it might be at least part of my script, but I have this:

$NavHomeDir = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion","Home Directory")

and mine works on all the MS OS versions.

Top
#30152 - 2002-10-15 12:31 AM Re: Calling vplogon.bat for Symantec
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Portions of that script look familiar. [Embarrassed] Yes that trailing '\' is the culprit. Here's the right way:

$currentbuildver = "7.61.00.932"
$NAVHome = ReadValue("HKEY_LOCAL_MACHINE\software\INTEL\LANDesk\VirusProtect6\CurrentVersion", "Home Directory")
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#30153 - 2002-10-15 12:52 AM Re: Calling vplogon.bat for Symantec
mps581 Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 12
Loc: Atlanta, GA
Thanks for the suggestions, but it's still not working for me... (Only on Windows 9x) I get a kix32c has performed an illegal operation... message.

This key that it is looking for does not exist. It should ignore it, and move on right?

Here is the latest version:
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"
$NavHomeDir = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion","Home Directory")
;
If GetFileVersion($NavHomeDir +"\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


Top
#30154 - 2002-10-15 12:59 AM Re: Calling vplogon.bat for Symantec
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Put a pause before your SHELL to see if it gets there. ALternately turn on debug and and step throught it.

"Made it here!" ?
Get $_
SHELL...
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#30155 - 2002-10-15 01:02 AM Re: Calling vplogon.bat for Symantec
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
You can't UNMAP or MAP the Z: drive as it is used by the logon process.

Change the drive letters you're trying to use. Then try again.

Also, why are you even going through all this trouble if in the end your still using VPLOGON.BAT to install? The main purpose of using a KiXtart script it to remove the dependancy of using VPLOGON.BAT

Top
#30156 - 2002-10-15 01:06 AM Re: Calling vplogon.bat for Symantec
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Good eye Ron! Missed that Z thingy.

I don't care to use VPLOGON.BAT and use the following instead

USE L: /DELETE
USE L: "\\FFRAS\vplogon"
SHELL "L:\vp_LOG32 /p=L:"

Ron, I believe, on the other hand prefers to use Packager and package up an install.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#30157 - 2002-10-15 01:27 AM Re: Calling vplogon.bat for Symantec
mps581 Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 12
Loc: Atlanta, GA
Ok, NTDOC was right, it was the Z drive mapping issue. I was stepping through it to find the error, and it was crashing at the $NAVHome line before I changed the drive letter. I changed it to Q and it works fine now.

So, anyone know why it was not crashing until ~12 lines after the problematic line in the script?

Thanks again for all the help...

Top
#30158 - 2002-10-15 06:36 PM Re: Calling vplogon.bat for Symantec
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
As a side note, the 'NET TIME' will fail under Windows NT/2000/XP if the user does not have the right to change the time (must be at least Power User).
_________________________
There are two types of vessels, submarines and targets.

Top
#30159 - 2002-10-15 07:28 PM Re: Calling vplogon.bat for Symantec
cmarti Offline
Hey THIS is FUN

Registered: 2001-02-26
Posts: 297
Loc: Little Rock, AR
If what symantec told me is true all the vplogon.bat file does is check the value of a registry key which can be done by checking for a valu of..
code:
  
"HKEY_LOCAL_MACHINE\Software\Symantec\InstalledApps","NAVCEClientNUMBER"

If that key isn't there here's how I install NAV..
code:
If @INWIN = "1"
Shell "\\navserver\vphome\clt-inst\win32\INSTMSIW /Q"
Else
Shell "\\navserver\vphome\clt-inst\win32\INSTMSIA /Q"
EndIf
Shell "%COMSPEC% /C START \\navserver\vphome\clt-inst\win32\NAVCE.MSI REBOOT="+Chr(34)+"FORCE"+Chr(34)+" /QN"

The first part checks the windows installer, installs it if needed, it then loads nav and reboots automatically after the installation.

L8tr...

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 661 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.066 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org