Thanks for the info Kyder. I downloaded it and looked at it, however, I would really rather not have to copy any more files to the workstations if I can help it.
Maybe I can use some of the ideas though on other things. Thanks again.Here is what I have so far, but I'm not quite up to par with some of you other programmer types..
code:
BREAK ON
$PROFILE = "C:\SCRIPTS\NAVSUP.INI"
$SECTION = "NAVSUPPORT"
$CR = CHR(10)
$LIST = READPROFILESTRING($PROFILE, $SECTION, "" )$RC = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\SharedDefs","NAVCORP_70")
$RC = SUBSTR($RC,INSTR($RC,".")-8,8)
$SendMsg = 'NET SEND $NAVSUP "NOTICE: @USERID (@FULLNAME) logged on to @WKSTA with an IP of @IPADDRESS0. This workstation has VIRUS definition files dated $RC which are over 90 days old.
Please help @FULLNAME update the AntiVirus on this system"'
; Thanks go to Lonkero for this line, amazingly he took my 10+ lines of code and reduced it down to one...
; Kyder helped me extract the contents of the string to a useable manner.
IF ((((@year-2000)*365)+@ydayno)-(((val(SUBSTR($RC,1,4))-2000)*365)+((val(SUBSTR($RC,5,2))-1)*30)+val(SUBSTR($RC,7,2))))>90
GOSUB ALERT
ELSE
?"Your NAV Definitions are $RC"
ENDIF
; Missing something here... No message is sent, but from command line to one user works.
:ALERT
WHILE INSTR ($LIST, $CR) <> 0
$NAVSUP = SUBSTR($LIST,1,INSTR($LIST,$CR)-1)
SHELL $SendMsg
$LIST = SUBSTR($LIST,INSTR($LIST,$CR)+1,LEN($LIST)-INSTR($LIST,$CR))
LOOP
RETURN
Contents of NAVSUP.INI
code:
[NAVSUPPORT]
sup-baf
sup-eds
sup-tld
Sending on the command line to one user works, so I must be messing up the variable some how.
[ 21 August 2001: Message edited by: NTDOC ]