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

Elevation fixes for start.ps1 #2913

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ruxunderscore
Copy link
Contributor

@ruxunderscore ruxunderscore commented Oct 11, 2024

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

  • Bug fix
  • Hotfix

Description

  • Partial rollback of changes from Fixes, improvements + Auto Window handling #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

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

When scripting it's best to use the full function in Powershell.
- Rollback changes from ChrisTitusTech#2648
- Create Variable for script location.
- irm -> Invoke-RestMethod, for Powershell standard coding practices.
- iex -> Invoke-Expression, for Powershell standard coding practices.
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

Successfully merging this pull request may close these issues.

1 participant