Queries I tried: ExpandEnvironmentStrings("%COMMONPROGRAMFILES%")
, GetSpecialPath(CSIDL_PROGRAM_FILES_COMMON)
.
All resolve to (typically) c:\\Program Files (x86)\\Common Files
from my 32-bit app. I need to check a file version installed (typically) under c:\\Program Files\\Common Files
of a 64-bit application.
On 64-bit operating systems, the ProgramW6432 environment variable points to c:\program files. The full list for a 32-bit app on an English version of Windows:
Just a reminder: that folder should not contain anything of interest to a 32-bit program. Technically. Beware of the file system redirector, it will redirect file requests from c:\program files to c:\program files (x86). You'd have to use Wow64DisableWow64FsRedirection() if you'd actually wanted to access files in that directory.