dear everyone
my windows application needs the limited user to login as administrator...

so i made a form with username, password, domain. then i logged in as administrator ..

the problem is that while running the application for the first time it gives a domain name "NT AUTHORITY" but my domain name is "JOHN"..

but after closing the application and open it again it gives my true domain name "JOHN"


i tried to use this code to get domain name

Code:
string domain_name=Environment.UserDomainName;
i tried to use also this code

Code:
                string sTempUser = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
                if (sTempUser.IndexOf("\\") != -1)
                {
                    string[] aryUser = new String[2];
                    char[] splitter = { '\\' };
                    aryUser = sTempUser.Split(splitter);
                   string domain_name = aryUser[0];

                }
i want to know how i can get my domain name IN FIRST time as it is in next time of executing the program??