我正在嘗試使用WiX爲我的軟件編寫MSI安裝程序/卸載程序。該軟件帶有一個始終一起運行的本地服務和相關的用戶模式進程,即當服務停止時,我的服務自動關閉用戶模式進程。 (否則,如果用戶模式進程本身終止該服務將嘗試重新啓動它。)需要一些關於使用WiX卸載我的服務的說明
所以對於卸載我想出了以下加價:
<Component Id="idCmp_MySrvc"
Guid="MY_GUID">
<File Id="idFile_srvc.exe"
Name="srvc.exe"
Source="Sources\Code\srvc.exe"
Vital="yes"
KeyPath="yes" />
<File Id="idFile_usermodule.exe"
Name="usermodule.exe"
Source="Sources\Code\usermodule.exe"
Vital="yes"
KeyPath="yes" />
<ServiceControl Id="idMySrvc"
Name="MyServiceName"
Stop="uninstall" />
</Component>
的想法是,當服務停止時,它將關閉我的usermodule.exe
進程。
但有是三個問題/浮現在腦海的問題:
1:當我編譯此,它給了我下面的錯誤:
error CNDL0042: The Component element has multiple key paths set. The key path may only be set to 'yes' in extension elements that support it or one of the following locations: Component/@KeyPath, File/@KeyPath, RegistryValue/@KeyPath, or ODBCDataSource/@KeyPath.
2:如何確保MSI在卸載檢查期間不打擾usermodule.exe
進程?
3:是否需要添加特定於我的服務和/或用戶模式進程的任何內容以使其符合卸載過程?