473,545 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Computer's Workgroup or Domain Name

When you go to "MyComputer " and get properties and select "Computer Name",
you get the Domain or Workgroup a computer belongs to.
I have looked thru MSDN library, the Internet, the Registry and in all files
on my computer and cannot find how to retrieve this information in VB.Net
2005.

This information is essential for our system implementation.
I have tried:
NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformati on.UserDomainNa me
but still get nothing but the computer name if it is in a workgroup.
--
Steve
Microsoft Certified Partner
Apr 10 '06 #1
6 7658
try here

http://www.planet-source-code.com/vb...4560&lngWId=10

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:42******** *************** ***********@mic rosoft.com...
When you go to "MyComputer " and get properties and select "Computer Name",
you get the Domain or Workgroup a computer belongs to.
I have looked thru MSDN library, the Internet, the Registry and in all
files
on my computer and cannot find how to retrieve this information in VB.Net
2005.

This information is essential for our system implementation.
I have tried:
NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformati on.UserDomainNa me
but still get nothing but the computer name if it is in a workgroup.
--
Steve
Microsoft Certified Partner

Apr 10 '06 #2
The app returned the computer's name on the pc that is just part of a
workgroup.
On my dev machine, it returned the domain name.

--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
try here

http://www.planet-source-code.com/vb...4560&lngWId=10

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:42******** *************** ***********@mic rosoft.com...
When you go to "MyComputer " and get properties and select "Computer Name",
you get the Domain or Workgroup a computer belongs to.
I have looked thru MSDN library, the Internet, the Registry and in all
files
on my computer and cannot find how to retrieve this information in VB.Net
2005.

This information is essential for our system implementation.
I have tried:
NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformati on.UserDomainNa me
but still get nothing but the computer name if it is in a workgroup.
--
Steve
Microsoft Certified Partner


Apr 10 '06 #3
I think if your not logged into a domain, you will only get the computer
name - is your dev machine in a domain?

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:53******** *************** ***********@mic rosoft.com...
The app returned the computer's name on the pc that is just part of a
workgroup.
On my dev machine, it returned the domain name.

--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
try here

http://www.planet-source-code.com/vb...4560&lngWId=10

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:42******** *************** ***********@mic rosoft.com...
> When you go to "MyComputer " and get properties and select "Computer
> Name",
> you get the Domain or Workgroup a computer belongs to.
> I have looked thru MSDN library, the Internet, the Registry and in all
> files
> on my computer and cannot find how to retrieve this information in
> VB.Net
> 2005.
>
> This information is essential for our system implementation.
> I have tried:
> NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
> but it does not get the info for a 'workgroup', only a 'domain'.
> I have also tried:
> SystemInformati on.UserDomainNa me
> but still get nothing but the computer name if it is in a workgroup.
>
>
> --
> Steve
> Microsoft Certified Partner


Apr 10 '06 #4
The computers I need the workgroup name from are not part of a domain.
I can clearly see the name in the properties dialog box, so, I know it's
somehow set on the computer. I just have found no way to retrieve it.

--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
I think if your not logged into a domain, you will only get the computer
name - is your dev machine in a domain?

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:53******** *************** ***********@mic rosoft.com...
The app returned the computer's name on the pc that is just part of a
workgroup.
On my dev machine, it returned the domain name.

--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
try here

http://www.planet-source-code.com/vb...4560&lngWId=10

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:42******** *************** ***********@mic rosoft.com...
> When you go to "MyComputer " and get properties and select "Computer
> Name",
> you get the Domain or Workgroup a computer belongs to.
> I have looked thru MSDN library, the Internet, the Registry and in all
> files
> on my computer and cannot find how to retrieve this information in
> VB.Net
> 2005.
>
> This information is essential for our system implementation.
> I have tried:
> NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
> but it does not get the info for a 'workgroup', only a 'domain'.
> I have also tried:
> SystemInformati on.UserDomainNa me
> but still get nothing but the computer name if it is in a workgroup.
>
>
> --
> Steve
> Microsoft Certified Partner


Apr 11 '06 #5
Theres a post here from another MVP that should help you, it uses the
Management namespace and WMI, so its a better example.

Give that a try

http://www.pcreview.co.uk/forums/thread-1225748.php

Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:DF******** *************** ***********@mic rosoft.com...
The computers I need the workgroup name from are not part of a domain.
I can clearly see the name in the properties dialog box, so, I know it's
somehow set on the computer. I just have found no way to retrieve it.

--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
I think if your not logged into a domain, you will only get the computer
name - is your dev machine in a domain?

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:53******** *************** ***********@mic rosoft.com...
> The app returned the computer's name on the pc that is just part of a
> workgroup.
> On my dev machine, it returned the domain name.
>
> --
> Steve
> Microsoft Certified Partner
>
>
> "John Timney ( MVP )" wrote:
>
>> try here
>>
>> http://www.planet-source-code.com/vb...4560&lngWId=10
>>
>> --
>> Regards
>>
>> John Timney
>> Microsoft MVP
>>
>> "Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
>> news:42******** *************** ***********@mic rosoft.com...
>> > When you go to "MyComputer " and get properties and select "Computer
>> > Name",
>> > you get the Domain or Workgroup a computer belongs to.
>> > I have looked thru MSDN library, the Internet, the Registry and in
>> > all
>> > files
>> > on my computer and cannot find how to retrieve this information in
>> > VB.Net
>> > 2005.
>> >
>> > This information is essential for our system implementation.
>> > I have tried:
>> > NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
>> > but it does not get the info for a 'workgroup', only a 'domain'.
>> > I have also tried:
>> > SystemInformati on.UserDomainNa me
>> > but still get nothing but the computer name if it is in a workgroup.
>> >
>> >
>> > --
>> > Steve
>> > Microsoft Certified Partner
>>
>>
>>


