I thought I'd take another look at this in the sober light of dawn, and now it's starting to look like a bad dream. Yesterday, I ripped the code to my home machine and had weird results. Today at work, I can't get it to mess up. Go figure!

I have found that sometimes something weird ends up somewhere in the white space that can't be seen but trips up KiX. You can stare at the code till you're bule in the face and can't find anything wrong with it. Retype it, word for word, and it works! Well, this is my theory and I'm sticking to it!

Here's what works for me today:

code:

Break on

; *** Variables ***
$CHK = "Neither"
$ChkNavService = '%comspec% /c %windir%\pv.exe -q >C:\RC.TXT'
$StopNavService = 'NET STOP "Norton AntiVirus Client"'
$StartNavService = 'NET START "Norton AntiVirus Client"'
SHELL $ChkNavService
$logfile = "C:\RC.TXT"
$ = OPEN(1,$logfile,2)
IF @error = 0
$x = READLINE(1)
IF $x
DO
SELECT
CASE instr($x,"rtvscan.exe")
$CHK = "NAVNT"
CASE instr($x,"rtvscn95.exe")
$CHK = "NAV9X"
CASE 1
ENDSELECT
$x = READLINE(1)
UNTIL @error
ENDIF
ENDIF
$ = CLOSE (1)
SELECT
CASE $CHK = "NAVNT"
? "NAV is "$CHK
? "This should say NAVNT"
GOTO END
case $CHK = "NAV9X"
? "NAV is "$CHK
? "This should say NAV9X"
GOTO END
case 1
;unknown problem
? "NAV is "$CHK
? "This should say nothing. File entry was not found, that is why this is displaying."
GOTO END
ENDSELECT
:END

get $


p.s. I read somewhere that when using CASE, you always should have a 'true' CASE at the bottom JIC all others are false.

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