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

Relaunching as Administrator is not working #3099

Open
3 tasks done
filip2cz opened this issue Dec 11, 2024 · 3 comments
Open
3 tasks done

Relaunching as Administrator is not working #3099

filip2cz opened this issue Dec 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@filip2cz
Copy link

filip2cz commented Dec 11, 2024

Describe the bug

When you run winutil.ps1 as non-administrator, it will say Winutil needs to be run as Administrator. Attempting to relaunch..
It reopens winutil as Administrator, but with this error:

[error 2147942402 (0x80070002) when launching `pwsh -ExecutionPolicy Bypass -NoProfile -Command & { & 'C:\Users\filip\scoop\apps\winutil\current\winutil.ps1' }']

Steps to reproduce

  1. Download latest release
  2. Run it as normal user
  3. When password dialog will popup, enter admin password
  4. See the error.

Expected behavior

It should just open winutil as admin.

Screenshots

screenshot

Additional context

Issue validation

  • I checked for duplicate issues.
  • I checked for already existing discussions.
  • I checked for an already existing pull request addressing the issue.
@filip2cz filip2cz added the bug Something isn't working label Dec 11, 2024
@MyDrift-user
Copy link
Contributor

what happens if you launch winutil using recommended oneliner method?

@filip2cz
Copy link
Author

filip2cz commented Dec 12, 2024

what happens if you launch winutil using recommended oneliner method?

PS C:\Users\filip> irm "https://christitus.com/win" | iex
Winutil needs to be run as Administrator. Attempting to relaunch.
Start-Process:
Line |
  68 |      Start-Process $processCmd -ArgumentList "$powershellcmd -Executio …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | This command cannot be run due to the error: An error occurred trying to start process 'C:\Users\filip\AppData\Local\Microsoft\WindowsApps\wt.exe' with working directory 'C:\Users\filip'. Parameter is incorrect.

@filip2cz
Copy link
Author

By the way, it works normally when I launch it from powershell as administrator (both recomended and offline method), so there is something wrong with that Attempting to relaunch. thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants