doktor.pj
Posts: 6
Joined: Wed Nov 25, 2020 10:01 pm

Choice of Server / Station installation

Wed Nov 25, 2020 10:17 pm

Hi,

I need advice on how to do the following ...

At the beginning of the installation I would like to have the Server / Station option

- If a Server is selected, everything will be installed.
- If a Station is selected, only some files will be installed, only some folders will be created
a dialog with selecting the path to the server would appear before the end of the installation.

Is it possible?

Thank you
P.J.

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: Choice of Server / Station installation

Thu Nov 26, 2020 11:00 am

Hello P.J. and welcome to our forums,

In order to achieve that, you can make use of our "ClientServerDlg" predefined dialog.

In order to add this dialog to your project, please proceed as it follows:

- go to "Dialogs" page

- select "WelcomeDlg" dialg and click on the "Add dialog" button from the toolbar

- from the menu, please select "ClientServerDlg" dialog

When this dialog is added, 3 new features are added in "Organization" page, each feature corresponding to the installation type.

In order to condition your files based on that, all you need to do is to add your files under the specific feature (e.g. file A goes under the "Server" feature, while file B goes under the "Client" feature).
ClientServer.png
ClientServer.png (28.39KiB)Viewed 2172 times

Hope this helps!

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

doktor.pj
Posts: 6
Joined: Wed Nov 25, 2020 10:01 pm

Re: Choice of Server / Station installation

Thu Nov 26, 2020 10:27 pm

Thank you very much for the answer.

But I would need another "little thing".
In case of Client installation, insert a dialog named eg ClientPathDataDlg between the ProgressDlg and ExitDlg dialogs. In this dialog I would select the path to the data located on the server and I would need the selected path to be saved in the windows registry.
How to do this?

Regards
P.J.

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: Choice of Server / Station installation

Fri Nov 27, 2020 3:13 pm

Hello P.J.,

What you want to achieve is indeed possible, but not entirely.

What I mean by this is:
between the ProgressDlg and ExitDlg dialogs
After the "ProgressDlg", you can only add a dialog in sequence. Dialogs in sequence are dialogs that are triggered by the same action, therefore they can not be conditioned individually.

What is, however, possible, is to add a new dialog right after the "SetupTypeDlg" where the user can insert the path. To achieve your whole scenario, please follow these steps:

- go to "Dialogs" page

- select "SetupTypeDlg" and click on the "New dialog" button from the toolbar

In order to condition the dialog, we can use the "InstallMode" property, which is set to "InstallModeCustom" if the "Custom" button is pressed in the "SetupTypeDlg" dialog.

- right click on the newly added dialog --> "Show only if..." --> use a condition as it follows:

Code: Select all

InstallMode = "InstallModeCustom"
- in the dialog, add a new control that will store the path, e.g. an "Edit Box" control. You can add the control by using the "Controls Toolbox" button from the toolbar

- if you click on the control, on the right side you will be able to see the control's properties. What we are looking for here is the control's property (in our case, the property will store whatever the user will input in the EditBox control)

Property.png
Property.png (283.55KiB)Viewed 2159 times

- now please go to "Registry" page --> add a new value --> in the "Data" field, add the name of the property enclosed between square brackets, e.g.:

Data.png
Data.png (60.46KiB)Viewed 2159 times

This way, the user's input will be written in the registry during the installation.

Hope this helps!

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

doktor.pj
Posts: 6
Joined: Wed Nov 25, 2020 10:01 pm

Re: Choice of Server / Station installation

Sat Nov 28, 2020 10:55 am

Thanks, this is perfect!

The last thing occurred to me about this.
Is it possible to verify, after selecting the path to the server, whether the selected path is correct?
E.g. test the existence of a file.

Nice weekend
P.J.

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: Choice of Server / Station installation

Wed Dec 02, 2020 3:50 pm

Hello P.J.,

Unfortunately, we do not have predefined support for this.

However, this is achievable through a Custom Action.

For instance, an example would be an "Inline PowerShell script" custom action in which the "Test-Path" cmdlet can be used.

Hope this helps!

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

Return to “Common Problems”