wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

Setting InstallLocation, InstallSource in the bundle ARP entry #8693

Open dliakh opened 1 month ago

dliakh commented 1 month ago

User story

Would it make sense to add a possibility to fill the 'InstallLocation', 'InstallSource' values in the (registry) ARP entry registered by bundles (like what's done in the installer if the ARPINSTALLOCATION property is set)?

There was a thread some 10 years ago where @barnson suggested filing a feature request https://www.mail-archive.com/wix-users@lists.sourceforge.net/msg61988.html but it looks nobody did that.

As an example, my attempt to really simply make it work somehow https://github.com/wixtoolset/wix/compare/main...dliakh:wix:bundle_install_location (haven't checked that yet, though)

Proposal

While I'm not particularly sure how setting InstallLocation, InstallSource might looks like from the point of view of the WiX bundle "XML authoring", that may be a element attribute, perhaps, in the simplest case (called like ARPInstallLocation (?)) that might contain "formatted" content with variable expansion at the installation time (to handle custom installation location specified through the bundle command line, for example)

Considerations

No response

benej60 commented 1 month ago

I would think InstallSource could just be set automatically to the folder where the bundle is being run from (as I believe the MSI already does). Not sure that should require additional config for a bundle.

The InstallLocation would require config, since that could be ambiguous with multiple packages in a bundle... but still useful to be able to choose what to set it to in the case where you have multiple packages but one of them is the "primary" install and you want to indicate its InstallLocation in the ARP (uninstall) entry for the bundle (since otherwise the separate packages of the bundle are generally hidden in the list).

barnson commented 3 weeks ago

Not sure InstallSource is useful these days; InstallLocation could be useful but would need to be authored, given that there isn't a single root directory Burn could pick.

benej60 commented 3 weeks ago

People may or may not find InstallSource useful to see where the installer was first run from, but it is set by an MSI by default, and quite easy to implement the same for a bundle.

Agreed for InstallLocation - per above it would have to be specified in some way to distinguish which package's InstallLocation should be used (which might need to be done just by optionally specifying the exact folder to use, which would be in the case of there being a single package more important than the others).

The main point here is that while in theory a bundle can have multiple equally important packages, I would think a very common use case is that you have 1 package that is the main application you're installing, and the bundle is used only to install some dependencies along with this 1 main application package. In this case, it would be preferable to have the Bundle's ARP entry basically be identical to the main package's ARP entry (or at least what it would be if not hidden). So far these 2 properties seem to be the main ones where this is still a challenge.