-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Issue: Failed to load the hostfxr.dll, when PowerShell installed via Microsoft Store #65
Comments
Hi! Thanks.- |
This is specfially only affected by powershell 7.1 gsudo or sudo makes no difference. |
Sorry, I meant |
I installed powershell via microsoft store. |
service:
|
After installing from the Microsoft Store, I can see this problem as well.
Workarounds:
Some research is needed for a proper fix. Knowing why hostfxr.dll fails to load, for example. |
If --attached is annoying, |
Attached Mode has issues with |
Maybe it would be good idea to open an issue on the powershell repo? |
Help would 100% be appreciated... But If we can't reproduce this issue without gsudo being involved, I fear the issue will be shut-down. This is what I see with SysInternals Process Monitor: Process Name: pwsh.exe It might be related with the fact that UWP apps (eg. Microsoft Store) installs into What is that condition? The execute permission is conditional? Where is WIN://SYSAPPID stored and can it be lost when gsudo service replaces the process token.. ? |
It seems that CreateProcess manipulates the process token when launching Microsoft Store Apps, adding the WIN://SYSAPPID attribute. When gsudo replaces the token, the app fails to load. So the final call to So I've crafted a not-ideal solution, that seems to be working... What I did was to elevate a non-microsoft-store wrapper (CMD.EXE) and then Or simply put... gsudo will elevate Could you please @jetersen, and others having this issue, please help me test this fix? Here is a fix build, (not digitally signed. sorry): https://ci.appveyor.com/project/gerardog/gsudo/builds/36455864/artifacts |
It wasnt working from CMD if you |
Tested the latest fix, which works for me. |
Issue Description
sudo fails loading dll in net5 / powershell 7.1
Steps to Reproduce
sudo
Screenshots
Context:
The text was updated successfully, but these errors were encountered: