winutil icon indicating copy to clipboard operation
winutil copied to clipboard

Elevation fixes for start.ps1

Open ruxunderscore opened this issue 1 year ago • 0 comments

There were elevation issues after #2648, so I reverted one of the changes associate to building the $script variable. Made a couple other changes to have more consistency and maintain Powershell scripting standards.

Type of Change

  • [x] Bug fix
  • [x] Hotfix

Description

  • Partial rollback of changes from #2648
  • Create Variable for script location.
  • irm -> Invoke-RestMethod, for Powershell standard coding practices.
  • iex -> Invoke-Expression, for Powershell standard coding practices.

Testing

Compiled, hosted on local server, and pulled as if I was pulling winutil from Chris's host. image

Impact

It might not be as robust as what @MyDrift-user tried to do. And -Config parameters don't get passed through.

Issue related to PR

Related to PR #2908, while keeping the script in RAM. Partial Fix of #2812

Additional Information

Strangely, the changes before this partial rollback, worked if the winutil.ps1 was local, but broke as soon as you hosted it through the internet and tried loading it into RAM. Quirk of powershell possible or security measure? windev.ps1 also has the same issue, but I haven't looked at it yet.

Ignore my older commits, I was testing other things before I rolled back.

Checklist

  • [x] My code adheres to the coding and style guidelines of the project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] My changes generate no errors/warnings/merge conflicts.

ruxunderscore avatar Oct 11 '24 02:10 ruxunderscore