所以我試圖安裝使用TopShelf,本身運行良好,沒有任何問題的應用程序構建的應用程序。我遇到的問題是當我嘗試安裝服務時。 TopShelf服務使用myapp.exe install <options>
指令安裝(從管理員命令行)。我已經將該指令包裝在自定義操作中(請參閱下文)。這是運行的,因爲我可以在安裝時看到一個黑盒彈出窗口。但是,該服務無法安裝。當我從管理員命令行運行msi安裝時,該服務將正確安裝。我已將所有與管理員相關的參數包含在WiX文件中(另見下文)。我完全沒有想法,需要幫助,任何人都可以在WiX文件中看到任何內容,或者是否有人知道什麼阻止了服務的安裝?與維克斯安裝TopShelf失敗,因爲管理員權限
我曾嘗試:
Topshelf - Custom Action in Wix Not Executing
Add Coffee and Shake Well - TopShelf
我也曾嘗試包裹調用在一個單獨的WiX的自定義操作項目執行topshelf應用程序,這也失敗了相同原因。
<Product Id="*" Name="PackageName"
Language="1033"
Version="1.0.0.0"
Manufacturer="Manufacturer"
UpgradeCode="e7780903-3cf9-4ecc-b65a-45bc18b500df">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
InstallPrivileges="elevated"
Platform="x64" />
<Property Id="MSIUSEREALADMINDETECTION" Value="1" />
<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A newer version of [ProductName] is already installed."
Schedule="afterInstallInitialize" />
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="FeatureName" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<CustomAction Id="InstallService"
FileKey="MyApp.exe"
ExeCommand="install"
Impersonate="yes"
Execute="immediate" />
<CustomAction Id="StopService"
FileKey="MyApp.exe"
ExeCommand="stop"
Execute="immediate" />
<CustomAction Id="UninstallService"
FileKey="MyApp.exe"
ExeCommand="uninstall"
Execute="immediate" />
<InstallExecuteSequence>
<Custom Action="InstallService" After="InstallFinalize" >
NOT Installed AND NOT REMOVE
</Custom>
<Custom Action="StopService" After="InstallInitialize" >
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
<Custom Action="UninstallService" After="StopService">
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
</InstallExecuteSequence>
</Product>
感謝您的意見,應嘗試deferrered敲定變化時,我得到了一會兒以後。該topshelf生態系統是值得一看,它包裝了Windows服務啓動停止和配置,從而使Windows服務項目可以從調試沒有包裝它作爲一個控制檯應用程序來運行,也可以從主應用程序與開關安裝沒有重新編譯等。絕對值得一看,我的解釋並不是很棒! –
繼承人一個鏈接:http://topshelf-project.com –
布里爾,你是正確的,改變CA有:'冒充=「無」','執行=「延期」'並設置執行'=前「InstallFinalize」'感謝您的幫助!只是要弄清楚現在卸載!從來沒有這麼麻煩! –