Trying to get a wix installer to kill a process, from what I have found online it looks like this is the way to go:
<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"/>
The problem I have is building the project will throw the following error complaining about the windows property:
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.
I have tried [#WindowsFolder] instead, it removes the error but does not solve the issue. Using the full address (C:\Windows\System32\taskkill.exe) instead for the value does work but I would like to avoid that.