'----------------------提取所有网卡的信息--------------------'
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.........:(.*)")