国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

使用ASP獲得服務器網卡的MAC地址信息

2024-05-04 10:58:33
字體:
來源:轉載
供稿:網友
'----------------------提取所有網卡的信息--------------------' 

Public Function GetMacInfo() 
    On Error Resume Next 

    Dim fso, FileStr, AspSleepThread, CmdStr, SysDir, wshshell, CmdRe, MacFileContentFile, MacFileContent 
    Const MacFile = "TmpYesoulSoft001.LLP" 
    Set fso = Server.CreateObject("Scripting.FileSystemObject") 

    SysDir = Split(GlobalMod.GetSysDir, ",")(1) 
            If InStr(LCase(SysDir), "system32") = 0 Then 
            GetMacInfo = "本系統只能運行在Nt、Windows 2000、Windows.Net、Windows Xp、Windows 2003等32位系統下,不支持32位以下的系統!" 
            Exit Function 
            Else 
            CmdStr = SysDir + "/Cmd.exe /C " + SysDir + "/Ipconfig.exe /All > " + Server.MapPath(MacFile) 
            End If 
        CmdRe = Shell(CmdStr, vbHide) 
        If CmdRe <> 0 Then 
        Set MacFileContentFile = fso.OpenTextFile(Server.MapPath(MacFile), 1, False, TristateUseDefault) 
        'GetMacInfo = MacFileContentFile.ReadAll() 
        'Response.Flush 
        FileStr = MacFileContentFile.ReadAll() 
        MacFileContentFile.Close 
        Set MacFileContentFile = Nothing 
        Set AspSleepThread = Server.CreateObject("YesoulSoft.SleepThread") 
        '定義線程掛起的時間,這里為毫秒 
        AspSleepThread.SleepTime = 500 
        AspSleepThread.BeginSleepThread 
        GetMacInfo = ExecuteOne(FileStr, "Physical Address. . . . . . . . . : (.*)") 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 贡山| 成都市| 哈巴河县| 宾阳县| 贵溪市| 达日县| 启东市| 保定市| 凤山县| 元阳县| 海口市| 金溪县| 兖州市| 射洪县| 海宁市| 宝山区| 榆社县| 咸丰县| 钟祥市| 青海省| 黔南| 合江县| 罗平县| 军事| 子洲县| 湖口县| 高雄市| 泰顺县| 肇源县| 丰顺县| 沅江市| 内黄县| 曲阜市| 图们市| 鄯善县| 浙江省| 黔江区| 定襄县| 天门市| 南安市| 喀喇沁旗|