Hey guys,
I have been having trouble with my boot disk script ever since I added the machines data to the script.
Everything works fine in the script but now it won't write to the log file. that is the only trouble I am having. Here is 2 samples of one that works without the machien data and 1 that does not work with the machine data.

Case 1 that works.
code:
 
;===================================
;***** Last Modified on 8/12/2002 at 10:56:29 AM by Whetrick *****
;===================================

Break ON

:start
$count = 0
$Numhds = %numhds%

Sleep 1
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n

AT ( 6,25) "1. Reload Windows 2000 V5.5"
AT ( 7,25) "2. Test New Windows 2000 Version"
AT ( 8,25) "3. Load Windows 2000 Visual Age"
AT ( 9,25) "4. Load Windows 2000 V5.5 for Disaster Recovery"
AT (10,25) "5. Log Computer to Inventory file"
AT (11,25) "6. Surplus Machine info and Wipe Hard drive"
AT (13,25) "x. Exit to DOS"
Color w/n
AT (17,25) "Enter 1-6 or 'x' to quit"

Get $jump
While $jump <> 'x' AND ($jump < '1' OR $jump > '6')
Get $jump
Loop

Goto $jump

:1 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 6,25) "ReLoading Windows 2000"
Shell "%comspec% /c echo @DATE @TIME,Reloaded,None,sysprep,5.5,N/A,@Address >> h:\cinfo.txt"
Shell "%comspec% /c Call I:\win2k.bat"
Goto start

:2 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 6,25) "Loading Windows 2000 for Test Machine"
Shell "%comspec% /c echo @DATE @TIME,Reloaded,None,sysprep,5.5,N/A,@Address >> h:\cinfo.txt"
Shell "%comspec% /c Call I:\dc5.1\win2k.bat"
Goto start

:3 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 7,25) "Loading Windows 2000 Visual Age"
Shell "%comspec% /c echo @DATE @TIME,Reload,Reload,Visual Age ,4.0,N/A,@Address >> h:\cinfo.txt"
Shell "%comspec% /c call I:\va.bat"
Goto start

:4 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 7,25) "Loading Windows Disaster Recovery"
Shell "%comspec% /c echo @DATE @TIME,Disaster,Recovery,sysprep,5.5,N/A,@Address >> h:\cinfo.txt"
Shell "%comspec% /c call I:\win2k.bat"
Goto start

:5 ; run
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 8,25) "Log machine info"
AT (10,25) "Would you like to log machine"
AT (11,25) "Info for disaster recovery?"
AT (12,25) "1. Yes"
AT (13,25) "2. NO"
Color w/n
AT (15,25) "Enter 1 or 2"

Get $jump
While ($jump < '1' OR $jump > '2')
Get $jump
Loop
If $jump = '1'
Shell "%comspec% /c echo @DATE @TIME,Disaster,Recovery,sysprep,5.5,N/A,@Address >> h:\cinfo.txt"
Else
Shell "%comspec% /c echo @DATE @TIME,Reloaded,None,sysprep,5.5,N/A,@Address >> h:\cinfo.txt"
EndIf

CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 7,25) "Logging Machine info to file"
Goto X

:6 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 8,25) "Surplus Machine info"
AT (10,25) "This will Erase the hard drive completely"
AT (11,25) "Are you sure you want to continue?"
AT (12,25) "1. Yes"
AT (13,25) "2. NO"
Color w/n
AT (15,25) "Enter 1 or 2"

Get $jump
While ($jump < '1' OR $jump > '2')
Get $jump
Loop
; AT (20,0) "Please wait! This will take some time. The computer will reboot when finished."
If $jump = '1'
Shell "%comspec% /c echo @DATE @TIME,Surplus,Surplus,Wiped Drive,Clean,N/A,@Address >> h:\cinfo.txt"
CLS
While $count <> $numhds
Shell "%comspec% /c a:\wipe.com $count < a:\yes.dat"
$count = $count + 1
Loop
Shell "%comspec% /c a:\aefdisk.exe /reboot >> a:\wipe.log"
Else
Goto X
EndIf

Exit 1

:X ; run
CLS
Color w/n
Box(8,20,15,50,single)
AT (10,25) " Exiting to DOS"
Sleep 1
CLS
Exit

Case 2 that does not work.
code:
 ;===================================
;***** Last Modified on 8/15/2002 at 1:17:32 PM by Whetrick *****
;===================================

Break ON

:start
$count = 0
$check = 0
$Numhds = %numhds%
$Allsize = %allsize%
Sleep 1
CLS
If Exist ("q:\bin\smbios.txt")
Open (1,"q:\bin\smbios.txt")
While $check <> '28'
$Check = $check + 1
$X = ReadLine(1)
Loop
$Manu = ReadLine(1)
$Model = ReadLine(1)
$version = ReadLine(1)
$Serial = ReadLine(1)
Close(1)
EndIf
$MANU = SubStr($MANU,26,Len($manu))
$Manu = SubStr($manu,1,Len($manu)-1)
Set "manu = $manu"

