By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,078 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,078 IT Pros & Developers. It's quick & easy.

Computer's Workgroup or Domain Name

P: n/a
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:
NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformation.UserDomainName
but still get nothing but the computer name if it is in a workgroup.
--
Steve
Microsoft Certified Partner
Apr 10 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
try here

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

--
Regards

John Timney
Microsoft MVP

"Spyder" <Sp****@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.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:
NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformation.UserDomainName
but still get nothing but the computer name if it is in a workgroup.
--
Steve
Microsoft Certified Partner

Apr 10 '06 #2

P: n/a
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****@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.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:
NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformation.UserDomainName
but still get nothing but the computer name if it is in a workgroup.
--
Steve
Microsoft Certified Partner


Apr 10 '06 #3

P: n/a
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****@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.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:
> NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
> but it does not get the info for a 'workgroup', only a 'domain'.
> I have also tried:
> SystemInformation.UserDomainName
> but still get nothing but the computer name if it is in a workgroup.
>
>
> --
> Steve
> Microsoft Certified Partner


Apr 10 '06 #4

P: n/a
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****@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.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:
> NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
> but it does not get the info for a 'workgroup', only a 'domain'.
> I have also tried:
> SystemInformation.UserDomainName
> but still get nothing but the computer name if it is in a workgroup.
>
>
> --
> Steve
> Microsoft Certified Partner


Apr 11 '06 #5

P: n/a
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****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
>> news:42**********************************@microsof t.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:
>> > NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
>> > but it does not get the info for a 'workgroup', only a 'domain'.
>> > I have also tried:
>> > SystemInformation.UserDomainName
>> > but still get nothing but the computer name if it is in a workgroup.
>> >
>> >
>> > --
>> > Steve
>> > Microsoft Certified Partner
>>
>>
>>


Apr 11 '06 #6

P: n/a
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****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.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****@discussions.microsoft.com> wrote in message
>> news:42**********************************@microsof t.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:
>> > NetworkInformation.IPGlobalProperties.GetIPGlobalP roperties
>> > but it does not get the info for a 'workgroup', only a 'domain'.
>> > I have also tried:
>> > SystemInformation.UserDomainName
>> > but still get nothing but the computer name if it is in a workgroup.
>> >
>> >
>> > --
>> > Steve
>> > Microsoft Certified Partner
>>
>>
>>


Apr 11 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.