What happens if I use SHGetFolderPath api call in a 32 bit system with CSIDL_PROGRAM_FILESx86 folder id instead of the CSIDL_PROGRAM_FILES id?
Theoretically CSIDL_PROGRAM_FILESx86 should map to C:\program files (x86) in a 64 bit system but what does it map to in a 32 bit system where this path doesn’t exist?
The different scenarios are described in this article on MSDN.
The interpretation of certain
KNOWNFOLDERIDvalues depends on whether the folder is part of a 32-bit or 64-bit application and whether that application is running on a 32-bit or 64-bit operating system. If your application needs to distinguish between, for example,Program FilesandProgram Files (x86), you must use the rightKNOWNFOLDERIDfor the situation.The following table summarizes the
KNOWNFOLDERIDuse in those cases.Summary: It will point to %SystemDrive%\Program Files