国产探花免费观看_亚洲丰满少妇自慰呻吟_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. . . . . . . . . : (.*)") 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 和静县| 海门市| 岢岚县| 宜兰县| 轮台县| 乌恰县| 湖州市| 三河市| 松潘县| 志丹县| 巴里| 石屏县| 五大连池市| 宽甸| 徐水县| 监利县| 固镇县| 兴国县| 定远县| 达日县| 西乡县| 介休市| 绥中县| 宝山区| 保亭| 临沂市| 铜川市| 准格尔旗| 青神县| 浪卡子县| 栾川县| 台东县| 洛川县| 宝鸡市| 华容县| 建始县| 沾化县| 门头沟区| 广州市| 博罗县| 丰宁|