dbalsbaugh
Posts: 27
Joined: Mon Dec 11, 2006 10:41 pm

LogonUser property not working?

I have a simple text box field that is using [LogonUser] in the Text property. When this dialog is shown, this field is empty. Am I missing something with this property? I am expecting my current logged in username (DomainName\Username) to show up here.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

In the "Property" field of the "Edit Box" control make sure you have LogonUser not [LogonUser].

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
dbalsbaugh
Posts: 27
Joined: Mon Dec 11, 2006 10:41 pm

OK, I am now getting the Username to show up after trying your suggestion, but I was hoping to get the "DomainName\Username". Any way to accomplish this?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

This can be achieved with a custom action like this:

Define a public property (upper cases) in the "Install Parameters" page. Switch to "Dialogs" page and use this property for the "Edit Box".

Now switch to custom actions page and add a "Property Set With Formatted" type of custom action under "InstallUISequence->Begin". Use following options for it:

Property Name: PROPERTY (defined in the "Install Parameters" page).
Formatted Text: [%USERDOMAIN]\[LogonUser].

Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
dbalsbaugh
Posts: 27
Joined: Mon Dec 11, 2006 10:41 pm

This is exactly what I was looking for.

Thanks. Your support on this forum has been great!

Return to “Common Problems”