Lim seong Jin
Posts: 3
Joined: Thu Jul 04, 2024 10:10 am

How to get value from user dialog

hello.
I am contacting you because I have a question about creating the installation file.

After creating a ComboBOX in a user dialog, I want to get the ComboBox value from PowerShell and make changes to the registry.
(In an actual project, the registry of various properties (REG_DWORD, REG_SZ) must be changed to the values ​​of the corresponding combo box.)

The initial event of the combo box has also been set and the Persistent value of the property with the corresponding Properties Name in Properties has also changed to Yes, but I am unable to get the selected value of the combo box in PowerShell.

I checked a similar type of question on the Community bulletin board of the Advanced Installer homepage, but it does not work in my project.

Please check how to solve this problem.

Additionally, when creating a setup program with the Advanced Installer, you must install various additional setup files.

For example, if you have setup files A.exe, B.exe, and C.exe, when you install the setup file created by the advanced installer, you must also install the A, B, and C setup files.
Please check if this also needs to be installed from PowerShell or if there is another way.
If you have an example, please forward it to me.


Attached is the project created for testing. :D
Attachments
test.aip
(44.51 KiB) Downloaded 439 times
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get value from user dialog

Hello and welcome to our forums,

Please note that in order to get the value of a combobox in your PowerShell script, we need to use the special "AI_GetMsiProperty" cmdlet.

As you have already seen, the Combobox stores its' values in a property:
Screenshot_175.png
Screenshot_175.png (24.26 KiB) Viewed 14154 times

However, this property is not an environment variable as you initially thought and its' values can be obtained through the above cmdlet, e.g.:

Code: Select all

$comboValue = AI_GetMsiProperty COMBOBOX_1_PROP
However, please note that this will only retrieve the value that was selected by the user.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Lim seong Jin
Posts: 3
Joined: Thu Jul 04, 2024 10:10 am

Re: How to get value from user dialog

Thanks for your help.
When I followed the instructions you provided, the desired behavior was achieved. :D :D

Additionally, when installing with an installation file created with Advanced Installer, we plan to run various installation files added to Files and Folders so that they can be installed together.

I used Custom Control's Launch installed file to run various installation files added to Files and Folders sequentially, but after the first file was executed, a message saying "another installation task is running during installation" appears and the installation does not proceed.

Once the installation is completed one by one, how can I run the next installation file?
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get value from user dialog

Hello,
Thanks for your help.
When I followed the instructions you provided, the desired behavior was achieved
You are always welcome, happy to hear I've been able to help. :)

In order to achieve what you want, you can use our predefined support for "Prerequisites".

This support is specifically designed to achieve what you need, so that you do not need to add the files manually in your package and then use various custom methods to install them.

The main thing needed to be taken in consideration here is the Prerequisites install detection criteria, for which I've written the following article:

Prerequisite install detection criteria - How to create one


Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Lim seong Jin
Posts: 3
Joined: Thu Jul 04, 2024 10:10 am

Re: How to get value from user dialog

Hi,
As instructed, I set the condition to install the files in Prerequisite, but as soon as the last installation file is executed, the installation file created by advanced installer does not wait, and a pop-up window appears asking whether to install it, along with a message saying that the required program has not been installed. Is there a solution?
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get value from user dialog

Hello,
along with a message saying that the required program has not been installed. Is there a solution?
This is most likely happening due to the install conditions you have set for your prerequisite in the "Prerequisites" page --> "Conditions" tab.

This condition is evaluated twice:

- once before the setup installs your prerequisite -> here the condition must be false, meaning the prerequisite is not installed

- once after the setup installs your prerequisite -> here the condition must be true, meaning the prerequisite was installed correctly

In your case, the second evaluation is evaluated as false, leading to that error.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”