Can someone tell me how I can retrieve the domain name a machine belongs to???
Is there a specfic NET API that I could use
I really need this badly so if someone has any suggestions it would be greatly appreciated...
Thanks
tcompe
Printable View
Can someone tell me how I can retrieve the domain name a machine belongs to???
Is there a specfic NET API that I could use
I really need this badly so if someone has any suggestions it would be greatly appreciated...
Thanks
tcompe
What's your platform? NT has API functions available to do this, but Win9x does not.
Sorry...forgot to mention that
NT
NetAPI32.dll has a function called NetWkstaUserGetInfo which, when called with the parameter "level" set to 1101 return a space seperated list of domains accessed by the workstation. This may work for you. I've never used it in VB, so maybe someone who has can help you with the call.
Almost forgot...
take a look at HKEY_LOCAL_MACHINE\Security\Provider
i'm running Win NT workstation 4 (sp3). i don't have a provider hive under the security hive. In fact, my security folder is empty. could it be permissions? I'm not sure how that could be, I am in the admin group on the local machine.
oh well.
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
Maybe do an Edit...Find on your registry for the name of your domain?
I found it in these two places:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CachePrimaryDomain
Just FYI.
Thanks,
john
John Pirkey
MCSD
www.ShallowWaterSystems.com