-
PublicfunctiongetMacinfo ()
onerrorresumenext
dimfso, filestr, aspsleepthread, cmdstr, sysdir, wshshell, cmdre, macfilecontentfile, macfilecontent
constmacfile = "tmpyesoulsoft001.llp"
setfso = server.createObject ("Scripting.FilesYstemObject")
sysdir = split (globalmod.getsysdir, ",", ") (1)
ifinstr (lcase (sysdir), "system32") = 0 แล้ว
getMacInfo = "ระบบนี้สามารถทำงานได้ภายใต้ระบบ 32 บิตเช่น NT, Windows2000, Windows.net, WindowsXP, Windows2003 และไม่รองรับระบบต่ำกว่า 32 บิต!"
exitfunction
อื่น
CMDSTR = sysdir+"/cmd.exe/c"+sysdir+"/ipconfig.exe/all>"+server.mappath (macfile)
endif
cmdre = เชลล์ (cmdstr, vbhide)
ifcmdre <> 0 แล้ว
setMacFileContentFile = fso.opentextfile (Server.mappath (MacFile), 1, False, Tristateusedefault)
'getMacinfo = macFileContentFile.readall ()
'ตอบสนองฟลัช
filestr = macFileContentFile.readall ()
macFileContentFile.close
setMacFileContentFile = ไม่มีอะไร
setAspSleEpThread = server.createObject ("Yesoulsoft.sleepThread"))
'กำหนดเวลาที่เธรดถูกระงับนี่คือมิลลิวินาที
Aspsleepthread.sleeptime = 500
aspsleepthread.beginsleepthread
getMacinfo = executeOne (filestr, "physicalAddress ......... : (.*)")