Opening a shortcut to an app in the System32 folder starts the app in the wrong folder on a 64-bit OS

Things you’d like to miss in the future...
Post Reply
Kyle
Posts: 10
Joined: 21 May 2022 00:42

Opening a shortcut to an app in the System32 folder starts the app in the wrong folder on a 64-bit OS

Post by Kyle »

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:
  1. Create a shortcut to C:\Windows\System32\cmd.exe
  2. Change the "start in" shortcut property to a folder of your choice
  3. Open the shortcut in XYplorer by double-clicking or the enter key
Expected behavior:
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... :lol:

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.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Opening a shortcut to an app in the System32 folder starts the app in the wrong folder on a 64-bit OS

Post by admin »

Confirmed! :tup: Should be fixed in the next beta.

Post Reply