ExplorerPatcher icon indicating copy to clipboard operation
ExplorerPatcher copied to clipboard

Opening Windows PowerShell (Admin) from context menu opens powershell unprivileged

Open sudoeste opened this issue 2 years ago • 33 comments

Right clicking start icon (or pressing win +x) and selecting Windows PowerShell (Admin) should open powershell in admin mode but opens unprivileged.

After doing that, rightclicking the same windows start menu icon (or once again pressing win + x) will crash explorer.exe.

This bug exists since the early days of ExplorerPatcher

sudoeste avatar Sep 23 '23 17:09 sudoeste

Does it prompt you to elevate when you try to open Windows PowerShell (Admin)?

Please post windows version and build. You can find this by running winver. Please post explorer patcher version.

Please include what settings you changed in explorer patcher properties application.

pyrates999 avatar Sep 24 '23 02:09 pyrates999

No, it doesn't prompt uac.

Every version of explorer patch, every version of windows, stock settings. The bug exists since the very first version I tried

sudoeste avatar Sep 24 '23 10:09 sudoeste

Please post windows version and build. You can find this by running winver. Please post explorer patcher version.

Please include what settings you changed in explorer patcher properties application.

pyrates999 avatar Sep 25 '23 01:09 pyrates999

As I said, it happens in every windows 11 version and build for at least a year. It also happens in every Explorer Patcher version for at least a year.

You don't have to change any option, just install Explorer Patcher and the problem is there, it's terribly simple to reproduce as it happens always

sudoeste avatar Sep 25 '23 06:09 sudoeste

Please post windows version and build. You can find this by running winver. Please post explorer patcher version.

If you don't provide this, then this may be closed due to not enough information provided.

pyrates999 avatar Sep 25 '23 06:09 pyrates999

Winver: 22621.2283 Explorer patcher: 22621.2283.57.2

As I said happens in every single windows and patcher version without changing any option for more that a year.

sudoeste avatar Sep 25 '23 07:09 sudoeste

Winver: 22621.2361 With 22621.2361.58.4 seems have the same error.

PaienNate avatar Oct 08 '23 09:10 PaienNate