$Model = SubStr($model,26,Len($model))
$Model = SubStr($Model,1,Len($Model)-1)

$version = SubStr($version,26,Len($version))
$version = SubStr($version,1,Len($version)-1)
$addtwo = $model + " " + $version
Set "model = $addtwo"

$Serial = SubStr($Serial,26,Len($Serial))
$Serial = SubStr($Serial,1,Len($Serial)-1)
SetL "serial = $serial"

:menu
Color b/n
Box(0,0,24,80,grid)
Color g/n
; AT ( 1,17) $MANU " "$MODEL " "$VERSION " "$SERIAL
AT ( 4,23) "The number of Hard drives are " $Numhds
AT ( 5,23) "The Size(s) of the drives are " $Allsize
AT ( 6,23) "1. Reload Windows 2000 V5.5"
AT ( 7,23) "2. Test New Windows 2000 Version"
AT ( 8,23) "3. Load Windows 2000 Visual Age"
AT ( 9,23) "4. Load Windows 2000 V5.5 for Disaster Recovery"
AT (10,23) "5. Log Computer to Inventory file"
AT (11,23) "6. Surplus Machine info and Wipe Hard drive"
AT (13,23) "x. Exit to DOS"
Color w/n
AT (17,23) "Enter 1-6 or 'x' to quit"

Get $jump
While $jump <> 'x' AND ($jump < '1' OR $jump > '6')
Get $jump
Loop

Goto $jump

:1 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 6,25) "ReLoading Windows 2000"
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Reloaded,None,sysprep,5.5,N/A,@Address,$Manu,$model,$serial >> h:\cinfo.txt"
Shell "%comspec% /c /e:1024 Call I:\win2k.bat"
Goto start

:2 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 6,25) "Loading Windows 2000 for Test Machine"
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Reloaded,None,sysprep,5.5,N/A,@Address,$Manu,$model,$serial >> h:\cinfo.txt"
Shell "%comspec% /c /e:1024 Call I:\dc5.1\win2k.bat"
Goto start

:3 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 7,25) "Loading Windows 2000 Visual Age"
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Reload,Reload,Visual Age ,4.0,N/A,@Address,$Manu,$model,$serial >> h:\cinfo.txt"
Shell "%comspec% /c /e:1024 call I:\va.bat"
Goto start

:4 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 7,25) "Loading Windows Disaster Recovery"
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Disaster,Recovery,sysprep,5.5,N/A,@Address,$Manu,$model,$serial >> h:\cinfo.txt"
Shell "%comspec% /c /e:1024 call I:\win2k.bat"
Goto start

:5 ; run
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 8,25) "Log machine info"
AT (10,25) "Would you like to log machine"
AT (11,25) "Info for disaster recovery?"
AT (12,25) "1. Yes"
AT (13,25) "2. NO"
Color w/n
AT (15,25) "Enter 1 or 2"

Get $jump
While ($jump < '1' OR $jump > '2')
Get $jump
Loop
If $jump = '1'
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Disaster,Recovery,sysprep,5.5,N/A,@Address,%model%,%serial%, >> h:\cinfo.txt"
Else
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Reloaded,None,sysprep,5.5,N/A,@Address,$Manu,$model,$serial, >> h:\cinfo.txt"
EndIf

CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 7,25) "Logging Machine info to file"
Goto menu

:6 ; run
CLS
Color b/n
Box(0,0,24,80,grid)
Color g/n
AT ( 8,25) "Surplus Machine info"
AT (10,25) "This will Erase the hard drive completely"
AT (11,25) "Are you sure you want to continue?"
AT (12,25) "1. Yes"
AT (13,25) "2. NO"
Color w/n
AT (15,25) "Enter 1 or 2"

Get $jump
While ($jump < '1' OR $jump > '2')
Get $jump
Loop
If $jump = '1'
Shell "%comspec% /c /e:1024 echo @DATE @TIME,Surplus,Surplus,Wiped Drive,Clean,N/A,@Address,$Manu,$model,$serial >> h:\cinfo.txt"
CLS
While $count <> $numhds
Shell "%comspec% /c q:\bin\wipe.com $count < q:\bin\yes.dat"
$count = $count + 1
Loop
Shell "%comspec% /c q:\bin\aefdisk.exe /reboot >> a:\wipe.log"
Else
Goto X
EndIf

Exit 1

:X ; run
CLS
Color w/n
Box(8,20,15,50,single)
AT (11,27) " Exiting to DOS"
Sleep 1
CLS
Exit

_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!