Finding the Domain name of the Current USER. - Advanced Installer Community
sonu
Posts: 148
Joined: Tue Oct 30, 2012 10:04 am

Finding the Domain name of the Current USER.

Hi team,
Can you help me out on finding the domain name of the Current who logged in. We are creating the user under same domain, Is there any predefined property for find Domain in advanced installer '..."[%USERDOMAIN]....is it use full ?

With Regards,
pradeep
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Finding the Domain name of the Current USER.

Hello pradeep,

You can use the Environment.UserDomainName Property which gets the network domain name associated with the current user.

Edit: Also, you can take advantage of the USERDOMAIN environment variable.
First, you should go in the Install Parameters page and create a public property (e.g. USER_DOMAIN_PROP).
Then, you can go in the Custom Actions page and add the Set installer property predefined custom action with sequence. You can edit its properties like that:

  • Property: USER_DOMAIN_PROP
    Formatted: [%USERDOMAIN]
Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”