On 64-bit Win7, is it wrong to install 32-bit apps to (drive letter):\Program Files rather than \Program Files (x86)? If wrong should installer prevent this? If installer allows it, what app behavior is appropriate?

Background: WinZip 14.0 (a Win7-compatible 32-bit app) won't run if installed to c:\Program Files. If installed to any other alternate path or folder name it runs OK. 

By convention starting with Vista, c:\Program Files (x86) is for 32 bit apps and c:\Program Files for 64-bit apps. But installers allow overriding the install path AND folder name. E.g, maybe I want 32 bit apps in c:\Program Files and 64 bit apps in c:\Program Files (x64). 

If c:\Program Files is a restricted location for 32 bit apps, should not the installer and/or OS enforce this, rather than allow installation then break the app? What is the correct practice for BOTH users installing apps AND developers porting apps to Win7?

 

Question Info


Last updated March 24, 2018 Views 2,295 Applies to:
Answer
64-bit applications should be installed to C:\Program files and 32-bit applications to C:\Program Files (x86).

The \Common Files in those locations can be very different which is why it is important to maintain the correct segregation of the applications so that, when relevant. they call the correct type of sub-routine or dll.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Answer

As you state, Windows Installer by Default handles the installation  location of the program depending on the version.

Problems may arise if the program code relies on variables such as %programfiles(x86)%, %ProgramW6432%, or %programfiles% when running.

%ProgramFiles%
This variable points to Program Files directory, which stores all the installed program of Windows and others. The default on English-language systems is C:\Program Files. In 64-bit editions of Windows (XP, 2003, Vista), there are also %ProgramFiles(x86)% which defaults to C:\Program Files (x86) and %ProgramW6432% which defaults to C:\Program Files. The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by Windows-on-Windows 64-bit redirection).

Environment variable
http://en.wikipedia.org/wiki/Environment_variable

I think you must follow the convention of installing x86 applications in to Program Files (x86) and 64-bit in to Program Files.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.