Your right I would not want to write that to the autoexec.bat file. I want to append some code to the autoexec.bat files for my Windows 95 clients. So far I have:

-----------------------------------------
From the kixtart script:

IF INGROUP ("TESTING-GRP")
RUN "NET USE Z: /DELETE /Y"
RUN "NET USE Z: \\AITSPC12\DEL"
CAll "delete.bat"
ENDIF

------------------------------------------

Delete.bat file:

if exist c:del.chk goto end
endif

if exist c:autoexec.bat ren c:autoexec.bat c:del.chk

$auto=""
open(1,"c:\autoexec.bat")
$line=readline(1)
while @ERROR=0
$string=$string+$line
$line=readline(1)
loop
$null=close(1)

$delstuff=""
open(1,"z:\del\delete.txt")
$line=readline(1)
while @ERROR=0
$string=$string+$line
$line=readline(1)
loop
$null=close(1)

$newaut= $auto + $delstuff

open( 2 ,"c:\Autoexec.bat" , 4)=0
$x = WriteLine( 2 , $newaut )
close (2)
-------------------------------------------

Now the only thing I am usure of is if writeline will write the file.