Hey folks, I ran into an issue with an installer I created for a plugin of another software package. I read the other application's installation directory from its corresponding registry hive, then assign it as the destination for SetOutPath. In a non-English OS, the registry lists this path in its English equivalent, so if you're on a German OS, C:\Programme (x86) is listed as C:\Program Files (x86).
The problem I see is that none of the files that were intended to be copied actually get written to C:\Programme (x86). This might seem like an obvious open and shut scenario, but Microsoft supports the interchangeable use of English version in such situations. For example, in command prompt, the folder "C:\Programme (x86)" can be identified as follows:
code:
C:\>cd Program Files (x86)
C:\Program Files(x86)>
So is this a known limitation for SetOutPath that it does not treat the English version as a sort of alias path for the default install folder? Should I use the following steps as a workaround or is there a better way?
- Detect OS language. If not English, do the following:
- Determine if "Program Files" or "Program Files (x86)" is in the path. If so, replace with $PROGRAMFILES or $PROGRAMFILES32 and see if the expected directory is present.