Apr 11 '06 #6
That last link did the trick.
I am very VERY thankful to you, my friend.
--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
Theres a post here from another MVP that should help you, it uses the
Management namespace and WMI, so its a better example.

Give that a try

http://www.pcreview.co.uk/forums/thread-1225748.php

Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:DF******** *************** ***********@mic rosoft.com...
The computers I need the workgroup name from are not part of a domain.
I can clearly see the name in the properties dialog box, so, I know it's
somehow set on the computer. I just have found no way to retrieve it.

--
Steve
Microsoft Certified Partner
"John Timney ( MVP )" wrote:
I think if your not logged into a domain, you will only get the computer
name - is your dev machine in a domain?

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
news:53******** *************** ***********@mic rosoft.com...
> The app returned the computer's name on the pc that is just part of a
> workgroup.
> On my dev machine, it returned the domain name.
>
> --
> Steve
> Microsoft Certified Partner
>
>
> "John Timney ( MVP )" wrote:
>
>> try here
>>
>> http://www.planet-source-code.com/vb...4560&lngWId=10
>>
>> --
>> Regards
>>
>> John Timney
>> Microsoft MVP
>>
>> "Spyder" <Sp****@discuss ions.microsoft. com> wrote in message
>> news:42******** *************** ***********@mic rosoft.com...
>> > When you go to "MyComputer " and get properties and select "Computer
>> > Name",
>> > you get the Domain or Workgroup a computer belongs to.
>> > I have looked thru MSDN library, the Internet, the Registry and in
>> > all
>> > files
>> > on my computer and cannot find how to retrieve this information in
>> > VB.Net
>> > 2005.
>> >
>> > This information is essential for our system implementation.
>> > I have tried:
>> > NetworkInformat ion.IPGlobalPro perties.GetIPGl obalProperties
>> > but it does not get the info for a 'workgroup', only a 'domain'.
>> > I have also tried:
>> > SystemInformati on.UserDomainNa me
>> > but still get nothing but the computer name if it is in a workgroup.
>> >
>> >
>> > --
>> > Steve
>> > Microsoft Certified Partner
>>
>>
>>


Apr 11 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2011
by: Shannon McMillan | last post by:
Hey, I want to change the name and workgroup/domain of a computer at first boot prior to winlogon. I've written code that will successfully change the computer's name and workgroup/domain, but I'm having problems trying to work out how this may then be implemented prior to a user logging on. Any suggestions would be greatly appreciated. ...
3
5706
by: Eka Gautama | last post by:
Hi All, How to retrive computer list in a workgroup? Regards Eka
3
4724
by: Mark | last post by:
I have a server in a workgroup (called "wg"). Does anyone know how to find the name of the workgroup from code (pref c#)? I've trawled the newsgroups and the MSDN site for the right class / method / property to use but I just can't find the right one. There are plenty (such as UserDomainName) that give me the server name, but none that I can...
5
71391
by: Gonçalo Boléo | last post by:
How can i get the name of my computer? Is there any class that gives me access to properties like ComputerName, Workgroup, Domain? thnaks, Gonçalo Boléo
1
1509
by: Manoj | last post by:
Hi, How can we get info as to if a terminal is on a workgroup or a domain and the name of the domain\workgroup in windows 2000 professional through code thanks in advance Manoj
2
1265
by: Frederik | last post by:
Hi all, Situation: - 2 computers behind router/switch - dhcp enabled on router - computer name 1 = cpuA (WinXP Pro) - computer name 2 = cpuB (WinXP Home) - cpuA and cpuB can access each other's resources - cpuA runs IIS with asp.net website
9
5234
by: John | last post by:
Tried this on microsoft.public.access.gettingstarted - no response - perhaps more appropriate here. I'm not a database user, simply helping someone get started with a new computer. The old computer (win98se) runs a database in MS Access 97 pro, with all the attendant permissions etc. I can work on the database without problems, once...
1
16347
by: schaf | last post by:
Hi all! I'm still trying to start/stop a service on a remote computer. (I promiss that's the last new post because of this problem from my side) My situation: I've an application running under the user paul (pw:paul123) on the computer A in the domain ABC. This application should stop / start a service, which is running on computer B (in...
0
1400
AnuSumesh
by: AnuSumesh | last post by:
Hi All, I want code for : whether server is in workgroup or in domain and then i want to get the workgroup/domian name of server. I am using c#. I know the code for getting domain name but how to get workgroupname? Can anyone help me plz?
0
7453
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7742
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4940
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3436
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1007
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.