WiX burn bootstrapping x86 and x64 msi's into single No-UI bootstrapper

我只是一个虾纸丫 提交于 2020-07-04 09:03:28

问题


I have x64 and x86 versions of my installer .msi, and want to ship a single executable which simply checks the machine architecture and runs the x86/x64 MSI. The MSIs are basically identical, they install the same AnyCPU files, which I bundle in a shared .cab file so as not to double the size of the installer.

So far I've tried WiX Burn, which pops up a GUI which I don't want (I just want to use the MSI GUI), and I tried disabling the burn GUI via /silent flag - this propagates this flag to the MSIs so it disables all GUI for MSIs (not what I want).

I think I am correct when I say there is no default No-GUI version of Burn bootstrapper, and to create one you must edit the source code yourself? This sounds like a massive missing feature?

I've also tried DotNetInstaller which has it's own set of problems with a confusing user interface. I've also tried setupbld which does not support MSIs with an external cab.


回答1:


For the architecture detection you could use the InstallCondition attribute in the MsiPackage element.

To put it simply try:

<MsiPackage SourceFile="..\Example\bin\Release\x86\example.msi" Compressed="no" InstallCondition="NOT VersionNT64" />
<MsiPackage SourceFile="..\Example\bin\Release\x64\example.msi" Compressed="no" InstallCondition="VersionNT64" />

Sources: http://wix.sourceforge.net/manual-wix3/wix_xsd_msipackage.htm




回答2:


As the other answers suggest you can use the VERSIONNT64 variable to check the on which platform you are installing.

Wix Burn supports NO-GUI or quiet mode by passing the command line parameter "-q".

Along with that it supports the following other arguments too:

The wixstdba supports only the "standard package switches":

-q, -quiet, -s, -silent = silent install 
-passive = progress bar only install 
-norestart = suppress any restarts 
-forcerestart = restart no matter what (I don't know why this is still around) 
-promptrestart = prompt if a restart is required (default) 
-layout = create a local image of the bootstrapper (i.e. download files so they can be burned to DVD) 
-l, -log = log to a specific file (default is controled by bundle developer) 
-uninstall = uninstall 
-repair = repair (or install if not installed) 
-package,-update = install (default if no -uninstall or -repair) 

Type your wixburnexename /? To get the details on your machine.




回答3:


You could use custom actions and Burn Built-in Variables to check whether you are running on X86 or x64. Based on this you could execute/arrange the list of actions.

<InstallExecuteSequence>
   <Custom Action="Windows32bitInstall" After="InstallFiles">NOT VersionNT64</Custom>
   <Custom Action ="Windows64bitInstall" After="InstallFiles" >VersionNT64</Custom>
   <Custom Action="InstallHelp" After="Windows64bitInstall">NOT Installed</Custom>
</InstallExecuteSequence>

This would execute with the same elevation.

<CustomAction Id="InstallHelp" Directory="ProgramFilesFolder"
          Execute="deferred" Impersonate="no" Return="ignore"
          ExeCommand="[HELPDIR]\help.exe /log" />


来源:https://stackoverflow.com/questions/14645142/wix-burn-bootstrapping-x86-and-x64-msis-into-single-no-ui-bootstrapper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!