admin管理员组

文章数量:1291293

For our project we use Install4j for our installers. We used to use Wix to package an MSI too, but we recently migrated that to use the Install4j MSI wrapper to fix some issues with users inadvertently switching between MSI and EXE installers which didn't upgrade between each other properly. The problem is that we can't specify an UpgradeCode in the Install4j MSI to allow us to uninstall an old Wix MSI as part of an update.

We tried a custom Install4j install action to search for and uninstall a pre-existing Wix MSI however this proved mostly non-viable as it runs while the Install4j MSI is executing, which prevents triggering an uninstall for another MSI (MsiExec can only have one running instance at a time).

It's probably possible as a workaround to implement a post build step to modify the MSI database an insert an UpgradeCode ourselves, but this is a highly undesirable approach due to the ongoing maintenance burden and it'll likely require re-adding Wix which we just removed.

The ideal solution would be to discover an undocumented XML flag or feature of Install4j to allow us to specify or otherwise control the generated MSI UpgradeCode(s), but we haven't found any hint of such a thing so far.

I'm open to any community suggestions. We're currently running Install4j v9, but any version that provides a viable solution will be a very strong business case for updating.

For our project we use Install4j for our installers. We used to use Wix to package an MSI too, but we recently migrated that to use the Install4j MSI wrapper to fix some issues with users inadvertently switching between MSI and EXE installers which didn't upgrade between each other properly. The problem is that we can't specify an UpgradeCode in the Install4j MSI to allow us to uninstall an old Wix MSI as part of an update.

We tried a custom Install4j install action to search for and uninstall a pre-existing Wix MSI however this proved mostly non-viable as it runs while the Install4j MSI is executing, which prevents triggering an uninstall for another MSI (MsiExec can only have one running instance at a time).

It's probably possible as a workaround to implement a post build step to modify the MSI database an insert an UpgradeCode ourselves, but this is a highly undesirable approach due to the ongoing maintenance burden and it'll likely require re-adding Wix which we just removed.

The ideal solution would be to discover an undocumented XML flag or feature of Install4j to allow us to specify or otherwise control the generated MSI UpgradeCode(s), but we haven't found any hint of such a thing so far.

I'm open to any community suggestions. We're currently running Install4j v9, but any version that provides a viable solution will be a very strong business case for updating.

Share Improve this question asked Feb 13 at 15:04 Jason HiattJason Hiatt 211 silver badge3 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

For 11.0.3, I have added a compiled variable sys.ext.msiUpgradeCode that you can set under General Settings->Compiler Variables to set the upgrade code externally.

To get a build where this already implemented, please contact [email protected].

本文标签: windows installerSpecify UpgradeCode(s) for an MSI created via Install4jStack Overflow