2016-06-29 55 views
0

我想在Wix Bootstrapper(* .wxs)源文件中檢測安裝條件。 Wix在文檔here中聲明「刻錄內置變量」。Wix刻錄條件是什麼Wix「刻錄內置變量」設置?

我的源代碼如下所示:

<util:RegistrySearch 
    Id="SearchForMyProduct" 
    Variable="MyProductIsInstalled" 
    Result="exists" 
    Root="HKLM" 
    Key="SYSTEM\CurrentControlSet\services\MyProduct" /> 

<bal:Condition Message="service was found. MyProduct is already installed. Please uninstall and try again"> 
    (WixBundleAction = 3) AND (MyProductIsInstalled = 0) 
</bal:Condition> 

我不刻錄日誌WixBundleAction設置見。無論我測試WixBundleAction針對什麼值,(WixBundleAction = 3)都是FALSE。無論我通過雙擊還是從命令行執行安裝程序,行爲都是相同的。

回答

0

它取決於變量。對於WixBundleAction,文檔說明它在捆綁包啓動時(基於命令行參數)以及計劃階段發生。

WixBundleAction - set to the numeric value of BOOTSTRAPPER_ACTION 
        from the command-line and updated 
        during the call to IBootstrapperEngine::Plan().