Prerequisites
Steps to reproduce
When attempting to launch pwsh.exe in an environment with the win32k subsystem disabled on Windows, it fails to launch. When inspecting the imports for pwsh.exe we see MessageBoxW being used from user32.dll which is imported as a direct dependency.
dumpbin.exe /imports (Get-Command pwsh).Source | Select-String -Context 0, 200 'user32.dll'
Note:
- Dumpbin.exe can be found in the Windows SDK.
- This happens with v7.6.1 but I suspect it affects all of the previous open source versions too.
- PowerShell 5.1 has this behavior too, but I expect this will stay as is.
Credit to : https://github.com/alexsnitkovskiy for finding this although we don't know if this is by design. That said it's weird that PowerShell needs user32.dll at all really especially to use MessageBoxW.
Expected behavior
PowerShell 7+ can be loaded without the win32k subsystem
Actual behavior
PowerShell 7+ requires win32k subsystem to load.
Error details
No error details, powershell simply does not load since it can't load user32.dll for example.
Environment data
Visuals
No response
Prerequisites
Steps to reproduce
When attempting to launch pwsh.exe in an environment with the win32k subsystem disabled on Windows, it fails to launch. When inspecting the imports for pwsh.exe we see
MessageBoxWbeing used from user32.dll which is imported as a direct dependency.Note:
Credit to : https://github.com/alexsnitkovskiy for finding this although we don't know if this is by design. That said it's weird that PowerShell needs user32.dll at all really especially to use
MessageBoxW.Expected behavior
PowerShell 7+ can be loaded without the win32k subsystemActual behavior
PowerShell 7+ requires win32k subsystem to load.Error details
No error details, powershell simply does not load since it can't load user32.dll for example.Environment data
Visuals
No response