hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Initial value for edit control in dialog

I want to initialize the "Domain" edit in the "Logon Information" dialog with the name of the computer on which the installer is running. I tried setting the control's "Default Value" property to "ComputerName" or "[ComputerName]", or to "COMPUTERNAME" or "[COMPUTERNAME]", but when I run the installer all I see is this exact text, instead of the actual computer name. What is the syntax to have the variable name substituted for its content?

Thanks
Hans
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: Initial value for edit control in dialog

Hello Hans,

The property that stores the computer name is [ComputerName]. The reason why that is not working is because that field does not support Formatted Type references.

To achieve what you want, you can proceed as it follows:

- Go to "Dialogs" page and click on "LogonInformationDlg".

- Under "Init Events" tab, create a new event by pressing the "New..." button.

The newly created event should look like this:

Set installer property value:
- Property: DOMAIN_NAME
- Argument: [ComputerName]
- Condition: 1
ComputerName.PNG
ComputerName.PNG (35.28 KiB) Viewed 2618 times
Hope this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: Initial value for edit control in dialog

Thanks, works perfectly! :D
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: Initial value for edit control in dialog

You're always welcome, Hans.

I am glad you got this working.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”