Page 1 of 1 1
Topic Options
#1058 - 1999-11-24 04:16 PM Readline in a kixtart script
Anonymous
Unregistered


I have wrote a simple kixtart script which is supposed to read a line from a textfile on the server, then check if that string is the same as the workstation name. However, it isn't reading the line from the text file. When using debug I display what is in the variable it displays blank. Does anybody know what is happening ?

Thanks


Top
#1059 - 1999-11-25 08:44 AM Re: Readline in a kixtart script
Anonymous
Unregistered


Ahayko

It would help all if you posted a copy of the script.

Then others can check it out for you.

Thanks
Rgds

------------------
Don Davidson
Network Engineer
http://www.insight-media.co.uk

Top
#1060 - 1999-11-25 09:53 AM Re: Readline in a kixtart script
Anonymous
Unregistered


I figured out my problem by reading through some of the bulletin board posts,unfortunately my docs say only 0 or 1 is an option for mode when opening a file, there is no mention of opening for read or write etc.
However I have a new problem, My readline is only reading the first line repeatedly, is something else you have to state, or some particular structure the file needs to make it move to the next line?

This time I've include the script

; ******************************************
; **** Virus Management Strategy ****
; **** Nov 24.99 ****
; ******************************************

$LM =@WKSTA
$OS =@INWIN


$Result = open(1,@lserver+"\apps\updates\machines.txt",3)
$x=blank

if $result = 0
;read in list of machines,
$x=Readline(1)

while @Error =0
? "Line Read:["+$x+"]"
? "Local Machine:["+$LM+"]"
if INSTR($x,$LM) = 1
if $OS =1
;check dates of files
if comparefiletimes<files> )=1
copy over def files
RETURN
end if

else
run "w:\apps\updates\antivirus.bat"
RETURN
endif
endif
$x = Readline (1)
? "Line Read:["+$x+"]"
LOOP
close(1)
EXIT 1
end if

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 820 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.153 seconds in which 0.14 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