runners: stm32cubeprogrammer: fix program files path for win x64
The '%ProgramFiles%' is not guaranteed to be 'C:\Program Files' on
Windows x64.
The value will be 'C:\Program Files (x86)' if the west is executed by
32-bit Python.
To correct the issue '%ProgramW6432%' must be used.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
diff --git a/scripts/west_commands/runners/stm32cubeprogrammer.py b/scripts/west_commands/runners/stm32cubeprogrammer.py
index 12fa5ce..026e532 100644
--- a/scripts/west_commands/runners/stm32cubeprogrammer.py
+++ b/scripts/west_commands/runners/stm32cubeprogrammer.py
@@ -89,7 +89,7 @@
if x86_path.exists():
return x86_path
- return Path(os.environ["PROGRAMFILES"]) / cli
+ return Path(os.environ["PROGRAMW6432"]) / cli
if platform.system() == "Darwin":
return (