Skip to content
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: Microsoft Store Apps fail to elevate if command line has quotes #78

Closed
gerardog opened this issue Feb 5, 2021 · 0 comments
Closed

Comments

@gerardog
Copy link
Owner

gerardog commented Feb 5, 2021

Issue Description

The workaround for microsoft store apps #65 fails with quoted parameters:

Fails:

C:\Users\Gerardo>gsudo --debug wt.exe -d "C:\users"
Debug: Workaround for target app installed via MSStore.
Debug: IsWindowsApp("C:\WINDOWS\system32\cmd.exe") = False ("C:\WINDOWS\system32\cmd.exe")
Debug: Command to run: C:\WINDOWS\system32\cmd.exe /c "C:\Users\GerardoGrignoli\AppData\Local\Microsoft\WindowsApps\wt.exe" -d "C:\users"
Debug: Using Console mode TokenSwitch
Debug: Caller PID: 19716
Debug: Found Named Pipe "ProtectedPrefix\Administrators\gsudo_C98FB45B2A1733E24C9D356480E0E9FB01E2634EC79D32AC1BDE04AF90B24567".
Debug: Connected via Named Pipe ProtectedPrefix\Administrators\gsudo_C98FB45B2A1733E24C9D356480E0E9FB01E2634EC79D32AC1BDE04AF90B24567.
Debug: CreateProcessAsUser: C:\WINDOWS\system32\cmd.exe /c "C:\Users\GerardoGrignoli\AppData\Local\Microsoft\WindowsApps\wt.exe" -d "C:\users"
Debug: ElevationRequest length 875
Debug: Process token successfully substituted.
The filename, directory name, or volume label syntax is incorrect.
Debug: Process exited with code 1

Success:

C:\Users\Gerardo>gsudo --debug cmd /c wt.exe -d "C:\users"
Debug: IsWindowsApp(""C:\WINDOWS\system32\cmd.EXE"") = False ("C:\WINDOWS\system32\cmd.EXE")
Debug: Command to run: "C:\WINDOWS\system32\cmd.EXE" /c wt.exe -d "C:\users"
Debug: Using Console mode TokenSwitch
Debug: Caller PID: 19716
Debug: Found Named Pipe "ProtectedPrefix\Administrators\gsudo_C98FB45B2A1733E24C9D356480E0E9FB01E2634EC79D32AC1BDE04AF90B24567".
Debug: Connected via Named Pipe ProtectedPrefix\Administrators\gsudo_C98FB45B2A1733E24C9D356480E0E9FB01E2634EC79D32AC1BDE04AF90B24567.
Debug: CreateProcessAsUser: "C:\WINDOWS\system32\cmd.EXE" /c wt.exe -d "C:\users"
Debug: ElevationRequest length 814
Debug: Process token successfully substituted.
Debug: Process exited with code 0

Context:

  • Windows version: 10 20H2
  • gsudo version: 0.7.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant