How to get network domain
Posted on 2005-05-04
I need to know how to get the network domain of the machine the user is logged into. I'm using a windows API to get the username logged in to the local machine but I need to get the NT network username and domain instead of the local windows account that's logged in (in the case of say, a VPN connection). We have an issue where all of our users using an application aren't on the same domain and we want the application to check the network domain and kick them out if they're not authenticated to it.
Right now, I have a Visual Basic program setup using a reference to the windows script host to get the domain in that application. If there is no better way to do it in PowerBuilder (through API's already included in Windows) or if not... can someone walk me through setting up a reference to the windows script host in PowerBuilder (I'm passing this PowerBuilder information on to ) and the syntax to create the object. I'm passing this information onto a programmer who has PowerBuilder (I do not).
I've put 500 on this question due to time constraints... Thank you in advance.