青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

隨筆 - 89  文章 - 118  trackbacks - 0
<2011年8月>
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910

留言簿(16)

隨筆分類(56)

隨筆檔案(89)

文章分類

推薦博客

搜索

  •  

最新隨筆

最新評論

閱讀排行榜

判斷用戶登陸的是域還是工作組

原創作品,允許轉載,轉載時請務必以超鏈接形式標明文章 原始出處 、作者信息和本聲明。否則將追究法律責任。http://okhelper.blog.51cto.com/313500/197249
Set objshell = CreateObject("wscript.shell")

strDomainDnsName = LCase(objshell.ExpandEnvironmentStrings("%USERDNSDOMAIN%"))

If strDomainDnsName = "%USERDNSDOMAIN%" Then    
  WScript.Echo "workgroup"
    
Else
  WScript.Echo "Domain"
    
End if

本文出自 “okhelper” 博客,請務必保留此出處http://okhelper.blog.51cto.com/313500/197249


注意:下面的鏈接提供了7種方法


http://www.robvanderwoude.com/vbstech_network_names_domain.php

Environment Variable
VBScript Code:
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strUserDomain = wshShell.ExpandEnvironmentStrings( "%USERDOMAIN%" )
WScript.Echo "User Domain: " & strUserDomain
Requirements:
Windows version: NT 4, 2000, XP, Server 2003, Vista or Server 2008
Network: Stand-alone, workgroup, NT domain, or AD
Client software: N/A
Script Engine: WSH
Summarized: Works in Windows NT 4 or later, *.vbs with CSCRIPT.EXE or WSCRIPT.EXE only.
Doesn't work in Windows 95, 98 or ME, nor in Internet Explorer (HTAs).
 
[Back to the top of this page]
 
WshNetwork
VBScript Code:
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strUserDomain = wshNetwork.UserDomain
WScript.Echo "User Domain: " & strUserDomain
Requirements:
Windows version: Windows 98, ME, NT 4, 2000, XP, Server 2003, Vista, Server 2008
Network: Stand-alone, workgroup, NT domain, or AD
Client software: Windows Script 5.6 for Windows 98, ME, and NT 4 (no longer available for download?)
Script Engine: WSH
Summarized: Works in Windows 98 or later, *.vbs with CSCRIPT.EXE or WSCRIPT.EXE only.
Doesn't work in Windows 95, nor in Internet Explorer (HTAs).
 
[Back to the top of this page]
 
ADSI (WinNTSystemInfo)
VBScript Code:
Set objSysInfo = CreateObject( "WinNTSystemInfo" )
strUserDomain = objSysInfo.DomainName
WScript.Echo "User Domain: " & strUserDomain
Requirements:
Windows version: 2000, XP, Server 2003, Vista or Server 2008 (95, 98, ME, NT 4 with Active Directory client extension)
Network: Stand-alone, workgroup, NT domain, or AD
Client software: Active Directory client extension for Windows 95, 98, ME or NT 4
Script Engine: any
Summarized: Can work in any Windows version, but Active Directory client extension is required for Windows 95, 98, ME or NT 4.
Can be used in *.vbs with CSCRIPT.EXE or WSCRIPT.EXE, as well as in HTAs.
 
[Back to the top of this page]
 
ADSI (ADSystemInfo)
VBScript Code:
Set objSysInfo = CreateObject( "ADSystemInfo" )
strUserDomain = objSysInfo.DomainName
WScript.Echo "User Domain: " & strUserDomain
Requirements:
Windows version: 2000, XP, Server 2003, Vista or Server 2008 (95, 98, ME, NT 4 with Active Directory client extension)
Network: Only AD domain members
Client software: Active Directory client extension for Windows 95, 98, ME or NT 4
Script Engine: any
Summarized: For AD domain members only.
Can work in any Windows version, but Active Directory client extension is required for Windows 95, 98, ME or NT 4 SP4.
Can be used in *.vbs with CSCRIPT.EXE or WSCRIPT.EXE, as well as in HTAs.
Doesn't work on stand-alones, workgroup members or members of NT domains.
 
[Back to the top of this page]
 
