vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Save Login info Dialog Values

can you please help me on how to save text fields values in a file that take from the user at installation time.
(ex.-USER_IP and USER_PORT).


Thanks And Regards
Vishal Bhamawat
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Save Login info Dialog Values

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can follow the steps below:
- go in the Files and Folders page
- use the [New INI File] toolbar button to create an INI file
- in the "New INI File" dialog click on the [New Entry...] button
- in the "New INI Entry" dialog configure your new entry like in example:
  • Key: User IP
    Value: USER_IP
    (where "USER_IP" is the property related to the text field where the user will write his IP address)
    Action: Create or update
    Component: <this entry will be created when the component you choose here will be installed>
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Re: Save Login info Dialog Values

Thank you very much.

Regards
Vishal Bhamawat
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Save Login info Dialog Values

You're welcome. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Re: Save Login info Dialog Values

can you please help me on how can i set text field value at run time.
1.i want to show system IP in a text field,suggest me any way to do this.
2. if it is not directly possible then how can i do that ?

thanks in advance
Vishal Bhamawat
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Set Text Field Value

can you please help me on how can i set text field value by getting system Information.
here is scenario-
i want to show system IP in a text field,suggest me any way to do this.
if it is not directly possible then how can i do that ?

thanks in advance
Vishal Bhamawat
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Save Login info Dialog Values

Hi Vishal,

In order to achieve what you want you can follow the steps below:
- create your own custom action that takes the system IP Address and stores it in a property
- go in the Dialogs page and add an "Edit Box" control
- in the "Properties" pane set the "Property Name" of the "Edit Box" control to the name of the property that contains your IP address (i.e. IP_ADDRESS)

Below is an example of a VBScript custom action that takes the system IP Address andstores it in a property

Code: Select all

dim NIC1, Nic, StrIP

Set NIC1 = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
For Each Nic in NIC1
	if Nic.IPEnabled then
		StrIP = Nic.IPAddress(i)
		MsgBox "IP Address: "&StrIP
		Session.Property("IP_ADDRESS") = StrIP
		exit for
	end if
next
Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Re: Save Login info Dialog Values

its working thank you .:)
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Spawn Dialog action handling

in Spawn Dialog i added control on yes and no button.
i want to display a specific dialog (next step dialog)when no button is pressed. but when i added in publish event first is close the current dialog and then display a specific dialog.
by this step,next dialog is displayed but spawn dialog not closed.
how can i close this dialog :!:
please help me on this.

Thanks,
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Save Login info Dialog Values

Hi,

I'm afraid I don't fully understand what is your scenario. Can you give us more details about your scenario (maybe exemplify)?

Please keep in mind that you can set a condition for a Spawn dialog, so that, it will to be displayed while that condition is true. You can also take a look on the SpawnWaitDialog thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Re: Save Login info Dialog Values

Hi,

here is my scenario-
i take a port number form the user and check its availability. if it is not available then it prompt a spawn dialog that is(it contain two buttons yes and no)-"port number is already occupied do you want to change the port number?" if user press no then installer go to the next step ask for another information.
for achieving this i added two control event in publish event tab of spawn dialog first one is close the current dialog and another one is display a specific dialog for go to the next information dialog.
when i pressed no it goes to the next dialog, but spawn dialog is not closed. :!:
hope its understandable for you, if not let me know i will send you my .api file.

Thanks in advance
vishalbhamawat
Posts: 8
Joined: Wed May 29, 2013 6:01 pm

Re: Spawn Dialog action handling

can you please help me on this :?:
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Save Login info Dialog Values

Hi Vishal,

I'm afraid that this is a Windows Installer limitation and that's why you encounter this behavior. However, as a workaround you can create a "Display message box" custom action and use it instead of the "Spawn Dialog".

The How to enable/disable NEXT button on textbox keypress event? describes exactly the steps that you need to follow to achieve what you want.

Let us know if this helped and do not hesitate to ask us any other question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”