Edit box initialization - 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!

Serzhantov
Posts: 2
Joined: Wed Apr 16, 2008 4:16 pm

Edit box initialization

Hi,

please, help me to solve the problem: I have a custom dialog that has edit box. I want to set the IP address of computer where the MSI will be run to the edit box. At that when the custom dialog appears the IP address value should be already in the edit box.

Thank you very much in advance.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Edit box initialization

Hi,

The IP can be retrieved by using a custom action. You can find an example here.

Note that in order to set the IP address to be shown in the edit box, you need to set the property of the edit box to the IP address. The property of the edit box is specified in the "Property Name" field in the "Properties" pane (in the "Dialogs" page). Also, it can be set in the custom action by using the "Session.Property" method (for example: Session.Property("IPADDRESS")=strAddress).

This custom action can be set as a DoAction control event under the "Init Events" tab of your custom dialog.
Let me know if you encounter any problems.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Serzhantov
Posts: 2
Joined: Wed Apr 16, 2008 4:16 pm

Re: Edit box initialization

Hi,

thanks for your information. But I have one more incomprehension: how must look (for example) VBScript file inside? What content must it have? Something like this:
------------------------------------------------------------
Sub GetIP()

Dim ip_address

....

ip_address = ....

Session.Property("IPADDRESS")=ip_address

End Sub
------------------------------------------------------------

or not?

Truly yours, Serzhantov
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Edit box initialization

Hi,

Yes, a VBS file contains VBScript code. You can read more about VBScript in the VBScript User Guide.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”