Get biosid
Posted: Sat Sep 13, 2003 5:48 pm
Code updated For 5.20+
Code: Select all
; GetBiosid()
; by sec
; Many thank to Sebi
Procedure.s GetBIOSid()
temppath.s=Space(1024)
GetTempPath_(1024,@temppath)
If Right(temppath,1)<>"\"
temppath+"\"
EndIf
;Extract data to a file
If CreateFile(0,temppath+"getid.com")
WriteData(0,?CData,?CDataEnd-?CData)
CloseFile(0)
EndIf
;run getid.com
RunProgram(temppath+"getid.com"," >getid.res","",1|2)
;delete file com
DeleteFile(temppath+"getid.com")
;read the result
If ReadFile(0,temppath+"getid.res")
result.s=ReadString(0)
CloseFile(0)
Else
result.s=""
EndIf
;delete file with result
DeleteFile(temppath+"getid.res")
;return the result
ProcedureReturn result
;code for the com ( CHANGED!!! )
DataSection
CData:
Data.b 184,0,240,142,216,190,113,236,138,20,128
Data.b 250,0,116,7,180,2,205,33,70,235,242,195
CDataEnd:
EndDataSection
EndProcedure
Debug GetBIOSid()