Default Value problems in UI - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Default Value problems in UI

Hi,

I have a Edit text box with the Property of LogonUser I recently changed it to LOGONUSER due to issues with the Property not inserting properly into a script. However when I changed it to LOGONUSER it wont except the Default Value of UserName. Before I changed the property to all capitals it used to display the current user name of the logged on user.

Matt
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Default Value problems in UI

Hi Matt,

I'm afraid I don't understant exactly what do you mean by "when I changed it to LOGONUSER it wont except the Default Value of UserName". Are you expecting that the property
"LOGONUSER" to be automatically set to the username, as the property "LogonUser" did? If so, then this is the normal behavior because these are two completely different properties.

"LogonUser" is a predefined property set by Windows Installer to the user name for the currently logged on user. While as "LOGONUSER" is simply a new property which needs to be set in order to have a value.

You can set "LOGONUSER" to the value of "LogonUser" by adding and "SetProperty" Init Event on the dialog that holds the edit box. Just select the dialog and
go to Init Events tab from the "Control" pane found below the dialogs, in Dialogs page.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Re: Default Value problems in UI

Hi,

We are using the LOGONUSER Value to put the users username into the database but as we support both windows and forms authentication there is an edit box that allows the user to enter their username. The Default value of this box was USERNAME which put the current logged on users username into the box by default then they could edit the contents of the box to change it to somthing else if they wanted. However ever since we have changed the Property of the Edit box to LOGONUSER when you run the .exe file it just says USERNAME in the box is there anyway of getting this working again?

Matt
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Default Value problems in UI

Hi Matt,

I've created a sample project file, attached, which has an editbox with the property "LOGONUSER", which is set to value of "LogonUser" using an Init Event,
just as I said in my previous post. Can you please build and run the package and let me know if this is what you need?

Regards,
Bogdan
Attachments
sample.aip
(12.85 KiB) Downloaded 312 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Re: Default Value problems in UI

Hi,

This seems to be what I need. I will try and make these changes now and let you know how I get on.

thanks

Matt
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Default Value problems in UI

Hi Matt,

You just need to simply copy and paste the Init Event from my project and also make sure your edit box has nothing set as default value, this should make your project work correctly.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Re: Default Value problems in UI

Hi,

I have got this to work following your instructions. The link you attached in the previouse post didnt really have any information on so you may want to look at that.

cheers for the help

Matt
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Default Value problems in UI

Will do so, thanks.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”