Opening a shortcut to an app in the System32 folder starts the app in the wrong folder on a 64-bit OS
Posted: 29 Nov 2022 05:23
By starts in the wrong folder I mean the app is running from System32 as expected, but the working directory in the app is different from what you expected.
Steps to reproduce:
cmd.exe starts in the folder of your choice
Actual behavior:
cmd.exe starts in
Test environment:
XYplorer 23.80.0013
Windows 11 Version 22H2 (OS Build 22621.819)
(same behavior in Windows 7 for x64)
More details:
Breaks little scripts like
Applies not just to cmd.exe, but to other apps in System32 like Notepad and any apps you copied there. I tried with and without the "Open files from 64-bit process" option, but it makes no difference. There are a couple of workarounds: use the context menu to open the shortcut or point the shortcut to Sysnative or SysWOW64.
Steps to reproduce:
- Create a shortcut to
C:\Windows\System32\cmd.exe - Change the "start in" shortcut property to a folder of your choice
- Open the shortcut in XYplorer by double-clicking or the enter key
cmd.exe starts in the folder of your choice
Actual behavior:
cmd.exe starts in
C:\Windows\System32\Test environment:
XYplorer 23.80.0013
Windows 11 Version 22H2 (OS Build 22621.819)
(same behavior in Windows 7 for x64)
More details:
Breaks little scripts like
cmd.exe /c del *.exe that one might put in a shortcut, for example to clean up installers in their Downloads folder. I hope nobody ever tries running that one from an elevated XYplorer... Applies not just to cmd.exe, but to other apps in System32 like Notepad and any apps you copied there. I tried with and without the "Open files from 64-bit process" option, but it makes no difference. There are a couple of workarounds: use the context menu to open the shortcut or point the shortcut to Sysnative or SysWOW64.