-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start admin command prompt in selected directory #367
Conversation
9c71db4
to
8a927cb
Compare
Any comments on this one? |
Have you looked at bash? I'm wondering what if anything needs doing there. Does it allow arguments to be passed into the VM at all? There's also some indication from the WSL team that it should never be run as Administrator: microsoft/WSL#5727 |
No I havent't looked into bash, but we could in a separate PR |
I logged the original bug. I can test this on any Windows versions from NT to 11 or even earlier, in admin and non-admin accounts. However I would need someone to build a winfile.exe for me and share it to me. Let me know if you want me to do the testing. Thanks for looking into this bug |
I created a W2K/WXP branch based on @malxau-msft work/branch with 10.2.0.0 functionality except for symlinks. It can be downloaded here. |
Thanks
Ill test that and get back to you tomorrow
Can you do a 32 bit build as most of my machines are 32 prior to Windows 10
Scott
On Sun, 8 Jan 2023 at 9:44 pm, schinagl ***@***.***> wrote:
However I would need someone to build a winfile.exe for me and share it to
me. Let me know if you want me to do the testing.
A 64bit Windows version from my private
<https://github.com/schinagl/winfile/tree/_hermann> branch
can be downloaded here <https://schinagl.priv.at/nt/winfile/winfile.zip>.
I called this version 10.2.0.3. This is just *my* internal number.
—
Reply to this email directly, view it on GitHub
<#367 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6TBYSAA5S2NC5ER6J4CNDWRLADLANCNFSM6AAAAAAS4NFOC4>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Scott Hollows Email ***@***.*** Mobile 0417 973 958 LinkedIn
www.linkedin.com/in/scotthollows
|
> does your Win7 have UAC enabled, running a split-token Administrator
Im not sure as I cant check now, but Ill test it with and without UAC on
Administrator accounts and normal accounts
I can test the 64 bit version on Windows 10 - 11
If anyone can provide a 32 bit compiled exe Ill test that on Windows 7+ and
Ill go back as far as WIndows NT just for fun as well.
…On Mon, Jan 9, 2023 at 5:46 AM malxau-msft ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/wfcomman.c
<#367 (comment)>:
> + if (PathFileExists(szToRun)) {
+ wsprintf(szParams, ConEmuParamFormat, szDir);
+ bUseCmd = FALSE;
+ }
+ }
+
+ // use cmd.exe if ConEmu doesn't exist or we are running admin mode
+ if (bUseCmd) {
+ // NOTE: assume system directory and "\\cmd.exe" never exceed MAXPATHLEN
+ if (GetSystemDirectory(szToRun, MAXPATHLEN) != 0)
+ lstrcat(szToRun, TEXT("\\cmd.exe"));
+ else
+ lstrcpy(szToRun, TEXT("cmd.exe"));
+
+ if (bRunAs) {
+ // Windows >= 8 ignores the 5th parameter of ShellExecute aka 'lpDirectory' when elevating,
Just some theories - does your Win7 have UAC enabled, running a
split-token Administrator? (Mine had UAC disabled and I had to enable it
and create a new user account to test this PR.)
—
Reply to this email directly, view it on GitHub
<#367 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6TBYW7YWB5KZLHTFOMBT3WRMYTPANCNFSM6AAAAAAS4NFOC4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The current build environment emits binaries tagged for Vista and above. I know there are WOW functions used that don't exist in XP, so it may be possible to generate a binary for 2003 and up, but going earlier than that will need code changes. There's a "retro" branch trying to target older systems but it doesn't see much development, and changes to how UAC works wouldn't make much sense there. |
A 32bit Windows version from my private branch |
I tested the the release (10.2.0.3 INTERNAL) Overall, this is an improvement so I would be happy to go ahead with this change. I have noted a few low priority issues below I tested variations of :
Windows 7 (32 bit) would not run at all as expected.
I was not able to find my Windows Vista VM so I couldnt test that I am a bit suspiscious about the non Administrator account testing as I was able to start an elevated command shell in that account - that does not sound right to me so maybe someone else can test that to verify. Issues noted during testingThese low priority issues were noted during testing. ======================================================= steps to reproduce
More info - the Z: logical drive has a label of "OS" which it probably got from C: as that is also "OS" ======================================================= Steps to reproduce
Expected behaviour) the DOS shell should show the same directory when using CTRL K and CTRL SHIFT K Similar behaviour occurs if the drive is no longer available ======================================================= See demonstration Video steps to reproduce
More info - the Z: drive has a label of "Shared Folders" So, a few minor issues but overall it is an improvement and has not broken any other functionality |
@craigwims, @malxau-msft |
I logged the original issue #365 Please close this as resolved Thank you to everyone that helped with this |
* Start admin command prompt in selected directory * Show dependency between CmdParamFormat and ConEmuParamFormat * Removed comment Co-authored-by: schinagl <[email protected]>
No description provided.