BTW, Not all sections have been fleshed out, but you'll get the idea.
code:
;Generate DEBUG script
$CRLF=chr(13)+chr(10)
del "c:\temp\debug.scr"
$=open(1, "c:\temp\debug.scr", 5)
$=writeline(1, "d f000:a306 a69f"+$CRLF) ;compaq en 400
$=writeline(1, "d f000:15f9 164d"+$CRLF) ;compaq en 600
$=writeline(1, "d f000:65a0 67a0"+$CRLF) ;dell laptop
$=writeline(1, "q"+$CRLF)
$=close(1)
sleep 1? "running debug"
shell "cmd /c debug <c:\temp\debug.scr >c:\temp\@wksta.res"
$Output =""
$=open(1, "c:\temp\@wksta.res")
$ = readline(1)
$line = readline(1)
while $line <> "-q"
$cline =substr($line, 62, 16)
$Output = "$output"+"$cline"
$line = readline(1)
if substr($line,1,2)="-d"
if instr("$output","dell")>0 or instr("$output","compaq")>0
? " found it"
$=close(1)
goto "parse"
endif
$Output =""
endif
? "looping"
loop
$=close(1)
arse
$output=ltrim("$output")
$output=rtrim("$output")
select
case substr($Output,1,6)="compaq" ;compaq en 400
$make =substr($Output,1,6)
$model =substr($Output,56,17)
$serial=substr($Output,74,12)
$bios =substr($Output,14,8)
$chip =substr($Output,878,13)
$speed =substr($Output,907,7)
case substr($Output,1,6)="compaq" ;compaq en 600
$make =substr($Output,1,6)
$model =substr($Output,56,17)
$serial=substr($Output,74,12)
$bios =substr($Output,14,8)
$chip =substr($Output,878,13)
$speed =substr($Output,907,7)
case instr("$output","dell")
$make =""
$model =""
$serial=""
$bios =""
$chip =""
$speed =""
endselect
? $Output
?
? $make
? $model
? $serial
? $bios
? $chip
? $speed
?
get $k