Installer defaults to the Custom install instead of the Full no matter what. In case that there is no solution for that, can I have checked all the components by default in custom install?
If you have installed your application earlier using your setup script and now you are reinstalling, it may be that Setup uses previous type as default.
Please check UsePreviousSetupType parameter for [Setup] Section.
Related
I want to run a Wix custom action only on upgrade and patches and NOT install/reinstall or repair. So basically only if the version number of the application is increasing should this custom action run. I tried the following rule and it disabled the custom action completely on patching:
<Custom Action="upgrade_action"
Before="InstallFinalize">Installed AND NOT REMOVE AND UPGRADINGPRODUCTCODE</Custom>
What can I do to achieve this?
If this is the new major upgrade product and you are using the WiX MajorUpgrade element then the WIX_UPGRADE_DETECTED property is set if it's doing an upgrade and detecting an older version. UPGRADINGPRODUCTCODE is set in the old product being upgraded, the one that's already installed.
It looks like all you need is WIX_UPGRADE_DETECTED Or PATCH if you want the CA to run on either of those conditions only.
I'm a few days researching and still not get anything that really helped me, I need to get the installer program by inno, my only problem is that I need to configure it so that at installation time he install the printer PDF Creator, I'm not getting do this part, I need while installing, install the printer pDF creator also need to change his name over that part I know more or less how it's done. If anyone can help me I thank you from the heart.
You need to either create a inno setup file (.iss) yourself or download "PDFCreator.iss" from the "setup" folder of source code version 1.3.2
Compile the inno setup file of your customized PDFCreator version using inno setup software.
We're running custom installer logic in a C# class via the System.ComponentModel.RunInstallerAttribute annotation. We use the VS2010 MSI installer.
Problem: this logic is not executed when we do an upgrade. Is there a way to execute code for upgrade installs?
What condition are you using for the custom action? If you are using "Not Installed" is should run.
Also, just to sure I understand the problem correctly. When you do an upgrade the custom action is in the new package, i.e. the one upgrading, not the one being removed?
After installing a MSP patch, Windows Installer decides to install ALL Features provided in the initial MSI. How can i prevent MSP patch from installing All available Features?
Features requests show like this:
Installed: Absent
Request: local
Action : local
Why is it requesting to install all?
I found out that the ADDLOCAL property was being set to all the Uninstalled Features. This caused a "Request: local" for each one. What i did to solve the issue was to use a small custom action that deletes this property. It needs to go before CostFinalize because the features to be installed need to be defined before that action.
The variable REINSTALL holds the features that are already installed, and all of them are requested for REINSTALL. So the MSP patch only REINSTALLs the already installed features and leaves the uninstalled features untouched.
<CustomAction Id="REMOVE_ADDLOCAL_PROPERTY"
Property="ADDLOCAL" Value="[NonExistentProperty]"
/>
<InstallExecuteSequence>
<Custom Action="REMOVE_ADDLOCAL_PROPERTY" Before="CostFinalize">
<![CDATA[PATCH]]>
</Custom>
</InstallExecuteSequence>
EDIT:
In the end, this solution worked for one of my patches, but failed for another. So the final solution i've implemented so far is to set REINSTALL=ALL during the Patch.This MSDN link stands that:
Note that even if REINSTALL is set to ALL, only those features that were already installed previously are reinstalled. Thus, if REINSTALL is set for a product that is yet to be installed, no installation action will take place at all.
so i think this is a better solution than removing the ADDLOCAL property. And also it worked for both patches.
You have to save the selected features to the registry upon initial installation, ADDLOCAL property. When installing the patch, it has to read the states from the registry setup ADDLOCAL property accordingly.
Otherwise the patch runs as if the defaults are selected, and therefore the missing features get installed.
You linked to a question for Upgrade case, MigrateFeatures attribute, which refers to MigrateFeatureStates action, does not work in case of patches.
We have a software that has couple of executables inside. One of the executables is Windows service, and it doesn't change that often, usually we release many updates to the main executable, but the service version is same inside installer.
When service is installed first time or upgraded with newer version, we need to run custom action. We managed to solve first install part, but we don't know how to determine that version we're installing now is newer than one that already exists. Sort of if(newver > oldver) run custom action.
Thank you in advance
- Jack
You can try using the upgrade rules of your package. More details here: How to implement WiX installer upgrade?
Rob Mensching (the second answer in the linked thread) shows an example for upgrade rules. You should first familiarize yourself with the Upgrade table and how upgrade rules work. There isn't an easy answer or a quick fix for this in WiX.
Basically, you should have 2 upgrade rules
the first sets a property when an older version is found
the second sets another property when a newer version is found
After that you can use the older versions property to condition your custom action. For example, if the property is named OLDERVERSIONFOUND the custom action condition can be:
OLDERVERSIONFOUND
or something like
OLDERVERSIONFOUND > "1.0.0"
Your best bet is to store the "service" version somewhere in the registry, search for that registry value during upgrade and run your CA if newver > oldver (and the CA should also update said registry value to newver)
Note that Custom Actions are (generally) an admission of failure. I always try to separate out the configuration portion of setup to a pre-install (for sysadmins doing deployment) or post-install (for interactive installations) step - often a separate executable.
Declarative installations with no custom actions are much more reliable - if you can figure out how to rewrite the service so that your custom action is no longer required, you'll be much better off in the long term (this doesn't help when you're under pressure to release now, but it's something to think of for future releases)