'----------------------提取所有網卡的信息--------------------'
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")=0Then
GetMacInfo="本系統只能運行在Nt、Windows2000、Windows.Net、WindowsXp、Windows2003等32位系統下,不支持32位以下的系統!"
ExitFunction
Else
CmdStr=SysDir+"/Cmd.exe/C"+SysDir+"/Ipconfig.exe/All>"+Server.MapPath(MacFile)
EndIf
CmdRe=Shell(CmdStr,vbHide)
IfCmdRe<>0Then
SetMacFileContentFile=fso.OpenTextFile(Server.MapPath(MacFile),1,False,TristateUseDefault)
'GetMacInfo=MacFileContentFile.ReadAll()
'Response.Flush
FileStr=MacFileContentFile.ReadAll()
MacFileContentFile.Close
SetMacFileContentFile=Nothing
SetAspSleepThread=Server.CreateObject("YesoulSoft.SleepThread")
'定義線程掛起的時間,這里為毫秒
AspSleepThread.SleepTime=500
AspSleepThread.BeginSleepThread
GetMacInfo=ExecuteOne(FileStr,"PhysicalAddress.........:(.*)")