WMI (Win32_ComputerSystem)
VBScript Code:
Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" )
Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem", , 48 )
For Each objItem in colItems
    strComputerDomain = objItem.Domain
    If objItem.PartOfDomain Then
        WScript.Echo "Computer Domain: " & strComputerDomain
    Else
        WScript.Echo "Workgroup: " & strComputerDomain
    End If
Next
Requirements:
Windows version: XP, Server 2003, Vista or Server 2008
Network: Stand-alone, workgroup, NT domain, or AD
Client software: N/A
Script Engine: any
Summarized: Works in Windows XP and later.
Can be used in *.vbs with CSCRIPT.EXE or WSCRIPT.EXE, as well as in HTAs.
 
[Back to the top of this page]
 
WMI (Win32_NTDomain)
VBScript Code:
Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" )
Set colItems = objWMISvc.ExecQuery( "Select * from Win32_NTDomain", , 48 )
For Each objItem in colItems
    strComputerDomain = objItem.DomainName
    WScript.Echo "Computer Domain: " & strComputerDomain
Next
Requirements:
Windows version: XP, Server 2003, Vista or Server 2008
Network: NT domain, or AD
Client software: N/A
Script Engine: any
Summarized: Will work only on AD or NT domain members running Windows XP or later.
Can be used in *.vbs with CSCRIPT.EXE or WSCRIPT.EXE, as well as in HTAs.
Doesn't work in Windows 95, 98, ME, NT 4, or 2000.
Doesn't work on stand-alones or workgroup members.
 
[Back to the top of this page]
 
System Scripting Runtime
VBScript Code:
Set objIP = CreateObject( "SScripting.IPNetwork" )
strComputerDomain = objIP.Domain
WScript.Echo "Computer Domain: " & strComputerDomain
Requirements:
Windows version: any
Network: TCP/IP
Client software: System Scripting Runtime
Script Engine: any
Summarized: Works in any Windows version with System Scripting Runtime is installed, with any script engine.


