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!

alernhart
Posts: 2
Joined: Mon Jul 22, 2013 7:15 pm

Help / sample on complex Client/Server Install

Hi all,
I'd highly appreciate a sample or help to resolve the following challenge:
Scenario A: Install myApp.exe on a CLIENT
Scenario B: Install myData.DB and myHelp.chm on a SERVER
Scenario C: Install myApp.exe and myData.DB and MyHel.chm on a CLIENTor or a SERVER (aka COMMON)

Use case:
- User selects the scenario
- Installer asks for the folder the MyApp.exe should be installed (propones the default path on the local machine where the installer runs according to the OS, e.g. "C:\Program Files\myConmpany\myApp.exe"), if either CLIENT or COMMON was selected
- Installer asks for the (root) folder the data should be installed to (propones the default path according to the OS, e.g. "C:\ProgramData\myConmpany\"), if COMMON was selected. At the end, the files are installed on the local machine where the installer runs in "C:\ProgramData\myConmpany\Data\myData.DB" and "C:\ProgramData\myConmpany\Help\MyHelp.chm", respectiverly.
- Installer asks for the folder where the data was previously installed on a server (propones the default path according to the servers OS, e.g. "C:\ProgramData\myConmpany\"), if CLIENT was selected. At the end, the data (root) path will be registered in Registry as UNC-Path, e.g. "\\MyServer\myConmpany\"
- A couple of info will be registered in Registry (App-Name, Version, App-Path, Data-Path...).

It doesn't matter if there appear two dialoges where applies (say, one to get folder for myApp.exe, other dialogue for getting the data path), or if there is a "smart" dialogue asking both on the same if applies.

I spent already dozends of hours with the ClientServerDlg (using wizard), but got very confused on trying to deal with the "Published Events" with which I guess should be worked on.
How to invoke the Folder or Browser Dialogues? Where to

What I didn't got (amoung other misteries) is the fact that there are sub-items under ClientServerDlg for "InstallMode=Server" and "InstallMode=ClientServer", but not for "InstallModeClient" - on the other hand, clicking on the "Client" icon, there do are some "Published events"... ? Is this a bug or a cute feature?

Currently using a trial version, Enterprise mode. I evaluate a couple of installer tools - the use case depicted above is the test scenario the tool must be able to handle.
I'd highly appreciate some hints, help or even a sample for a client/server installer doing this or similar things.
Many thanks in advanced for your time! - personally, until now AI is my favorite and I'd love to buy it, learning to do a lot of magic with it.
André
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Help / sample on complex Client/Server Install

Hello André and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can proceed like this:
- Open Advanced Installer application and create a new "Enterprise" project type.
- Go to "Install Parameters" page and add a property like this:
  • Name: DATA_PATH
    Value: Your Value
- Go to "Custom Actions" page and add a "Set installer property" custom action with sequence, scheduled after "Wizard Dialogs Stage -> Searches" action group, like this:
  • Property: DATA_PATH
    Value: [CommonAppDataFolder][Manufacturer]
- Select the above custom action and (while keeping [Shift] key pressed) drag it under "Install Execution Stage -> Searches" action group.
- From its "Set Installer Property" right pane -> "Execution Stage Condition" section click on "Advanced execution scenarios...".
- In the "Advanced Execution Scenarios" dialog select "Skip action in Install Execution Stage if executed in Dialogs Stage" option.
- Go to "Files and Folders" page and in the "Application Folder" directory (APPDIR property) add your "MyApp.exe" file.
- Create a new property-based folder using the "DATA_PATH" property.
- Under "DATA_PATH" property-based folder create two regular folders (Data and Help) and add there your "myData.DB" and "myHelp.chm" files.
- Go to "Organization" page and rename the "MainFeature" feature to "Common".
- Under "Product" tree node create two new features: Client and Server.
- Under "Common" feature select the component of "MyApp.exe" file and (while keeping [Shift] key pressed) drag it under "Client" feature.
- Under "Common" feature select the component of "myData.DB" file and (while keeping [Shift] key pressed) drag it under "Server" feature.
- Under "Common" feature select the component of "myHelp.chm" file and (while keeping [Shift] key pressed) drag it under "Server" feature.
- Go to "Registry" page and add registries values like this:
  • Name: Version
    Data: [ProductVersion]

    Name: Data-Path
    Data: [DATA_PATH]
etc.

- Go to "Dialogs" page and delete the "FolderDlg" dialog.
- After "WelcomeDlg" add four new dialogs: FeatureSelection, Common, Client and Server.
- On FeatureSelection dialog add a radio button group control (FEATURE_PROP) containing three radio buttons control like this:
  • Text: Client
    Value: Client

    Text: Server
    Value: Server

    Text: Common
    Value: Common
- On Common dialog add two paths edit controls (having APPDIR and DATA_PATH associated properties) and two button controls with the following text: [ButtonText_Browse].
- On first [Browse..] button add the following published events:
  • Control Event: Set installer property value
    Property: [_BrowseProperty]
    Argument: APPDIR

    Control Event: Display a specific child dialog
    Argument: BrowserDlg
- On the second [Browse..] button add the following published events:
  • Control Event: Set installer property value
    Property: [_BrowseProperty]
    Argument: DATA_PATH

    Control Event: Display a specific child dialog
    Argument: BrowserDlg
- On [Next] button add two published events like this:
  • Control Event: Verify and set the selected folder path
    Argument: APPDIR

    Control Event: Verify and set the selected folder path
    Argument: DATA_PATH
- Add similar browse for folder functionality on Client and Server dialogs.
- Select "Common" dialog, from its context menu choose "Show only if..." option and use the following condition:

Code: Select all

FEATURE_PROP = "Common"
- Select "Client" dialog, from its context menu choose "Show only if..." option and use the following condition:

Code: Select all

FEATURE_PROP = "Client"
- Select "Server" dialog, from its context menu choose "Show only if..." option and use the following condition:

Code: Select all

FEATURE_PROP = "Server"
- Go to "Organization" page and select "Common" feature. From "Features Properties" right pane select "Install based on condition" option and in the "Condition" field use the following condition:

Code: Select all

FEATURE_PROP = "Common"
- Select the "Client" feature and use the following condition:

Code: Select all

FEATURE_PROP = "Client"
- Select the "Server" feature and use the following condition:

Code: Select all

FEATURE_PROP = "Server"
- Build and run your project.

Also, I've attached a sample created with version 10.3 of Advanced Installer which implements a similar scenario.
sample.zip
(4.37 KiB) Downloaded 443 times
If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alernhart
Posts: 2
Joined: Mon Jul 22, 2013 7:15 pm

Re: Help / sample on complex Client/Server Install

Hi Daniel,

Thank you very very much for your very long and extensive post, especially for the sample!
I'll try now and will come back either with some queries - or with a success message.

best regards
André

Return to “Building Installers”