-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix/Refactor windev Admin Elevation #2683
Conversation
@Marterich it was done because otherwise when launchin the winutil dev release it will elevate and run the latest full release instead of the originally launched dev release. There might be a better fix but that was mine at the time. |
Allright, I'll take another look |
If you only want to fix the attached issue, you may remove/fix the $arglist bc the rest should work fine |
I updated the logic and the PR Description. Now the same URLs are being used, whether /windev is called as a privileged user or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, thanks :)
wait, shouldn't you escape |
This is not really necessary because Powershell is not as strict as bash for example, meaning, if Invoke-RestMethod is a known module/function it gets directly invoked. Winutil gets downloaded and stored in $script and later passed as a string to iex |
Fantastic way of elevating it properly. Thanks @Marterich I haven't forgotten about the Choco tweak, I just wanted to show that on stream when I merge it. |
Type of Change
Description
Changed the auto elevation logic to use the same URLs whether windev is called as admin or not.
(previously a static URL was used when the shell wasn't run as admin)
Issue related to PR