I am writing a program that requires to run in 32 bits mode. This program reads the registry for file path and some are written using Windows environment variables such as "%PROGRAMFILES%\MySoftware".
My problem is that when I use ExpandEnvironmentStrings() I am getting "C:\Program Files (x86)\MySoftware" because my executable is 32 bits but the path that I am looking for is "C:\Program Files\MySoftware".
Turning off Wow64 does not affect ExpandEnvironmentStrings().
My solution would be to code my own "ExpandEnvironmentStrings()" function but there is probably better solution.