kyskids
Posts: 10
Joined: Mon May 22, 2017 3:35 am

How to install option files(Feature).

Hello. I'm a Advanced Installer user.

I have a question about creating an aip file.

I will install two features, A is a required element and B is an optional element.

Installation situation.
(1) Install only A
(2) Install both A and B.
(Installation paths of A and B are different.)

Here is the removal problem.

I want to proceed with installation (2), remove A only when uninstalling, and then run setup.exe.

Now, if uninstall A and run setup.exe, you will get MaintenanceDlg.

How can i solve it?


Aip version: 9.5
Attachments
ControllerTester_2.9.aip
(241.18 KiB) Downloaded 499 times
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: How to install option files(Feature).

Hello and welcome to our forums,
I want to proceed with installation (2), remove A only when uninstalling, and then run setup.exe.

Now, if uninstall A and run setup.exe, you will get MaintenanceDlg.

How can i solve it?
This is the expected behaviour, as the second feature is still installed, Windows installer detects its GUID as installed, thus the maintenance mode is triggered.

You could change this behaviour by going to "Organization" page, select the second feature and enable "Mark components in this feature as "Do not register with Windows Installer"". This will empty the second's component GUID. In this way when running the setup after the first feature is uninstalled, the install mode is triggered because Windows Installer doesn't find the second component's GUID.

Please note that when using this option the uninstall or maintenance in not possible for the second feature as it is not registered by Windows Installer.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kyskids
Posts: 10
Joined: Mon May 22, 2017 3:35 am

Re: How to install option files(Feature).

Thank you for answer.

Does not register a GUID, there is no problem removing it.

If so, is there a difference between not registering the GUID and setting the Attribute to Permanent?

Both methods assume that set Remove Condition in the corresponding folder in Files and Folders.

And I wonder if the "Shared amongst packages" setting of attributes can get the same effect.

Also, why does not "Shared amongst packages" apply to Components in bulk through Shift + F4?

-----------------------------------------------------------------------------------------------------------------------------

The final goal is to provide the ability to install Main Program A and Option B (Compiler) from the install screen.

Option B does not need to be uninstalled. If you uninstall Only A and run setup file again, if B is installed, you want to disable check box to install B.

The normal way is to determine the CheckBox State according to whether B Feature exists or not.

Permanent setting of all components of B Feature.
And the folder where B is installed is removed by checking check box on the Uninstall screen.

Is there a good way to recommend it?
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: How to install option files(Feature).

Hello,
If so, is there a difference between not registering the GUID and setting the Attribute to Permanent?
"Mark compinents in this feature as "Do not register with Windows Installer" is a feature option, it acts on all components included in the feature. The "Permanent" option could be selected for each of the components contained by a feature.
And I wonder if the "Shared amongst packages" setting of attributes can get the same effect.
This option marks the component as shared among multiple packages. In doing so, if a package containing this component is uninstalled, the highest version of it (installed by other packages) will still be shared by Windows Installer. It suffice to mark the component as shared in one package for it to become shared among multiple packages.
Also, why does not "Shared amongst packages" apply to Components in bulk through Shift + F4?
This is because this option is not generally used for groups of components.

As regarding your general goal, I would recommend creating a prerequisite installation for the compiler. In this way, at the first install the user will be prompted to install the compiler. After the application is uninstalled, the compiler remains installed. If another application install is ran, it will detect that the prerequisite (compiler) is installed and will skip its installation. In this way, both the application installation and the prerequisite installation will be shown in Control Panel, so you will be able to uninstall the compiler later.

In order to achieve this you should follow the steps:
1. Create a new .AIP project for you compiler prerequisite, add the resources necessary and build the project.
2. Create the application .AIP project, add the application resources
3. Go to "Prerequisites" page, right clicking on "Pre-Install" and select "New package prerequisite". Choose the MSI or EXE output from the prerequisite project. The prerequisite install condition will be automatically set. The product version of the prerequisite package will be the criteria.

Hope this helps!

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”