获取PC注册的域/工作组名称 [英] Get Domain/Workgroup name of PC Registration

查看:101
本文介绍了获取PC注册的域/工作组名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取计算机已注册的工作组或域的名称


谢谢

Mark Hollander


谢谢

Mark Hollander

解决方案

On 2004年7月14日星期三16:44:12 +0200,Mark Hollander< ma ** @ atcom.co.za>写道:

$ b $b¤我如何获得计算机具有的工作组或域的名称
$ b $b¤已注册。

¤


以下使用ADSI:


Dim SystemInfo As Object


SystemInfo = CreateObject (ADSystemInfo)

Console.WriteLine(SystemInfo.DomainShortName)

保罗~~~ pc ****** @ ameritech.net

Microsoft MVP(Visual Basic)


你可以也使用WMI ...


将计算机视为新的WMISample.ROOT.CIMV2.ComputerSystem

computer.path =

System.Management.ManagementPath(" MyComp\root\CIMV 2:Win32_ComputerSystem.Nam

e ="" MyComp""")


Messagebox.Show(computer.Domain)//显示域名或工作组名称)


Telmo Sampaio


" ; Mark Hollander <毫安** @ atcom.co.za>在消息中写道

news:si ******************************** @ 4ax.com ...

如何获取计算机已注册的工作组或域的名称。

谢谢
Mark Hollander

谢谢
Mark Hollander



问题是我无法在

Windows98 / WindowsME机器。


有没有其他方法可以获得工作组/域名


谢谢

Mark Hollander


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!

How do I get the name of the Workgroup or Domain that the computer has
been registered in.

Thank you
Mark Hollander

Thank you
Mark Hollander

解决方案

On Wed, 14 Jul 2004 16:44:12 +0200, Mark Hollander <ma**@atcom.co.za> wrote:

¤ How do I get the name of the Workgroup or Domain that the computer has
¤ been registered in.
¤

The following uses ADSI:

Dim SystemInfo As Object

SystemInfo = CreateObject("ADSystemInfo")
Console.WriteLine(SystemInfo.DomainShortName)
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


You can use WMI as well...

Dim computer as New WMISample.ROOT.CIMV2.ComputerSystem

computer.path =
System.Management.ManagementPath("MyComp\root\CIMV 2:Win32_ComputerSystem.Nam
e=""MyComp""")

Messagebox.Show(computer.Domain) //Shows Domain name or Workgroup name)

Telmo Sampaio

"Mark Hollander" <ma**@atcom.co.za> wrote in message
news:si********************************@4ax.com...

How do I get the name of the Workgroup or Domain that the computer has
been registered in.

Thank you
Mark Hollander

Thank you
Mark Hollander



The problem is that I cannot use these 2 examples on a
Windows98/WindowsME machine.

Is there any other way I can get the Workgroup/Domain name

Thank You
Mark Hollander

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于获取PC注册的域/工作组名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