試圖讓維克斯安裝程序來殺死一個進程,從我在網上找到它看起來這是要走的路:WindowsFolder財產EXE地址的一部分不工作
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WindowsFolder" Name="WINDOWS"/>
<Property Id="QtExecCmdLine" Value='"[WindowsFolder]System32\taskkill.exe" /F /IM Foo.exe'/>
<CustomAction Id="KillTaskProcess" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="ignore"/>
這個問題我有正在建設的項目將引發以下錯誤抱怨Windows屬性:
The 'QtExecCmdLine' Property contains '[WindowsFolder]' in its value which is an illegal reference to another property. If this value is a string literal, not a property reference, please ignore this warning. To set a property with the value of another property, use a CustomAction with Property and Value attributes.
我已經試過[#WindowsFolder]相反,它消除了錯誤,但沒有解決問題。 使用完整的地址(C:\ Windows \ System32 \ taskkill.exe)而不是值的工作,但我想避免這一點。