Winver: 22H2 (OS Build 22621.2428 EP: 22621.2361.58.4 I have 2 machines exhibiting the same issue. Both machines have the same winver and EP are the same on both machines. I cannot get elevated PowerShell on either machine. Also, Explorer restarts when right clicking start button the first time, then works correctly the second time but still won't give me Admin privileges on powershell. If I run a windows command prompt as administrator it gives me the UAC window and allows me to work as administrator.

Tom-McW avatar Oct 14 '23 19:10 Tom-McW

Winver: 22H2 (OS Build 22621.2428 EP: 22621.2361.58.4 I have 2 machines exhibiting the same issue. Both machines have the same winver and EP are the same on both machines. I cannot get elevated PowerShell on either machine. Also, Explorer restarts when right clicking start button the first time, then works correctly the second time but still won't give me Admin privileges on powershell. If I run a windows command prompt as administrator it gives me the UAC window and allows me to work as administrator.

Please file the start menu crash as a new issue. Include the windows version and build and the EP version installed like you did here.

pyrates999 avatar Oct 15 '23 03:10 pyrates999

Winver: Windows 11 Home, 23H2 (22631.3007) Explorer patcher: 22621.2861.62.2

Steps to reproduce:

  1. Install ExplorerParcher
  2. Switch taskbar style to Windows 10 taskbar style
  3. Right-click the start menu button to open the context menu
  4. Click on Windows PowerShell (Administrator)
  5. An unprivileged PowerShell window (on my machine it's a Windows Terminal window) will open
  6. Re-do step 3 and step 4
  7. Explorer will crash

This only happens when using Windows 10 taskbar style. When using Windows 11 taskbar style, the admin powershell context menu entry works fine.

BLumia avatar Jan 17 '24 13:01 BLumia

Winver: Windows 11 Home, 23H2 (22631.3007) Explorer patcher: 22621.2861.62.2

Steps to reproduce:

  1. Install ExplorerParcher
  2. Switch taskbar style to Windows 10 taskbar style
  3. Right-click the start menu button to open the context menu
  4. Click on Windows PowerShell (Administrator)
  5. An unprivileged PowerShell window (on my machine it's a Windows Terminal window) will open
  6. Re-do step 3 and step 4
  7. Explorer will crash

This only happens when using Windows 10 taskbar style. When using Windows 11 taskbar style, the admin powershell context menu entry works fine.

Check what happens when using the console in explorer patcher. Open up the properties application for explorer patcher, go to advanced, and click on enable console.

pyrates999 avatar Jan 17 '24 14:01 pyrates999

Check what happens when using the console in explorer patcher. Open up the properties application for explorer patcher, go to advanced, and click on enable console.

Well... seems nothing special:

https://github.com/valinet/ExplorerPatcher/assets/10095765/f515b04c-086f-4864-a7a7-18f2c5dd06c9

As you can see, I tried to reproduce this issue 2 times. Console log can also be found in this video. Let me know if you need any additional information.

BLumia avatar Jan 18 '24 01:01 BLumia

Can you copy and paste the text from the EP console to here?

pyrates999 avatar Jan 18 '24 12:01 pyrates999

Can you copy and paste the text from the EP console to here?

Sure:

Running on Windows 11, OS Build 10.0.22631.3007.
Loaded symbols
Setup user32 functions done
CAppResolverCacheBuilder::_AddUserPinnedShortcutToStart() = 47780
Patched taskbar transparency in newer OS builds
ITrayUIHost = 3B2318
explorer.exe!TrayUI_CreateInstance() = 19B6DC
Setup explorer functions done
Setup uxtheme functions done
[AC] rcMonitorAssignment = 247F1
[AC] rcWorkAssignment = 248A1
[AC] blockBegin = 24806
[AC] blockEnd = 248B7
[AC] Patched!
[CC] rcMonitorAssignment = 66EFB
[CC] rcWorkAssignment = 66FC8
[CC] blockBegin = 66F13
[CC] blockEnd = 66FE1
[CC] Patched!
[TC] rcMonitorAssignment = 5B6A0
[TC] rcWorkAssignment = 5B756
[TC] blockBegin = 5B6BA
[TC] blockEnd = 5B76F
[TC] Patched!
[TV] firstCallPrep = 2F665
[TV] firstCallCall = 2F66F
[TV] Patched!
[HC] match1 = 1D56D
[HC] match2 = 1D634
[HC] writeAt = 1D22E
[HC] cleanup = 1D645-1D65A
[HC] Patched!
PenMenuSystemTrayManager::GetDynamicSystemTrayHeightForMonitor() = 45D430
Setup twinui.pcshell functions done
Setup combase functions done
Setup twinui functions done
Setup stobject functions done
Setup bthprops functions done
Setup pnidui functions done
Setup shell32 functions done
Setup windows.storage functions done
[IME] Context menu patch status: 1
Setup inputswitch functions done
wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_TaskbarMultiMon_38545217>::__private_IsEnabled() = 10BEB8
Setup windowsudk.shellcommon functions done
Setup peopleband functions done
Installed hooks.
Play startup sound thread...
Signal shell ready...
Started "Signal shell ready" thread.
Open Start on monitor thread
EP Service Window thread
Started "Open Start on current monitor" thread.
Initialized taskbar centering module.
Registered Win+A, Win+B, and Win+N
Progman: 1969906
Progman hook: 131657
[Positioning] Added settings for monitor 0000000000010001 : 0
>>> Signal shell ready.
Setup sndvolsso functions done
Ended "Signal shell ready" thread.
Started "Play startup sound" thread.
Ended "Play startup sound" thread.
0 0
[Updates] Starting daemon.
[Updates] Configured update policy on this system: "Check for updates but let me choose whether to download and install them".
[Updates] Path to module: C:\WINDOWS\dxgi.dll
[Updates] Checking against hash "22622.2861.62.2.c2b7c0292fff8608"
[Updates] Update URL: https://github.com/valinet/ExplorerPatcher/releases/latest/download/ep_setup.exe

To be clear it is the log shown after ExplorerPatcher is restored from crash. The log is completely empty when the unprivileged PowerShell is shown instead of crashing. Since this issue is very easy to reproduce, I suggest follow https://github.com/valinet/ExplorerPatcher/issues/2156#issuecomment-1895817541 to try to reproduce.

BLumia avatar Jan 19 '24 05:01 BLumia

Ok, thanks. Please wait for a developer to respond.

pyrates999 avatar Jan 19 '24 13:01 pyrates999

This happens to me. With Windows 11 23H2, win+x+a+enter doesn't uac no prompt, and launches user permissions terminal or power shell. doesn't matter if I click it or press enter or a key. Uninstalled explorer patcher, rebooted. works now. prompts me unlike with this installed.

ascendbeing avatar Feb 19 '24 20:02 ascendbeing

I enabled the console. When i right click on START with windows 10 taskbar style, the explorer restarts and the log output is below: (with win11 taskbar style, this issue does not occur!)

Running on Windows 11, OS Build 10.0.22631.3155.
Loaded symbols
Setup user32 functions done
CAppResolverCacheBuilder::_AddUserPinnedShortcutToStart() = 47480
Patched taskbar transparency in newer OS builds
ITrayUIHost = 3BB318
explorer.exe!TrayUI_CreateInstance() = 1A447C
Setup explorer functions done
Setup uxtheme functions done
[AC] rcMonitorAssignment = 396C1
[AC] blockBegin = 396D6
[AC] blockEnd = 39787
[AC] Patched!
[CC] rcMonitorAssignment = 34CBB
[CC] rcWorkAssignment = 34D88
[CC] blockBegin = 34CD3
[CC] blockEnd = 34DA1
[CC] Patched!
[TC] rcMonitorAssignment = 355D0
[TC] blockBegin = 355EA
[TC] blockEnd = 3569F
[TC] Patched!
[TV] firstCallPrep = 24E35
[TV] firstCallCall = 24E3F
[TV] Patched!
[HC] match1 = 1D56D
[HC] match2 = 1D634
[HC] writeAt = 1D22E
[HC] cleanup = 1D645-1D65A
[HC] Patched!
PenMenuSystemTrayManager::GetDynamicSystemTrayHeightForMonitor() = 480A40
Setup twinui.pcshell functions done
Setup combase functions done
Setup twinui functions done
Setup stobject functions done
Setup bthprops functions done
Setup pnidui functions done
Setup shell32 functions done
Setup windows.storage functions done
[IME] Context menu patch status: 1
Setup inputswitch functions done
wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_TaskbarMultiMon_38545217>::__private_IsEnabled() = 110E68
Setup windowsudk.shellcommon functions done
Setup peopleband functions done
Installed hooks.
Play startup sound thread...
Signal shell ready...
Started "Signal shell ready" thread.
Open Start on monitor thread
Started "Open Start on current monitor" thread.
EP Service Window thread
Initialized taskbar centering module.
[Positioning] Added settings for monitor 0000000000010001 : 0
Registered Win+A, Win+B, and Win+N
Progman: 459364
Progman hook: 786605
0 0
>>> Signal shell ready.
Setup sndvolsso functions done
Ended "Signal shell ready" thread.
Started "Play startup sound" thread.
Ended "Play startup sound" thread.
[Updates] Starting daemon.
[Updates] Configured update policy on this system: "Check for updates but let me choose whether to download and install them".
[Updates] Path to module: C:\Windows\dxgi.dll
[Updates] Checking against hash "22622.3007.63.3.7638f76208571b7c"
[Updates] Update URL: https://github.com/valinet/ExplorerPatcher/releases/latest/download/ep_setup.exe
[Updates] Hash of remote file is "22622.3007.63.3.7638f76208571b7c" (valid).
[Updates] Local version obtained from hash is 22622.3007.63.3.
[Updates] No updates are available.

gregkotsaftis avatar Feb 21 '24 10:02 gregkotsaftis

I enabled the console. When i right click on START with windows 10 taskbar style, the explorer restarts and the log output is below: (with win11 taskbar style, this issue does not occur!)

Running on Windows 11, OS Build 10.0.22631.3155.
Loaded symbols
Setup user32 functions done
CAppResolverCacheBuilder::_AddUserPinnedShortcutToStart() = 47480
Patched taskbar transparency in newer OS builds
ITrayUIHost = 3BB318
explorer.exe!TrayUI_CreateInstance() = 1A447C
Setup explorer functions done
Setup uxtheme functions done
[AC] rcMonitorAssignment = 396C1
[AC] blockBegin = 396D6
[AC] blockEnd = 39787
[AC] Patched!
[CC] rcMonitorAssignment = 34CBB
[CC] rcWorkAssignment = 34D88
[CC] blockBegin = 34CD3
[CC] blockEnd = 34DA1
[CC] Patched!
[TC] rcMonitorAssignment = 355D0
[TC] blockBegin = 355EA
[TC] blockEnd = 3569F
[TC] Patched!
[TV] firstCallPrep = 24E35
[TV] firstCallCall = 24E3F
[TV] Patched!
[HC] match1 = 1D56D
[HC] match2 = 1D634
[HC] writeAt = 1D22E
[HC] cleanup = 1D645-1D65A
[HC] Patched!
PenMenuSystemTrayManager::GetDynamicSystemTrayHeightForMonitor() = 480A40
Setup twinui.pcshell functions done
Setup combase functions done
Setup twinui functions done
Setup stobject functions done
Setup bthprops functions done
Setup pnidui functions done
Setup shell32 functions done
Setup windows.storage functions done
[IME] Context menu patch status: 1
Setup inputswitch functions done
wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_TaskbarMultiMon_38545217>::__private_IsEnabled() = 110E68
Setup windowsudk.shellcommon functions done
Setup peopleband functions done
Installed hooks.
Play startup sound thread...
Signal shell ready...
Started "Signal shell ready" thread.
Open Start on monitor thread
Started "Open Start on current monitor" thread.
EP Service Window thread
Initialized taskbar centering module.
[Positioning] Added settings for monitor 0000000000010001 : 0
Registered Win+A, Win+B, and Win+N
Progman: 459364
Progman hook: 786605
0 0
>>> Signal shell ready.
Setup sndvolsso functions done
Ended "Signal shell ready" thread.
Started "Play startup sound" thread.
Ended "Play startup sound" thread.
[Updates] Starting daemon.
[Updates] Configured update policy on this system: "Check for updates but let me choose whether to download and install them".
[Updates] Path to module: C:\Windows\dxgi.dll
[Updates] Checking against hash "22622.3007.63.3.7638f76208571b7c"
[Updates] Update URL: https://github.com/valinet/ExplorerPatcher/releases/latest/download/ep_setup.exe
[Updates] Hash of remote file is "22622.3007.63.3.7638f76208571b7c" (valid).
[Updates] Local version obtained from hash is 22622.3007.63.3.
[Updates] No updates are available.

reproduced it. winver: 22631.3227 ExplorerPatcher version: 22621.2861.62.2

k23450987 avatar Mar 09 '24 10:03 k23450987

I figured out (with latest stable, didn't try the one I had the problem with, but it happens just like it if I don't do this) how to resolve:

  1. Change default windows 10 taskbar to windows 11 from EPer properties page
  2. Restart explorer shell from properties page
  3. Now you can win+x a and have admin take effect and you also don't have to be wacky and right click or left click after having done the key combo

Hope that helps. Maybe they can fix the win 10 bar to workaround the issue, but you can enjoy at least a lot of the functions of this software, by opting to use the win 11 taskbar (EPer defaults to 10 whether or not you're on 11/server 2022)

ascendbeing avatar Mar 22 '24 08:03 ascendbeing

Same issue, been experiencing this since the early days of ep. FWIW, "Terminal (Admin)" right below it works: image The key combo win-x a a enter is becoming part of my muscle memory.

yatli avatar Mar 22 '24 17:03 yatli

EP Version: 22621.3810.66.1
Win 11 Pro: Build 22621.ni_release.220506-1250

If right click on start menu then select Windows PowerShell or Windows PowerShell (Admin) it opens non elevated terminal window with PowerShell tab, in same time or when attempt to right click once more on start button EP hangs then restarts.

lsd-techno avatar Jul 19 '24 11:07 lsd-techno

Please run winver to get the windows version and build number.

pyrates999 avatar Jul 19 '24 13:07 pyrates999

Windows 23H2 22631.3880 can still reproduce the very same issue, with the exact same reproduce steps that are already provided above.

@pyrates999 did you try to reproduce this issue on your own? If you did, does that mean on your device it works without issue? And if that's the case, what's your OS's detailed information (like system version and other information that you've asked to provided)? In such a way we might be able to narrow down the condition that might cause the issue to happen.

BLumia avatar Jul 20 '24 03:07 BLumia

It works in windows 10. I tested it with the win+x menu where it had powershell (admin) and with the EP option changing win+x to show command prompt (admin). Both worked.

I don't run windows 11 due to it's UI design choices. And because it has ads in the OS.

My windows 10 version is 19045.4651. I run EP version 22621.3527.65.5.

pyrates999 avatar Jul 20 '24 09:07 pyrates999

It works in windows 10. I don't run windows 11 due to it's UI design choices. And because it has ads in the OS.

Hi! As I wrote here previously the bug happens in every windows 11 version ever released with every single patcher version released.

Some already posted versions but the bug it reproducible 100% of the time using Windows 11 so I don't understand why we are always being asked for affected versions.

sudoeste avatar Jul 20 '24 09:07 sudoeste

It's useful to know what versions it is happening on. It's part of software development basics when trying to fix a bug or add a new feature.

pyrates999 avatar Jul 20 '24 09:07 pyrates999

I do understand that, I work with developers. There are many versions already reported and specified above. But I'll go a step further.

The affected versions are: Explorer Patcher ANY version when used in conjunction with Win11 ANY version.

sudoeste avatar Jul 20 '24 09:07 sudoeste

and are you running an english version of windows 11 or a non-english version of windows 11? Because some bugs only happened on non-english versions of windows 11.

pyrates999 avatar Jul 20 '24 09:07 pyrates999

Tried in Portuguese (pt-pt) and English (en-GB). I even tried a win 11 VM image in a (cant remember) provider.

It happens always and is 100% reproducible

sudoeste avatar Jul 20 '24 09:07 sudoeste

Please wait for a developer to respond.

pyrates999 avatar Jul 20 '24 10:07 pyrates999