mbouchard Posted March 3, 2006 Posted March 3, 2006 I am trying to figure out how to determine if a PC is a member of a domain or not while logged in as the local Administrator. So, @LogonDNSDomain, @LogonDomain, and @LogonServer would not work as it reports the local computer name. Thanks, Mike
Joon Posted March 3, 2006 Posted March 3, 2006 I don't know AutoIt well enough to make API call. But you can use NetGetJoinInformation in NETAPI32.DLL to get the join status. It returns 1 for Workgroup and 2 for Domain. Good luck.
mbouchard Posted March 6, 2006 Author Posted March 6, 2006 excerpt from one of my scripts... $sDefaultDomain = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters","Domain")Thanks, works for what I needed.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now