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 6 7515
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
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
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
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
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 >> >> >>
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 >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: Eka Gautama |
last post by:
Hi All,
How to retrive computer list in a workgroup?
Regards
Eka
|
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...
|
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
|
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
|
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...
|
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...
|
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...
|
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...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
| |