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...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
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: 65533
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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