Adrian_Arkio
Posts: 5
Joined: Mon Sep 20, 2021 12:03 pm

Install optional features silently

Mon Sep 20, 2021 12:11 pm

Hi,

one of our clients requires to install our app silently.

Usually, we release a MSI installer with default UI and Dialogs, two of which are Shortcuts and Optional Features.
When the client installs our app silently these optional features and icons aren't included in their installation and we'd like to solve this.

I'd like to know how can we configure our Advanced Installer project so they have the ability to add optional features and shortcuts via command line on a silent installation.

Thank you.

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

Re: Install optional features silently

Mon Sep 20, 2021 4:19 pm

Hello Adrian and welcome to our forums,
I'd like to know how can we configure our Advanced Installer project so they have the ability to add optional features and shortcuts via command line on a silent installation.
In order to achieve that, you could proceed as it follows:

- go to "Organization" page

- select one of the optional features

- set its' default "Installation Behavior" as "Not installed"

- in the "Installed If" field, insert a condition based on a property, e.g.:

INSTALL_FEATURE_A = "Yes"

After doing so, the user will be able to conditionally install the feature by passing the property on the command line, e.g.:

Code: Select all

msiexec /i <your_msi> INSTALL_FEATURE_A="Yes"

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

Adrian_Arkio
Posts: 5
Joined: Mon Sep 20, 2021 12:03 pm

Re: Install optional features silently

Tue Sep 21, 2021 11:08 am

Thank you for your help.

Our client tried it but for some reason, they're not able to make the optional features work. I was wondering if you could help me debug it.

When they install it silently via cmd it works as expected, but when they use PDQdeploy in a Networked Environment (their deployment software) files are only added to programfilesx86. Plugins and icons that go in other places as "Common Application Data", "Start Menu" or "User Profile" don't get installed, so they can't get the full set of features they've paid for.

I've tried per-user and per-machine MSI installers without luck and now optional features can be added via command line following the above post.

Thank you.

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

Re: Install optional features silently

Wed Sep 22, 2021 2:37 pm

Hello Adrian,

To be fully honest with you, I am not really familiar with PDQDeploy so I can not really say why this is happening, especially since this is working just fine through the command line.

I would like to have a look over this, if possible. To do so, could you please:

- forward me a copy of the .AIP file by email at support at advancedinstaller dot com

- forward me a download link for the MSI (at the same address)

- give me some more details about this:
Networked Environment
- give me the exact command line your users have used to deploy the MSI (I'd like to mirror this agains the .AIP file to see if I can find anything)

- and last but not least, an installation log (verbose) from that machine might be helpful. Here, it would be helpful if we could get both logs (from the successfull installation and from the one where the files are not installed).

As a side note to your last request, another method of installing the features would have been through the ADDLOCAL property. More information about this property in the following article:

ADDLOCAL property

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

Adrian_Arkio
Posts: 5
Joined: Mon Sep 20, 2021 12:03 pm

Re: Install optional features silently

Thu Sep 23, 2021 12:39 pm

Thanks for your reply.

After some debugging, we may have found the source of the problem.

When the client sent us some screenshots of where the plugins were installed they are in the wrong place.

In "Advanced Installer / Files and Folders" we have the files under "User Profile/ApplicationData".

The installer works locally. We get the files in C:\Users\<username>\AppData\Roaming

But our client gets them in C:\AppDataFolder\

I've tried per-user and per-machine installations trying to reproduce it but it doesn't create that folder here.

Do you know why this could be happening? Regards.

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

Re: Install optional features silently

Tue Sep 28, 2021 4:13 pm

Hello Adrian,

It looks like on your user's machine, the "AppDataFolder" is not resolved.

The above should resolve to the following value at install time:

Code: Select all

C:\Users\<username>\AppData\Roaming
To be fully honest with you, I am not so sure why this is happening. However, I'm assuming this has something to do with the environment, since this works as expected when running from the command prompt.

For instance, if you use PDQDeploy to install your MSI on a test machine (e.g. a Virtual Machine), do you obtain the same results?

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

Return to “Building Installers”