I need to change a configuration file in C:\Windows\System32\ but wix installer copies it in C:\Windows\SysWOW64.
Asked
Active
Viewed 1,016 times
-2
-
3What's a question? System32 is for 64-bit binaries, SysWoW64 for 32-bit, that's the guidelines. What does not work and what do you expect? – bunglehead Dec 21 '18 at 18:26
1 Answers
1
Just a short illustration:
- Set the Platform to
x64
in the Package element. - For the hosting component set the
Win64 attribute
to yes, and install toSystem64Folder
.
1. Package Element:
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
2. WiX WXS Snippet:
<Directory Id="System64Folder">
<Component Feature="ProductFeature" Win64="yes">
<File Source="TestFile.txt" />
</Component>
</Directory>
And a few things:
- Files installing to the System folder are generally supposed to be set permanent (validation error or warning if you do not)
- You should not install to the System folder if you can help it. What file is this?

Stein Åsmul
- 39,960
- 25
- 91
- 164
-
-
It does not look like it does, no: [See here](http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/heat-exe-Add-attribute-Win64-quot-yes-quot-to-Component-elements-td4947690.html) - try the search and replace approach suggested? `Candle.exe` also supports the -arch switch, check its documentation by running `Candle.exe` without switches in a command prompt - not sure how well it works, but it allows you to set default architecture. – Stein Åsmul Jul 01 '21 at 23:13
-
There are also new developments in newer versions of WiX that I haven't researched and there is WiX's commercial branch FireGiant's [HeatWave Harvesting feature](https://www.firegiant.com/wix/wep-documentation/harvesting/) that I have also not tried. As you can tell I haven't looked at this for a long time, but [here is an older answer of mine on heat.exe issues](https://stackoverflow.com/a/47755780/129130) (towards bottom). And [another old answer on "Paraffin" etc...](https://stackoverflow.com/a/55977336/129130). – Stein Åsmul Jul 01 '21 at 23:13
-
See Rob Mensching's blog for developments in WiX 4 (preview): [WiX Toolset v4-preview.0](https://robmensching.com/blog/posts/2021/5/17/wix-toolset-v4-preview.0/) - where `candle.exe` and `light.exe` seem to have been merged. I am not sure what else has happened or if `heat.exe` is affected. – Stein Åsmul Jul 01 '21 at 23:19
-
Tried -arch, didn't seem to make a difference. Can't use paraffin, this is a company server. :/ Search and replace seems so... ugh. Whats the point of using Wix then? If I'm going to be writing custom scripts, I might as well just roll my own installer, dispense with all this GUID nonsense. – john k Jul 02 '21 at 22:00