2013-02-01 90 views
10

我有我的安裝程序.msi的x64和x86版本以及想要發佈一個簡單的可執行程序,它只是檢查機器體系結構並運行x86/x64 MSI 。 MSI基本上是相同的,它們安裝了相同的AnyCPU文件,我將它們打包在一個共享的.cab文件中,以免將安裝程序的大小加倍。WiX將x86和x64 msi引導到單個無UI引導程序

到目前爲止,我已經嘗試了WiX Burn,它彈出一個我不想要的GUI(我只是想使用MSI GUI),並且我嘗試通過/ silent標誌禁用刻錄GUI - 這會傳播這個標誌給MSIs,所以它禁用了所有的MSI GUI(不是我想要的)。

我認爲我說得對,當我說沒有默認的無GUI版本的燒傷引導程序,並創建一個你必須自己編輯源代碼?這聽起來像是一個巨大的缺失功能?

我也試過DotNetInstaller,它有自己的一套問題與混淆的用戶界面。我也試過setupbld,它不支持帶外部cab的MSI。

回答

-3

您可以使用自定義操作和Burn Built-in Variables來檢查您是否在X86或x64上運行。基於此,您可以執行/安排操作列表。

<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> 

這將使用相同的高程執行。

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

WIX bundle/bootstrapper中沒有自定義操作。這不是一個MSI,並沒有MSI屬性/功能,它是一個exe /應用程序,它有助於鏈接! – Isaiah4110

8

對於體系結構檢測,您可以使用MsiPackage元素中的InstallCondition屬性。

簡單地嘗試:

<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" /> 

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

1

至於其他的答案建議你可以使用VERSIONNT64變量來檢查你安裝哪個平臺上。

Wix Burn通過傳遞命令行參數「-q」來支持NO-GUI或安靜模式。

隨着它支持以下其他參數也:

的wixstdba只支持 「標準包交換機」:

-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) 

鍵入wixburnexename /?在您的機器上獲取詳細信息。