Issue: "Error: Unable to connect to the elevated service." when using Admin By Request Tool from Windows Terminal
Closed this issue · 9 comments
Issue Description
Gsudo works perfect both with Windows PowerShell (5.1.19041.1682) and PowerShell Core (7.2.5) - as long as they are running in their own windows. When running either of them through Windows Terminal, I get the error Unable to connect to the elevated service
Steps to Reproduce
- Open Windows Terminal with either PowerShell 7 or PowerShell 5
- Run gsudo
- Error occurs
Screenshots
Context:
- Windows version: 10 (21H2, 19044.1766)
- gsudo version: gsudo v1.3.0 (Branch.master.Sha.24fb735f547e1e5dd7aa22fdd77777fa8c923a1c)
- We are using the Admin By Request Tool from FastTrack Software (https://www.adminbyrequest.com/).
Opening for admin access in that tool before running gsudo does not make a difference (and outside Windows Terminal gsudo also works fine without the need for requesting admin access from Admin By Request).
Hi,
I was able to reproduce this issue after installing Admin By Request Tool
.
What I see is that when gsudo is run from WT, the Api call to System.Diagnostics.Process.Start does not returns after the elevated process is created. Instead, it waits until that process has ended. I believe this is a bug in Admin By Request Tool
, not gsudo.
Let´s see how we can report this problem to them so we can work it out together.
Tried to create a ticket to FastTrack Software, but unfortunately The free plan does not include support
.
Do you have a paid plan?
I was able to reproduce the problem taking gsudo out of the equation. So, this is caused by AdminByRequest
, and not gsudo
.
Please take a look at the screenshot. You will see that if you do Start-Process cmd.exe -Verb RunAs
from PowerShell in a regular console, the new CMD
stays open, while your original PowerShell console returns your control to you. If you do the same from a Windows Terminal
, that PowerShell will hang until the new CMD is closed (it shouldn't).
I tweeted to @AdminByRequest. Let's hope they get the bug report.
Thanks a lot. I've forwarded the case to our support department - they should be able to make a ticket at AdminByRequest.
I've replicated your test and get the same result here - e.g. the issue is not related to gsudo.
Just came here to rant about what a terrible uninstall experience that tool provides. It refuses to uninstall and provides no instructions. Also f*** up my user and removed admin rights from it, without even warning me. I just had a secondary admin account by chance, otherwise would have to hack myself to recover my machine.
I'm closing this issue since it is an external problem.
Thank you so much for your response Jens.