it's not that difficult... well, at least the solution i came up with isn't anyways...
it's a lil bit of a hack, but effective enough... a simple, almost too obvious method for retreiving results of anything that a dos command can obtain...
all it does is write a batch file to automate the dos ipconfig command, and pipes the output to a file... then that file is read in... the MAC address should appear...
copy and paste into the ide and run it...
; -------------------------------- reserve some space... i don't think i'll need more
; than 33 lines of text
Dim myInfo$(33)
;--------------------------------- nothing really, just a pointer to the home dir
;
HomeDir$="c:\progra~1\blitz3d"
; -------------------------------- set up a window
;
Graphics 640,480,16
; -------------------------------- first we're gonna build a bat. file for execution
; which will pipe the dos command ipconfig to a file
;
myInfoFile=WriteFile(homeDir+"GetMyInfo.Bat")
a$="ipconfig.exe/all>"+ homeDir + "myinfo.txt"
WriteLine(myInfoFile,A$)
CloseFile(myInfoFile)
; -------------------------------- ok, that done, we're ready to exec it
;
Print ""
Print " dos bat file ready... press any key to run"
WaitKey()
ExecFile(HomeDir+"GetMyInfo.bat")
Cls
Print " info file printed... press any key to read"
WaitKey()
;Print sysDir$ + "ipconfig/all > " + homeDir + "myinfo.txt"
; -------------------------------- read in the file created and print out the info
;
Cls
info=ReadFile("c:\progra~1\Blitz3d\myinfo.txt")
While Not Eof(info)
myInfo$(x)=ReadLine(info)
Print myinfo$(x)
Wend
Print ""
Print " info file deleted... "
Print ""
Print " you can write your own parsing code to get the info you need"
Print ""
Print " press any key to end"
Print ""
Print ""
Print ""
Print " ( another lil bit of madness from the mind of Mike Hense )"
DeleteFile(homeDir+"GetMyInfo.Bat")
WaitKey()
End
i think that there's a way to have the dos command execute quietly (no popup window)... and i'm sure that there are other options to the command which you could use...
also, you'll have to come up with your own parsing routine to extract the mac address (the physical address line)... sorry :) it should be easy though... just test each line for the string "Physical Address" and go o from there...
@ JD...
a few software licenses are dependent on this sorta stuff... i know this can be a bit of a pain, especiallywhen your hardware changes, but what's wrong with simply contacting the vendor, and telling em that you've changed machines... usually they'll give you a new key... some of em allow for two keys anyway...
i think PaceMaker uses something similar...
--Mike