-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 WinUtil admin elevation for stable and pre-release builds #2908
Fix WinUtil admin elevation for stable and pre-release builds #2908
Conversation
…iable Signed-off-by: Cryostrixx <[email protected]>
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.
Although these changes are great, and I do see the effort you've put into this PR.. but downloading WinUtil into Temp folder is something we prefer not doing, and instead downloading WinUtil into RAM (piping result of IRM into IEX). Or in other words, if we can avoid creating Artifact Files, then we should try to avoid it.
Hello, @og-mrk! I appreciate your feedback on my PR, but I want to clarify that I’ve worked hard to ensure the script functions correctly. The current version successfully addresses the issues numerous users have faced and meets the intended goals. Therefore, I will not be pursuing in-memory execution, as it has caused problems with running the script in the past. I hope we can focus on solutions that enhance functionality rather than reverting to behavior that resulted in a non-functioning script. I'd also like to mention that when using Thank you for your understanding, and I look forward to your feedback! Additional Notes:
|
What issues have there been with executing from in-memory? At the end of the argument, keep in mind that we chose to keep this running in this way to keep from having to store artifacts, as @og-mrk has mentioned, and it's up to Chris whether or not this is changed. |
I understand your point about wanting to not use temporary files but is it really preferable to have a non-functional script? With my fix in place, it works as it was intended to, which you can see illustrated in the screenshot that I have attached below: |
This is a launch error with Windows Terminal, not the fact that it's run in Ram. I am looking into a fix, now. |
@ruxunderscore So what should I do with the PR? I don't want to close it yet, as I spent one week just ensuring the fix works. |
Keeping it as a draft should be fine. Once I figure out how generate my own winutil.ps1 within my own fork, I can do more testing. |
You should be able to run these commands to do it, it's the same commands I use to pull in the changes from my fork: sl C:\path\to\your\winutil\fork
git checkout your-feature-branch-name
.\Compile.ps1 -SkipPreprocessing
.\winutil.ps1 If you want to pull the changes from my feature branch into your local repo you would run the following commands: sl C:\path\to\your\winutil\fork
git remote add Cryostrixx_winutil https://github.com/Cryostrixx/winutil
git fetch Cryostrixx_winutil
git checkout fix-winutil-admin-elevation
.\Compile.ps1 -SkipPreprocessing
.\winutil.ps1 If you want to remove the changes and sync your fork with the main branch you would run the following commands: git remote remove Cryostrixx_winutil
git checkout main
git branch -D fix-winutil-admin-elevation
git push origin --delete fix-winutil-admin-elevation Here's a screenshot showing these commands in effect: Just make sure to replace |
I ended doing a partial rollback of changes in an older PR, as I recalled that elevation was working in past for me. Only did changes for start.ps1, for now, but may take a look at windev.ps1 later to try to do a partial rollback there as well. Checkout my PR #2913, and let me know if self-elevation works for you, now. |
I'm just curious: What even broke? I've been using WinUtil for a while and there was a time when this worked without any issue. |
After comparing the changes, the only thing I can think of is the handling of arguments. |
@ruxunderscore It ran perfectly when testing it locally. No errors there, but there are still issues trying to run it using Update: I forgot to checkout the branch, it runs with no issues but when passing |
Interesting. I was hosting my ps1 script on another system I have running a webserver and didn't see that issue after my changes. Is this after a compile? And did you remove the old winutil.ps1 if it was still there? |
@ruxunderscore See the latest update. I forgot to check out the branch, I'll test it again and let you know how it goes. |
I believe that was the original intent on the handling of Arguments the way they were, but at this point it's either it runs or doesn't. We can work on a solution for the arguments later. |
Contributor Note
This PR has been marked as closed and deleted in favor of ruxunderscore's PR ID No. 2913. This PR's branch has been removed.
I've suggested the fixes I made for Rux's PR in
start-wt-fix-proposed
andstart-wt-fix-experimental
so this PR is redundant.