Forum Discussion

simonaferrara's avatar
Frequent Contributor
2 years ago

Retrieve the domain of the logged-in user

Hi all,   I've got the need to retrieve the domain of the user logged-in within the machine, that is: not the domain of the machine, but the domain of the user, that could be the HostName if the us...
  • Irfan182's avatar
    2 years ago

    Try the following:


    sUserDomain = aqEnvironment.GetEnvironmentVariable("USERDOMAIN")