Reputation: 23093
I am using a default Visual Studio Setup Project to create an installer for my application.
The application is built as "Any CPU" and runs as a 64bit process on x64 OSes, but the installer always uses "Program Files (x86)" as the default directory.
Is it possible to always use "Program Files" as the default so it is in the correct folder on a x64 OS?
Upvotes: 3
Views: 2625
Reputation: 21416
Only 64-bit packages can use Program Files on a 64-bit machine.
In Visual Studio setup projects the only solution is to use separate 32-bit and 64-bit packages. A 32-bit package for 32-bit systems and a 64-bit package for 64-bit systems.
Some commercial setup authoring tools (for example Advanced Installer or InstallShield) allow you to create mixed 32/64-bit packages which automatically adapt to the target platform (32-bit or 64-bit).
But do you really need a 64-bit package?
Upvotes: 2