473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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:
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
6 7632
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
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...
3
by: Eka Gautama | last post by:
Hi All, How to retrive computer list in a workgroup? Regards Eka
3
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...
5
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
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
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...
9
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.