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

隨筆 - 89  文章 - 118  trackbacks - 0
<2008年7月>
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

留言簿(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>
            9l国产精品久久久久麻豆| 欧美视频中文字幕在线| 久久国内精品视频| 欧美成人嫩草网站| 国产精品久久久一区二区三区| 激情综合亚洲| 欧美一区二区三区四区高清 | 亚洲人成免费| 久久爱www| 99国内精品久久| 国产精品久久999| 亚洲精选成人| 西西人体一区二区| 亚洲美女中文字幕| 欧美成人免费小视频| 99这里只有精品| 欧美激情网站在线观看| 久久国产精品色婷婷| 亚洲激情在线观看视频免费| 久久久久久久综合日本| 欧美国产日韩一二三区| 欧美精品97| 亚洲美女视频在线观看| 亚洲一区精品视频| 国产精品porn| 一区二区三区视频在线观看| 亚洲精品女人| 羞羞视频在线观看欧美| 欧美在线视频免费播放| 国产欧美一二三区| 欧美一区二区三区久久精品茉莉花| 欧美一区国产在线| 国产亚洲欧洲997久久综合| 久久精品91久久久久久再现| 亚洲影院色无极综合| 亚洲成人资源网| 欧美www视频| 欧美阿v一级看视频| 香蕉久久国产| 欧美精品在线网站| 亚洲一二三区精品| 亚洲一区二区三区午夜| 亚洲精品乱码久久久久久黑人| 欧美激情在线播放| 国产亚洲欧美日韩一区二区| 亚洲精品免费网站| 亚洲大胆美女视频| 欧美一级在线视频| 亚洲欧美在线x视频| 欧美在线|欧美| 亚洲欧美韩国| 久久久精品久久久久| 亚洲人成精品久久久久| 久久国产手机看片| 久久精品国产亚洲一区二区三区 | 99视频国产精品免费观看| 在线日韩成人| 久久久久久**毛片大全| 亚洲毛片一区| 欧美不卡在线| 欧美国产极速在线| 欧美色精品天天在线观看视频 | 宅男噜噜噜66一区二区66| 麻豆国产精品777777在线| 99国产一区| 欧美一级免费视频| 午夜免费电影一区在线观看| 欧美日韩在线综合| 一区二区高清在线| 在线日韩电影| 狼人社综合社区| 午夜国产精品影院在线观看 | 欧美黄色一区| 欧美一区激情| 国产欧美精品在线播放| 亚洲欧美日韩爽爽影院| 亚洲日本va午夜在线影院| 麻豆成人在线播放| 亚洲国产老妈| 黄色成人在线网址| 中文精品在线| 99国内精品| 欧美亚洲第一区| 性欧美xxxx视频在线观看| 日韩午夜在线电影| 欧美日韩色综合| 亚洲高清在线精品| 狠狠色狠狠色综合| 久久综合伊人77777麻豆| 亚洲高清视频在线观看| 亚洲网站在线播放| 国产欧美一区二区精品仙草咪| 欧美在线影院| 亚洲精品女人| 亚洲午夜伦理| 精品盗摄一区二区三区| 欧美黄网免费在线观看| 亚洲社区在线观看| 免费成人在线视频网站| 国产综合色产| 欧美中文在线观看| 亚洲黑丝在线| 久久久国产精品一区二区中文| 亚洲国产成人精品视频| 久久夜色精品国产欧美乱极品| 久久国产福利| 一本一本久久a久久精品综合妖精 一本一本久久a久久精品综合麻豆 | 欧美+亚洲+精品+三区| 久久午夜av| 欲色影视综合吧| 久久久久久**毛片大全| 99精品国产热久久91蜜凸| 老司机亚洲精品| 亚洲电影观看| 国产精品一二一区| 性色av一区二区三区在线观看 | 一区二区三区波多野结衣在线观看| 国产精品视频男人的天堂| 亚洲一区三区在线观看| 亚洲国产1区| 久久躁狠狠躁夜夜爽| 亚洲一区欧美| 国产三区精品| 久久伊人精品天天| 亚洲主播在线观看| 免费观看国产成人| 欧美在线观看视频| 亚洲欧美激情视频| 一区二区三区四区国产精品| 亚洲国产综合在线看不卡| 韩国成人福利片在线播放| 国产精品视频区| 欧美午夜在线视频| 欧美日韩免费在线| 欧美国产亚洲精品久久久8v| 久久全国免费视频| 久久久久久亚洲精品不卡4k岛国| 亚洲影视在线播放| 亚洲一区免费| 亚洲午夜激情免费视频| 美女免费视频一区| 老牛国产精品一区的观看方式| 久久国产精品久久精品国产 | 亚洲欧洲日产国产网站| 精品动漫3d一区二区三区| 国产亚洲一区二区三区| 国产一区在线观看视频| 国语精品一区| 精品1区2区| 亚洲二区免费| 亚洲精品欧美日韩专区| 亚洲精品一区二区三区99| 日韩视频免费观看高清在线视频| 最新国产拍偷乱拍精品| 日韩一区二区精品| 中国亚洲黄色| 亚洲激情黄色| 日韩视频在线一区二区| 一本久久综合亚洲鲁鲁五月天| 亚洲视频大全| 欧美一区二区啪啪| 久久综合色天天久久综合图片| 久久久夜色精品亚洲| 欧美成人蜜桃| 亚洲精品美女久久久久| 9久re热视频在线精品| 午夜精品亚洲| 快she精品国产999| 欧美性一区二区| 国产日韩欧美不卡| 精品动漫3d一区二区三区免费| 亚洲日本中文字幕区| 亚洲免费在线视频| 麻豆国产精品777777在线| 亚洲人在线视频| 香蕉久久一区二区不卡无毒影院| 久久久久国产精品人| 欧美日韩免费在线| 国产在线一区二区三区四区| 亚洲卡通欧美制服中文| 欧美在线视频导航| 亚洲电影免费观看高清完整版在线观看| 日韩视频一区二区在线观看 | 欧美性做爰毛片| 精品成人在线| 亚洲欧美电影在线观看| 猫咪成人在线观看| 亚洲桃花岛网站| 欧美成va人片在线观看| 国产日本欧美一区二区| 亚洲精品资源| 麻豆av福利av久久av| 在线亚洲一区| 欧美va天堂| 国内精品一区二区三区| 亚洲午夜黄色| 亚洲国产专区| 久久亚洲影音av资源网| 国产亚洲精品自拍| 亚洲午夜精品久久久久久app|