We set the Endless Key (Windows)'s metrics ID by detecting the directory
path. However, the original pattern "Program Files\WindowsApps"'s
"Program Files" might be other string with different localization. For
example, "Program Files" in French will be "Programmes". This will
confuse the metrics. Even, the app is installed from an APPX package or
Microsoft store.
This patch replaces the "Program Files" with the environment variable
%PROGRAMFILES% on Windows, which already takes care the localization.
We set the Endless Key (Windows)'s metrics ID by detecting the directory path. However, the original pattern "Program Files\WindowsApps"'s "Program Files" might be other string with different localization. For example, "Program Files" in French will be "Programmes". This will confuse the metrics. Even, the app is installed from an APPX package or Microsoft store.
This patch replaces the "Program Files" with the environment variable %PROGRAMFILES% on Windows, which already takes care the localization.
https://phabricator.endlessm.com/T33688