Forum Discussion

simonaferrara's avatar
simonaferrara
Frequent Contributor
3 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
    3 years ago

    Try the following:

     

    sUserDomain = aqEnvironment.GetEnvironmentVariable("USERDOMAIN")

     

    Irfan