microsoft / winfile

Original Windows File Manager (winfile) with enhancements
MIT License
6.76k stars 699 forks source link

Start command shell in Administrator mode (Ctrl Shift K) starts in wrong folder #365

Closed ScottHollows closed 1 year ago

ScottHollows commented 1 year ago

Issue) If you press CTRL SHIFT K the command shell opens in Administrator mode with the current working directory being C:\Windows\system32

Expected Behaviour the current working directory should be the current directory in file manager

This issue only occurs when opening the shell in Administrator mode (CTRL SHIFT K). It does not occur when opening the shell in normal mode (CTRL K)

When fixing the issue, please test for the current drive being C: and also test another drive as well as C: is the default

Occurs in;

schinagl commented 1 year ago

I came around this too, but I doubt this is a bug but more a feature:

The 'Start in' is explicitly ignored when elevation is performed so that malicious binaries can do less harm.

We could overcome this by appending /k cd /d \<path> when issuing cmd.exe

craigwims commented 1 year ago

Well, it is not by design, just a bug I never got around to fixing.

schinagl commented 1 year ago

Then lets change it: #367

schinagl commented 1 year ago

367 has been merged. Can we close this now?

ScottHollows commented 1 year ago

I logged the bug.

I am closing it now as resolved

Thank you to everyone who helped with this