posted on 2011-09-26 10:09 胡滿超 閱讀(772) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美成人午夜激情在线| 免费观看成人www动漫视频| 亚洲人成人99网站| 你懂的国产精品永久在线| 亚洲高清不卡| 亚洲国产99| 欧美视频一区二区三区四区| 亚洲女性喷水在线观看一区| 亚洲欧美日韩在线高清直播| 国产亚洲美州欧州综合国| 久久综合久久综合久久| 久久综合色婷婷| 日韩视频第一页| 亚洲影院在线| 亚洲国产成人av| 亚洲免费黄色| 国产亚洲激情视频在线| 蜜臀久久久99精品久久久久久 | 欧美福利小视频| 欧美精品成人一区二区在线观看| 一区二区三区回区在观看免费视频| 一本久久知道综合久久| 国产亚洲欧美另类一区二区三区| 鲁大师成人一区二区三区| 欧美黄在线观看| 欧美在线观看网址综合| 女女同性女同一区二区三区91| 亚洲视频综合在线| 久久久久成人精品免费播放动漫| 亚洲美女色禁图| 亚洲欧美综合另类中字| 亚洲日韩视频| 欧美一区二区三区在线免费观看| 日韩午夜免费| 久久久久久伊人| 亚洲欧美日本另类| 女仆av观看一区| 久久国产日本精品| 欧美日韩午夜在线| 鲁鲁狠狠狠7777一区二区| 国产精品福利在线观看| 欧美激情视频网站| 国产一区成人| 亚洲午夜小视频| 99在线精品免费视频九九视| 欧美在线3区| 亚洲欧美日韩在线不卡| 欧美精品一区二区三区蜜桃 | 一本色道久久综合亚洲精品按摩| 欧美亚洲视频在线观看| 亚洲综合导航| 欧美美女日韩| 亚洲国产精品999| 在线国产欧美| 久久精品国产2020观看福利| 午夜亚洲伦理| 国产精品欧美日韩一区二区| 日韩视频一区二区三区| 亚洲精品你懂的| 久久一二三四| 久久综合一区二区三区| 国产日韩精品视频一区二区三区| 国产精品99久久久久久久vr | 狠狠综合久久av一区二区小说| 中文一区在线| 亚洲欧美另类中文字幕| 欧美性色视频在线| 亚洲天堂网在线观看| 亚洲影视中文字幕| 国产精品家庭影院| 亚洲一区二区视频在线观看| 亚洲午夜性刺激影院| 欧美日韩另类字幕中文| 亚洲三级电影全部在线观看高清 | 欧美日韩午夜剧场| 亚洲精品视频一区| 亚洲一区二区欧美日韩| 欧美午夜无遮挡| 亚洲一区二区免费在线| 欧美主播一区二区三区美女 久久精品人| 国产精品久久99| 亚洲欧美一级二级三级| 久久三级视频| 亚洲欧洲一区二区三区| 欧美极品一区| 亚洲性xxxx| 久久亚洲精品一区| 亚洲黄色免费| 欧美日韩一区二区三区在线视频 | 一本久道久久久| 欧美一区在线视频| 影音先锋中文字幕一区| 欧美美女日韩| 欧美亚洲视频一区二区| 欧美成人蜜桃| 亚洲免费一在线| 一区二区三区在线观看欧美 | 亚洲欧美久久久久一区二区三区| 久久成人免费日本黄色| 亚洲激情电影中文字幕| 欧美日韩一区自拍| 久久精品一区二区国产| 亚洲激情视频网| 欧美在线关看| 亚洲精品一区二区在线观看| 国产精品美女黄网| 久久精品亚洲精品| a4yy欧美一区二区三区| 免费久久精品视频| 亚洲免费视频在线观看| 亚洲国产精品久久久久秋霞影院 | 欧美日韩免费一区| 久久精品视频免费播放| 亚洲三级色网| 卡一卡二国产精品| 午夜精品亚洲一区二区三区嫩草| 悠悠资源网久久精品| 国产精品大片免费观看| 久久亚洲精品中文字幕冲田杏梨| 亚洲少妇一区| 亚洲国产精品专区久久| 久久精彩视频| 亚洲在线视频一区| 亚洲美女视频在线免费观看| 国产亚洲激情在线| 国产精品伦子伦免费视频| 久久久亚洲国产天美传媒修理工| 亚洲伊人久久综合| 亚洲乱码国产乱码精品精天堂| 久久久久久久久久久久久女国产乱| 中日韩美女免费视频网址在线观看 | 美日韩精品视频| 欧美在线亚洲一区| 亚洲自拍三区| 亚洲视频免费看| 9久草视频在线视频精品| 亚洲第一免费播放区| 久久综合网络一区二区| 久久久久91| 久久久久国产成人精品亚洲午夜| 亚洲欧美日韩区| 亚洲欧美中日韩| 亚洲字幕一区二区| 亚洲一区二区在线| 亚洲一区国产视频| 亚洲欧美国产视频| 亚洲影视中文字幕| 午夜精品一区二区三区在线| 亚洲男人的天堂在线| 亚洲欧美在线另类| 欧美专区在线播放| 久久久久国产一区二区三区四区| 欧美亚洲免费在线| 久久av一区二区三区亚洲| 欧美一级大片在线观看| 午夜日韩激情| 久久亚洲色图| 欧美大片在线观看一区二区| 亚洲电影第1页| 亚洲人线精品午夜| 在线亚洲高清视频| 先锋影音久久久| 久久久久青草大香线综合精品| 久久一区二区三区四区| 欧美高潮视频| 国产精品久久久久久超碰| 国产一区美女| 亚洲黄色小视频| 亚洲午夜视频| 久久久久久尹人网香蕉| 农村妇女精品| 一本色道久久综合精品竹菊 | 日韩视频欧美视频| 亚洲影院高清在线| 久久亚洲国产成人| 欧美日本亚洲| 国产在线视频欧美一区二区三区| 91久久精品一区二区别| 亚洲欧美激情精品一区二区| 久久在精品线影院精品国产| 亚洲国产欧美一区二区三区久久| 一区二区三区精品久久久| 久久精品国产精品亚洲精品| 欧美大片一区二区三区| 国产精品草莓在线免费观看| 激情自拍一区| 亚洲图片欧美日产| 裸体素人女欧美日韩| 日韩午夜av电影| 久久精品视频在线| 国产精品乱人伦中文| 亚洲国产精品久久久久秋霞影院 | 亚洲精品国产品国语在线app| 亚洲伊人伊色伊影伊综合网| 鲁大师成人一区二区三区| 在线亚洲激情| 欧美成人精品在线观看| 国产日韩欧美综合| 亚洲无人区一区| 欧美激情乱人伦|