[英]WiX Bootstrapper WPF custom UI
我從這里閱讀並運行示例。
一些問題:
4.如何從MSI文件INSTALLFOLDER,TARGETDIR和其他值中獲取(設置)?
Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperApplication
將告訴您正在計划或執行的msi程序包,您還可以獲取有關其正在執行哪個安裝操作的信息,並檢查在安裝過程中由此引發的事件。 2。
在您的引導程序WPF應用中
//ba is an instance of BootstrapperApplication
this.ba.Engine.StringVariables["ServerInstallLoc"] = "YOUR DATA"
Bundle.wxs
<!-- Install paths provided by the managed bootstrapper interface -->
<Variable Name="ServerInstallLoc" bal:Overridable="yes" Type="string" Value=""></Variable>
然后引用這個變量
<MsiPackage Id="MyInstaller" SourceFile="$(var.MyInstallerMsiProjectName.TargetPath)" Compressed="yes" DisplayInternalUI="no">
<!-- Pass wix bundle variable to MSI property -->
<MsiProperty Name="SERVER_INSTALL_OVERRIDE" Value="[ServerInstallLoc]"/>
</MsiPackage>
!(bind.packageVersion.PackageName)
假設<MsiPackage>
元素之一稱為PackageName 。 活頁夾變量參考 對於問題4,請看以下內容: http : //www.wrightfully.com/allowing-the-user-to-select-the-install-folder/
您也可以查看Wix托管的引導程序,因為我相信它也可以做到這一點。 您可以在此處下載源代碼: https : //github.com/wixtoolset/wix3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.