Hello!
I'm trying to find a way to get the complete host domain information that a win32 client workstation is logging in to.
For example:
I'm on a windows NT desktop and logging into a Windows2000 domain. I'd like a way to get the full domain name. The environment variable userdomain gives me part, but not all. If I'm logging into "ABC.MyDomain.com" then userdomain just returns "ABC". I need the fully qualified domain name.
I could use ipconfig /all and get it from "Primary DNS suffix" which doesnt seem to always be present? Or from the Host Name "mycomputer.MyDomain.com" and parse out the .myDomain.com...
I was also thinking it might be in the registry somewhere, I'm going to see if I can find that location documented anywhere and try my first Perl registry lookup! =)
Thanks in advance for any help!
I'm trying to find a way to get the complete host domain information that a win32 client workstation is logging in to.
For example:
I'm on a windows NT desktop and logging into a Windows2000 domain. I'd like a way to get the full domain name. The environment variable userdomain gives me part, but not all. If I'm logging into "ABC.MyDomain.com" then userdomain just returns "ABC". I need the fully qualified domain name.
I could use ipconfig /all and get it from "Primary DNS suffix" which doesnt seem to always be present? Or from the Host Name "mycomputer.MyDomain.com" and parse out the .myDomain.com...
I was also thinking it might be in the registry somewhere, I'm going to see if I can find that location documented anywhere and try my first Perl registry lookup! =)
Thanks in advance for any help!