|
Hi All, it's me again.
I have been tasked with converting a logon.bat into KIX (which I am a novice at best). The login.bat currently checks a txt file to see if a PC exists in this file. If it does, it exits....if it doesn't exist, it runs the bat file. It also sends email if the user selects not to run the bat file (I found some info that Bryce posted for BLAT that I will try).
So here's what I have tried:
FIRST TRY ;Open(3, @WKSTA + "\uk-scripts\exclude.txt", 3) = 0 ;If @ERROR=0 ;$X=ReadLine(3) ;IF $X = @WKSTA ; GOTO END ; ELSE ; $Message = "It works!" ; ENDIF ;:END SECOND TRY $Value = "\uk-scripts\exclude.txt" + @WKSTA" If Open(1, $Value) = 0 $Read = ReadLine(1) CLOSE(1) IF $Value = $Read GOTO END ENDIF ELSE $Message = "It works!" ENDIF :END THIRD TRY IF Open(1, "\uk-scripts\exclude.txt") = 0 $x = Readline(1) WHILE @ERROR = 0 IF InStr($x, @WKSTA) CLOSE(1) GOTO END ENDIF ELSE $Message = "It works!" ENDIF :END
I'm sure this is simple enough, but I'm at my wits end and don't have any hair left.
|