Compare commits

...

30 Commits

Author SHA1 Message Date
Joan Solana Raduà
d8e8f2003e
Merge branch 'main' into dns-gui 2024-07-17 08:36:51 +02:00
Chris Titus
508f909fc9 Update pre-release.yaml 2024-07-17 01:04:39 -05:00
Chris Titus
60a6c387e2 Update pre-release.yaml 2024-07-17 01:01:44 -05:00
Chris Titus
1307abc1d6 Update pre-release.yaml 2024-07-17 00:55:44 -05:00
Chris Titus
45a103f76b Update pre-release.yaml 2024-07-17 00:53:21 -05:00
Chris Titus
b84c0d9248 Update pre-release.yaml 2024-07-17 00:52:12 -05:00
Chris Titus
f51c30023a Merge branch 'main' of https://github.com/ChrisTitusTech/winutil 2024-07-17 00:44:04 -05:00
Chris Titus
bce4868896 Update pre-release.yaml 2024-07-17 00:43:58 -05:00
dependabot[bot]
8141baa879
Bump actions/cache from 2 to 4 (#2390)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-17 00:38:57 -05:00
dependabot[bot]
280f8a7dbc
Bump actions/checkout from 2 to 4 (#2389)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-17 00:38:33 -05:00
Chris Titus
0a472c06c4 Cleanup version creation 2024-07-17 00:36:59 -05:00
Chris Titus
1c72007a29 Update pre-release.yaml 2024-07-17 00:29:37 -05:00
Chris Titus
07434f706b Update pre-release.yaml 2024-07-17 00:13:56 -05:00
Chris Titus
4176435ebf Update dependabot.yml 2024-07-17 00:06:43 -05:00
Chris Titus
a38cfb14d3 pin action/stale and tag debug 2024-07-17 00:03:31 -05:00
Chris Titus
b319c32ae6 Merge branch 'main' of https://github.com/ChrisTitusTech/winutil 2024-07-16 23:55:56 -05:00
Chris Titus
829e46b3a8 fix github actions 2024-07-16 23:55:54 -05:00
ChrisTitusTech
2304b06f68 Compile Winutil 2024-07-17 04:49:41 +00:00
Chris Titus
c90363181c Winget Reversion
A reversion was needed on winget install because a for loop was installing the latest winget submitted app as it ran over.
2024-07-16 23:48:27 -05:00
Real-MullaC
5d3d47eeb5
Fixes release log (#2377)
* Update createchangelog.yml

* Update createchangelog.yml

* Update createchangelog.yml

* Update createchangelog.yml

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2024-07-16 15:26:48 -05:00
Wojciech Smoliński
bc213d34d9
Update workflows to remove ::set-output (#2384)
remove ::set-output usage
remove `$version` asc a enviroment variable as ot's not used
2024-07-16 15:11:24 -05:00
Chris Titus
df2cd71d1e
Update close-discussion.yml 2024-07-16 14:08:24 -05:00
Martin Wiethan
a760400aeb
Add /close command for the active contributors to close issues (#2380)
* initialize slash commands

* Fix string

* fix username
2024-07-16 14:05:28 -05:00
ChrisTitusTech
07a78fc3d8 Compile Winutil 2024-07-16 19:03:21 +00:00
MyDrift
78a6a60d96
Repo Cleanup (#2367)
* remove trailing whitespaces, remove unused img folder

* Rename TweaksScreen.PNG to TweaksScreen.png

* restructure "Install-WinUtilProgramWinget"

* undo programwinget function rework

* fix typo
2024-07-16 14:02:31 -05:00
Real-MullaC
1fb986a05d
Update close-discussion.yml (#2364) 2024-07-16 14:01:06 -05:00
Real-MullaC
51e5af41ed
Update PULL_REQUEST_TEMPLATE.md (#2363) 2024-07-16 14:00:52 -05:00
Chris Titus
7dba867101 fix duplicate items in releases 2024-07-16 13:58:31 -05:00
Chris Titus
ce787a9074 gh update.mb docs 2024-07-16 13:14:55 -05:00
Chris Titus
425ec42cb5 Update createchangelog.yml 2024-07-16 13:10:23 -05:00
26 changed files with 266 additions and 216 deletions

View File

@ -22,10 +22,8 @@
[Discuss the impact of your changes on the project. This might include effects on performance, new dependencies, or changes in behaviour.] [Discuss the impact of your changes on the project. This might include effects on performance, new dependencies, or changes in behaviour.]
## Issue related to PR ## Issue related to PR
[What issue is related to this PR (if any)] [What issue/discussion is related to this PR (if any)]
- Resolves # - Resolves #
[What discussion is related to this PR (if any)]
- Discussion: #
## Additional Information ## Additional Information
[Any additional information that reviewers should be aware of.] [Any additional information that reviewers should be aware of.]
@ -35,4 +33,4 @@
- [ ] I have performed a self-review of my own code. - [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation. - [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no errors/warnings/merge conflicts. - [ ] My changes generate no errors/warnings/merge conflicts.

9
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: "actions/stale"
versions: '>= 9'

View File

@ -16,7 +16,7 @@ jobs:
if: github.event.pull_request.merged == true if: github.event.pull_request.merged == true
id: extract-discussion id: extract-discussion
run: | run: |
echo "::set-output name=discussion::$(echo "${{ github.event.pull_request.body }}" | grep -oP '(?<=Discussion: #)\d+')" echo "discussion=$(echo '${{ github.event.pull_request.body }}' | grep -oP '(?<=Resolves #)\d+')" >> $GITHUB_OUTPUT
shell: bash shell: bash
- name: Close the discussion - name: Close the discussion

View File

@ -2,7 +2,8 @@ name: Update update.mb on Release
on: on:
release: release:
types: [published] types: [published, prereleased]
workflow_dispatch: # Add this line to enable manual triggering
jobs: jobs:
update-file: update-file:
@ -10,12 +11,12 @@ jobs:
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Get all releases and update update.mb file - name: Get all releases and update update.mb file
run: | run: |
# Fetch all releases using GitHub CLI # Fetch all releases including pre-releases using GitHub CLI
gh release list --limit 1000 > releases.txt gh release list --limit 5 > releases.txt
# Extract numeric versions and create update.mb content # Extract numeric versions and create update.mb content
echo "" > docs/update.mb echo "" > docs/update.mb

View File

@ -2,7 +2,7 @@ name: GitHub Pages Deploy
on: on:
push: push:
branches: branches:
- master - master
- main - main
permissions: permissions:
contents: write contents: write
@ -10,11 +10,11 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v2 - uses: actions/cache@v4
with: with:
key: ${{ github.ref }} key: ${{ github.ref }}
path: .cache path: .cache

View File

@ -0,0 +1,43 @@
name: Close issue on /close
on:
issue_comment:
types: [created, edited]
jobs:
closeIssueOnClose:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: none
contents: read
steps:
- name: Check for /close comment
id: check_comment
run: |
if [[ "${{ contains(github.event.comment.body, '/close') }}" == "true" ]]; then
echo "comment=true" >> $GITHUB_ENV
else
echo "comment=false" >> $GITHUB_ENV
fi
- name: Check if the user is allowed
id: check_user
if: env.comment == 'true'
run: |
ALLOWED_USERS=("ChrisTitusTech" "og-mrk" "Marterich" "MyDrift-user" "Real-MullaC")
if [[ " ${ALLOWED_USERS[@]} " =~ " ${{ github.event.comment.user.login }} " ]]; then
echo "user=true" >> $GITHUB_ENV
else
echo "user=false" >> $GITHUB_ENV
fi
- name: Close issue if conditions are met
if: env.comment == 'true' && env.user == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
echo Closing the issue...
gh issue close $ISSUE_NUMBER --repo ${{ github.repository }}

View File

@ -1,8 +1,12 @@
name: Pre-Release WinUtil name: Pre-Release WinUtil
permissions:
contents: write
actions: read
on: on:
workflow_run: workflow_run:
workflows: ["Compile"] #Ensure Compile winget.ps1 is done workflows: ["Compile"]
types: types:
- completed - completed
workflow_dispatch: # Manual trigger added workflow_dispatch: # Manual trigger added
@ -10,8 +14,6 @@ on:
jobs: jobs:
build-runspace: build-runspace:
runs-on: windows-latest runs-on: windows-latest
outputs:
version: ${{ steps.extract_version.outputs.version }}
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -19,18 +21,19 @@ jobs:
- name: Extract Version from winutil.ps1 - name: Extract Version from winutil.ps1
id: extract_version id: extract_version
run: | run: |
$version = '' $version = (Get-Date -Format "yy.MM.dd")
Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object { echo "version=$version" >> $env:GITHUB_ENV
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') { shell: pwsh
$version = "pre"+$matches[1]
echo "version=$version" >> $GITHUB_ENV - name: Create Tag
echo "::set-output name=version::$version" id: create_tag
break run: |
} $tagExists = git tag -l $env:VERSION
} if ($tagExists -eq "") {
if (-not $version) { git tag $env:VERSION
Write-Error "Version not found in winutil.ps1" git push origin $env:VERSION
exit 1 } else {
Write-Host "Tag $env:VERSION already exists, skipping tag creation"
} }
shell: pwsh shell: pwsh
@ -38,11 +41,12 @@ jobs:
id: create_release id: create_release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ steps.extract_version.outputs.version }} tag_name: ${{ env.VERSION }}
name: Pre-Release ${{ steps.extract_version.outputs.version }} name: Pre-Release ${{ env.VERSION }}
body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ steps.extract_version.outputs.version }}/winutil.ps1)" body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)"
append_body: true append_body: false
files: ./winutil.ps1 files: ./winutil.ps1
prerelease: true prerelease: true
generate_release_notes: true
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -19,8 +19,7 @@ jobs:
Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object { Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object {
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') { if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') {
$version = $matches[1] $version = $matches[1]
echo "version=$version" >> $GITHUB_ENV echo "version=$version" >> $GITHUB_OUTPUT
echo "::set-output name=version::$version"
break break
} }
} }

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Generate Sponsors 💖 - name: Generate Sponsors 💖
uses: JamesIves/github-sponsors-readme-action@v1 uses: JamesIves/github-sponsors-readme-action@v1

View File

@ -8,7 +8,7 @@ jobs:
name: PS Script Analyzer name: PS Script Analyzer
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: lint - name: lint
uses: devblackops/github-action-psscriptanalyzer@master uses: devblackops/github-action-psscriptanalyzer@master
with: with:
@ -22,7 +22,7 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Install Pester - name: Install Pester
run: | run: |

View File

@ -1,83 +0,0 @@
# Battery drains too fast.
When your battery on the laptop drains too fast, please perform these steps and report the results back to the Winutil community.
1. **Check Battery Health:**
- Open a Command Prompt as an administrator.
- Run the following command to generate a battery report:
```powershell
powercfg /batteryreport /output "C:\battery_report.html"
```
- Open the generated HTML report to review information about battery health and usage.
2. **Review Power Settings:**
- Go to "Settings" > "System" > "Power & sleep."
- Adjust power plan settings based on your preferences and usage patterns.
- Click on "Additional power settings" to access advanced power settings.
3. **Identify Power-Hungry Apps:**
- Right-click on the taskbar and select "Task Manager."
- Navigate to the "Processes" tab to identify applications with high CPU or memory usage.
- Consider closing unnecessary background applications.
4. **Update Drivers:**
- Visit your laptop manufacturer's website or use Windows Update to check for driver updates.
- Ensure graphics, chipset, and other essential drivers are up to date.
5. **Check for Windows Updates:**
- Go to "Settings" > "Update & Security" > "Windows Update."
- Check for and install any available updates for your operating system.
6. **Reduce Screen Brightness:**
- Adjust screen brightness based on your preferences and lighting conditions.
- Go to "Settings" > "System" > "Display" to adjust brightness.
7. **Battery Saver Mode:**
- Go to "Settings" > "System" > "Battery."
- Turn on "Battery saver" to limit background activity and conserve power.
8. **Check Power Usage in Settings:**
- Go to "Settings" > "System" > "Battery" > "Battery usage by app."
- Review the list of apps and their power usage.
9. **Check Background Apps:**
- Go to "Settings" > "Privacy" > "Background apps."
- Disable unnecessary apps running in the background.
10. **Use Powercfg for Analysis:**
- Open a Command Prompt as an administrator.
- Run the following command to analyze energy usage and generate a report:
```powershell
powercfg /energy /output "C:\energy_report.html"
```
- Open the generated HTML report to identify energy consumption patterns.
11. **Review Event Viewer:**
- Open Event Viewer by searching for it in the Start menu.
- Navigate to "Windows Logs" > "System."
- Look for events with the source "Power-Troubleshooter" to identify power-related events.
12. **Check Wake-up Sources:**
- Open a Command Prompt as an administrator.
- Use the command `powercfg /requests` to identify processes preventing sleep.
- Check Task Scheduler for tasks waking up the computer.
- Use the command `powercfg /waketimers` to view active wake timers.
13. **Resource Monitor:**
- Open Resource Monitor from the Start menu.
- Navigate to the "CPU" tab and identify processes with high CPU usage.
14. **Windows Settings - Activity History:**
- In "Settings," go to "Privacy" > "Activity history."
- Turn off "Let Windows collect my activities from this PC."
15. **Network Adapters:**
- Open Device Manager by searching for it in the Start menu.
- Locate your network adapter, right-click, and go to "Properties."
- Under the "Power Management" tab, uncheck the option that allows the device to wake the computer.
16. **Review Installed Applications:**
- Manually review installed applications by searching for "Add or remove programs" in the Start menu.
- Check settings/preferences of individual applications for power-related options.
- Uninstall unnecessary or problematic software.
By following these detailed instructions, you should be able to thoroughly diagnose and address battery drain issues on your Windows laptop. Adjust settings as needed to optimize power management and improve battery life.

View File

@ -1,39 +0,0 @@
# Troubleshoot errors during Microwin usage
## Error `0x80041031`
This error code typically indicates an issue related to Windows Management Instrumentation (WMI). Here are a few steps you can try to resolve the issue:
1. **Reboot Your Computer:**
Sometimes, a simple reboot can resolve temporary issues. Restart your computer and try mounting the ISO again.
2. **Check for System Corruption:**
Run the System File Checker (SFC) utility to scan and repair system files that may be corrupted.
```powershell
sfc /scannow
```
3. **Update Your System:**
Make sure your operating system is up-to-date. Check for Windows updates and install any pending updates.
4. **Check WMI Service:**
Ensure that the Windows Management Instrumentation (WMI) service is running. You can do this through the Services application:
- Press `Win + R` to open the Run dialog.
- Type `services.msc` and press Enter.
- Locate "Windows Management Instrumentation" in the list.
- Make sure to set its status to "Running" and the startup type to "Automatic."
5. **Check for Security Software Interference:**
Security software can sometimes interfere with WMI operations. Temporarily disable your antivirus or security software and check if the issue persists.
6. **Event Viewer:**
Check the Event Viewer for more detailed error information. Look for entries related to the `80041031` error and check if there are any additional details that can help identify the cause.
- Press `Win + X` and select "Event Viewer."
- Navigate to "Windows Logs" -> "Application" or "System."
- Look for entries with the source related to WMI or the application use to mount the ISO.
7. **ISO File Integrity:**
Ensure that the ISO file you are trying to mount is uncorrupted. Try mounting a different ISO file to see if the issue persists.
If the problem persists after trying these steps, additional troubleshooting is required. Consider seeking assistance from Microsoft support or community forums for more specific guidance based on your system configuration and the software you use to mount the ISO.

View File

@ -37,7 +37,7 @@ irm "https://christitus.com/windev" | iex
If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/) If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/)
## 🎓 Documenation ## 🎓 Documentation
### [WinUtil Official Documentation](https://christitustech.github.io/winutil/) ### [WinUtil Official Documentation](https://christitustech.github.io/winutil/)

View File

@ -51,3 +51,127 @@ Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
- (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center' - (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center'
- Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'. - Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'.
### Battery drains too fast.
When your battery on the laptop drains too fast, please perform these steps and report the results back to the Winutil community.
1. **Check Battery Health:**
- Open a Command Prompt as an administrator.
- Run the following command to generate a battery report:
```powershell
powercfg /batteryreport /output "C:\battery_report.html"
```
- Open the generated HTML report to review information about battery health and usage.
2. **Review Power Settings:**
- Go to "Settings" > "System" > "Power & sleep."
- Adjust power plan settings based on your preferences and usage patterns.
- Click on "Additional power settings" to access advanced power settings.
3. **Identify Power-Hungry Apps:**
- Right-click on the taskbar and select "Task Manager."
- Navigate to the "Processes" tab to identify applications with high CPU or memory usage.
- Consider closing unnecessary background applications.
4. **Update Drivers:**
- Visit your laptop manufacturer's website or use Windows Update to check for driver updates.
- Ensure graphics, chipset, and other essential drivers are up to date.
5. **Check for Windows Updates:**
- Go to "Settings" > "Update & Security" > "Windows Update."
- Check for and install any available updates for your operating system.
6. **Reduce Screen Brightness:**
- Adjust screen brightness based on your preferences and lighting conditions.
- Go to "Settings" > "System" > "Display" to adjust brightness.
7. **Battery Saver Mode:**
- Go to "Settings" > "System" > "Battery."
- Turn on "Battery saver" to limit background activity and conserve power.
8. **Check Power Usage in Settings:**
- Go to "Settings" > "System" > "Battery" > "Battery usage by app."
- Review the list of apps and their power usage.
9. **Check Background Apps:**
- Go to "Settings" > "Privacy" > "Background apps."
- Disable unnecessary apps running in the background.
10. **Use Powercfg for Analysis:**
- Open a Command Prompt as an administrator.
- Run the following command to analyze energy usage and generate a report:
```powershell
powercfg /energy /output "C:\energy_report.html"
```
- Open the generated HTML report to identify energy consumption patterns.
11. **Review Event Viewer:**
- Open Event Viewer by searching for it in the Start menu.
- Navigate to "Windows Logs" > "System."
- Look for events with the source "Power-Troubleshooter" to identify power-related events.
12. **Check Wake-up Sources:**
- Open a Command Prompt as an administrator.
- Use the command `powercfg /requests` to identify processes preventing sleep.
- Check Task Scheduler for tasks waking up the computer.
- Use the command `powercfg /waketimers` to view active wake timers.
13. **Resource Monitor:**
- Open Resource Monitor from the Start menu.
- Navigate to the "CPU" tab and identify processes with high CPU usage.
14. **Windows Settings - Activity History:**
- In "Settings," go to "Privacy" > "Activity history."
- Turn off "Let Windows collect my activities from this PC."
15. **Network Adapters:**
- Open Device Manager by searching for it in the Start menu.
- Locate your network adapter, right-click, and go to "Properties."
- Under the "Power Management" tab, uncheck the option that allows the device to wake the computer.
16. **Review Installed Applications:**
- Manually review installed applications by searching for "Add or remove programs" in the Start menu.
- Check settings/preferences of individual applications for power-related options.
- Uninstall unnecessary or problematic software.
By following these detailed instructions, you should be able to thoroughly diagnose and address battery drain issues on your Windows laptop. Adjust settings as needed to optimize power management and improve battery life.
### Troubleshoot errors during Microwin usage
#### Error `0x80041031`
This error code typically indicates an issue related to Windows Management Instrumentation (WMI). Here are a few steps you can try to resolve the issue:
1. **Reboot Your Computer:**
Sometimes, a simple reboot can resolve temporary issues. Restart your computer and try mounting the ISO again.
2. **Check for System Corruption:**
Run the System File Checker (SFC) utility to scan and repair system files that may be corrupted.
```powershell
sfc /scannow
```
3. **Update Your System:**
Make sure your operating system is up-to-date. Check for Windows updates and install any pending updates.
4. **Check WMI Service:**
Ensure that the Windows Management Instrumentation (WMI) service is running. You can do this through the Services application:
- Press `Win + R` to open the Run dialog.
- Type `services.msc` and press Enter.
- Locate "Windows Management Instrumentation" in the list.
- Make sure to set its status to "Running" and the startup type to "Automatic."
5. **Check for Security Software Interference:**
Security software can sometimes interfere with WMI operations. Temporarily disable your antivirus or security software and check if the issue persists.
6. **Event Viewer:**
Check the Event Viewer for more detailed error information. Look for entries related to the `80041031` error and check if there are any additional details that can help identify the cause.
- Press `Win + X` and select "Event Viewer."
- Navigate to "Windows Logs" -> "Application" or "System."
- Look for entries with the source related to WMI or the application use to mount the ISO.
7. **ISO File Integrity:**
Ensure that the ISO file you are trying to mount is uncorrupted. Try mounting a different ISO file to see if the issue persists.
If the problem persists after trying these steps, additional troubleshooting is required. Consider seeking assistance from Microsoft support or community forums for more specific guidance based on your system configuration and the software you use to mount the ISO.

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -27,8 +27,8 @@
* Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your Repository-list. * Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your Repository-list.
![Fork](assets/ForkButton.png) ![Fork](assets/ForkButton.png)
### Clone the Fork ### Clone the Fork
* While you can make your changes directly through the Web, we recommend cloning the repo to your device to test your fork easily. * While you can make your changes directly through the Web, we recommend cloning the repo to your device to test your fork easily.
* Using the application GitHub Desktop (available in WinUtil) you can easily manage your repos locally. You can do it using other tools like git-cli (available in WinUtil), we recommend GitHub Desktop for ease of use. * Using the application GitHub Desktop (available in WinUtil) you can easily manage your repos locally. You can do it using other tools like git-cli (available in WinUtil), we recommend GitHub Desktop for ease of use.
* Install GitHub Desktop if not already installed * Install GitHub Desktop if not already installed
* Log in using the same GitHub account u used to fork WinUtil * Log in using the same GitHub account u used to fork WinUtil

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -33,7 +33,7 @@
#### Tweaks Addition #### Tweaks Addition
* To enable tweaks on your system select Tweaks at the top next to Install. * To enable tweaks on your system select Tweaks at the top next to Install.
* Then you can select what tweaks you want adding to your system. We do have some presets you can select from at the top you can see this in the picture below. * Then you can select what tweaks you want adding to your system. We do have some presets you can select from at the top you can see this in the picture below.
![Tweaks Screen](assets/TweaksScreen.PNG) ![Tweaks Screen](assets/TweaksScreen.PNG)
* After you have chosen your tweaks click the Run Tweaks button at the bottom of the screen. * After you have chosen your tweaks click the Run Tweaks button at the bottom of the screen.
@ -114,7 +114,7 @@
* **Keep Provisioned Packages**: leaving this option unticked (default) will try to remove every operating system package * **Keep Provisioned Packages**: leaving this option unticked (default) will try to remove every operating system package
Some packages may remain after processing. This can happen if the packages in question were permanent ones or had been superseded by newer versions Some packages may remain after processing. This can happen if the packages in question were permanent ones or had been superseded by newer versions
* **Keep Appx Packages**: leaving this option unticked (default) will try to remove every Microsoft Store app from the Windows image * **Keep Appx Packages**: leaving this option unticked (default) will try to remove every Microsoft Store app from the Windows image
This option will exclude some applications that are essential in the case that you want or need to add a Store app later on This option will exclude some applications that are essential in the case that you want or need to add a Store app later on
@ -122,7 +122,7 @@
* **Keep Defender**: leaving this option unticked will try to remove every part of Windows Defender, including the Windows Security app * **Keep Defender**: leaving this option unticked will try to remove every part of Windows Defender, including the Windows Security app
Leaving this option unticked is **NOT recommended** unless you plan to use a third-party antivirus solution on your MicroWin installation. On that regard, don't install AVs with bad reputation or rogueware Leaving this option unticked is **NOT recommended** unless you plan to use a third-party antivirus solution on your MicroWin installation. On that regard, don't install AVs with bad reputation or rogueware
* **Keep Edge**: leaving this option unticked will try to remove every part of the Microsoft Edge browser using the best methods available * **Keep Edge**: leaving this option unticked will try to remove every part of the Microsoft Edge browser using the best methods available
Leaving this option unticked is not recommended because it might break some applications that might depend on the `Edge WebView2` runtime. However, if that happens, you can easily [reinstall it](https://developer.microsoft.com/en-us/microsoft-edge/webview2) Leaving this option unticked is not recommended because it might break some applications that might depend on the `Edge WebView2` runtime. However, if that happens, you can easily [reinstall it](https://developer.microsoft.com/en-us/microsoft-edge/webview2)
@ -141,7 +141,7 @@
* **Copy to Ventoy** will copy the target ISO file to any USB drive with [Ventoy](https://ventoy.net/en/index.html) installed * **Copy to Ventoy** will copy the target ISO file to any USB drive with [Ventoy](https://ventoy.net/en/index.html) installed
Ventoy is a solution that lets you boot to any ISO file stored in a drive. Think of it as having multiple bootable USBs in one. Do note though that your drive needs to have enough free space for the target ISO file Ventoy is a solution that lets you boot to any ISO file stored in a drive. Think of it as having multiple bootable USBs in one. Do note though that your drive needs to have enough free space for the target ISO file
## Automation ## Automation

View File

@ -22,18 +22,17 @@ Function Install-WinUtilProgramWinget {
[Parameter(Position=1)] [Parameter(Position=1)]
[String]$manage = "Installing" [String]$manage = "Installing"
) )
$x = 0
$count = $ProgramsToInstall.Count $count = $ProgramsToInstall.Count
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0 Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Configuring winget packages ---" Write-Host "-- Configuring winget packages ---"
Write-Host "===========================================" Write-Host "==========================================="
for ($i = 0; $i -le $ProgramsToInstall.Count; $i++) { Foreach ($Program in $ProgramsToInstall){
$Program = $ProgramsToInstall[$i]
$failedPackages = @() $failedPackages = @()
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($i + 1) of $count" -PercentComplete $(($i/$count) * 100) Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing") { if($manage -eq "Installing"){
# Install package via ID, if it fails try again with different scope and then with an unelevated prompt. # Install package via ID, if it fails try again with different scope and then with an unelevated prompt.
# Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround. # Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround.
# Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode. # Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode.
@ -41,21 +40,21 @@ Function Install-WinUtilProgramWinget {
Write-Host "Starting install of $($Program.winget) with winget." Write-Host "Starting install of $($Program.winget) with winget."
try { try {
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
if($status -eq 0) { if($status -eq 0){
Write-Host "$($Program.winget) installed successfully." Write-Host "$($Program.winget) installed successfully."
continue continue
} }
if ($status -eq -1978335189) { if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
continue continue
} }
Write-Host "Attempt with User scope" Write-Host "Attempt with User scope"
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
if($status -eq 0) { if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User scope." Write-Host "$($Program.winget) installed successfully with User scope."
continue continue
} }
if ($status -eq -1978335189) { if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
continue continue
} }
@ -69,11 +68,11 @@ Function Install-WinUtilProgramWinget {
} else { } else {
Write-Host "Skipping installation with specific user credentials." Write-Host "Skipping installation with specific user credentials."
} }
if($status -eq 0) { if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User prompt." Write-Host "$($Program.winget) installed successfully with User prompt."
continue continue
} }
if ($status -eq -1978335189) { if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
continue continue
} }
@ -82,11 +81,11 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program $failedPackages += $Program
} }
} }
elseif($manage -eq "Uninstalling") { if($manage -eq "Uninstalling"){
# Uninstall package via ID using winget directly. # Uninstall package via ID using winget directly.
try { try {
$status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode
if($status -ne 0) { if($status -ne 0){
Write-Host "Failed to uninstall $($Program.winget)." Write-Host "Failed to uninstall $($Program.winget)."
} else { } else {
Write-Host "$($Program.winget) uninstalled successfully." Write-Host "$($Program.winget) uninstalled successfully."
@ -97,9 +96,7 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program $failedPackages += $Program
} }
} }
else { $X++
throw "[Install-WinUtilProgramWinget] Invalid Value for Parameter 'manage', Provided Value is: $manage"
}
} }
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
return $failedPackages; return $failedPackages;

View File

@ -28,9 +28,9 @@ function Invoke-WPFShortcut {
else{ else{
$shell = "powershell.exe" $shell = "powershell.exe"
} }
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'" $shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
$DestinationName = "WinUtil.lnk" $DestinationName = "WinUtil.lnk"
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png" Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png"

View File

@ -30,11 +30,11 @@ function Invoke-WPFTweakPS7{
Write-Host "Windows Terminal not installed. Skipping Terminal preference" Write-Host "Windows Terminal not installed. Skipping Terminal preference"
return return
} }
# Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code) # Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code)
$settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json"
if (-not (Test-Path -Path $settingsPath)){ if (-not (Test-Path -Path $settingsPath)){
Write-Host "Windows Terminal Settings file not found at $settingsPath" Write-Host "Windows Terminal Settings file not found at $settingsPath"
return return
} }
Write-Host "Settings file found." Write-Host "Settings file found."
@ -49,5 +49,5 @@ function Invoke-WPFTweakPS7{
Write-Host "using the name attribute." Write-Host "using the name attribute."
} else { } else {
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
} }
} }

View File

@ -33,7 +33,7 @@ Function Invoke-WPFUltimatePerformance {
if ($ultimatePlan) { if ($ultimatePlan) {
# Extract the GUID of the Ultimate Performance plan # Extract the GUID of the Ultimate Performance plan
$ultimatePlanGUID = $ultimatePlan.Line.Split()[3] $ultimatePlanGUID = $ultimatePlan.Line.Split()[3]
# Set a different power plan as active before deleting the Ultimate Performance plan # Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3] $balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
powercfg -setactive $balancedPlanGUID powercfg -setactive $balancedPlanGUID

View File

@ -29,15 +29,15 @@ theme:
- media: "(prefers-color-scheme: light)" - media: "(prefers-color-scheme: light)"
scheme: default scheme: default
toggle: toggle:
icon: material/toggle-switch-off-outline icon: material/toggle-switch-off-outline
name: Switch to dark mode name: Switch to dark mode
primary: black primary: black
accent: purple accent: purple
- media: "(prefers-color-scheme: dark)" - media: "(prefers-color-scheme: dark)"
scheme: slate scheme: slate
toggle: toggle:
icon: material/toggle-switch icon: material/toggle-switch
name: Switch to light mode name: Switch to light mode
primary: teal primary: teal
accent: lime accent: lime
markdown_extensions: markdown_extensions:

View File

@ -8,7 +8,7 @@
Author : Chris Titus @christitustech Author : Chris Titus @christitustech
Runspace Author: @DeveloperDurp Runspace Author: @DeveloperDurp
GitHub : https://github.com/ChrisTitusTech GitHub : https://github.com/ChrisTitusTech
Version : 24.07.16 Version : 24.07.17
#> #>
param ( param (
[switch]$Debug, [switch]$Debug,
@ -45,7 +45,7 @@ Add-Type -AssemblyName System.Windows.Forms
# Variable to sync between runspaces # Variable to sync between runspaces
$sync = [Hashtable]::Synchronized(@{}) $sync = [Hashtable]::Synchronized(@{})
$sync.PSScriptRoot = $PSScriptRoot $sync.PSScriptRoot = $PSScriptRoot
$sync.version = "24.07.16" $sync.version = "24.07.17"
$sync.configs = @{} $sync.configs = @{}
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
@ -1001,18 +1001,17 @@ Function Install-WinUtilProgramWinget {
[Parameter(Position=1)] [Parameter(Position=1)]
[String]$manage = "Installing" [String]$manage = "Installing"
) )
$x = 0
$count = $ProgramsToInstall.Count $count = $ProgramsToInstall.Count
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0 Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Configuring winget packages ---" Write-Host "-- Configuring winget packages ---"
Write-Host "===========================================" Write-Host "==========================================="
for ($i = 0; $i -le $ProgramsToInstall.Count; $i++) { Foreach ($Program in $ProgramsToInstall){
$Program = $ProgramsToInstall[$i]
$failedPackages = @() $failedPackages = @()
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($i + 1) of $count" -PercentComplete $(($i/$count) * 100) Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing") { if($manage -eq "Installing"){
# Install package via ID, if it fails try again with different scope and then with an unelevated prompt. # Install package via ID, if it fails try again with different scope and then with an unelevated prompt.
# Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround. # Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround.
# Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode. # Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode.
@ -1020,21 +1019,21 @@ Function Install-WinUtilProgramWinget {
Write-Host "Starting install of $($Program.winget) with winget." Write-Host "Starting install of $($Program.winget) with winget."
try { try {
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
if($status -eq 0) { if($status -eq 0){
Write-Host "$($Program.winget) installed successfully." Write-Host "$($Program.winget) installed successfully."
continue continue
} }
if ($status -eq -1978335189) { if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
continue continue
} }
Write-Host "Attempt with User scope" Write-Host "Attempt with User scope"
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
if($status -eq 0) { if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User scope." Write-Host "$($Program.winget) installed successfully with User scope."
continue continue
} }
if ($status -eq -1978335189) { if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
continue continue
} }
@ -1048,11 +1047,11 @@ Function Install-WinUtilProgramWinget {
} else { } else {
Write-Host "Skipping installation with specific user credentials." Write-Host "Skipping installation with specific user credentials."
} }
if($status -eq 0) { if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User prompt." Write-Host "$($Program.winget) installed successfully with User prompt."
continue continue
} }
if ($status -eq -1978335189) { if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
continue continue
} }
@ -1061,11 +1060,11 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program $failedPackages += $Program
} }
} }
elseif($manage -eq "Uninstalling") { if($manage -eq "Uninstalling"){
# Uninstall package via ID using winget directly. # Uninstall package via ID using winget directly.
try { try {
$status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode
if($status -ne 0) { if($status -ne 0){
Write-Host "Failed to uninstall $($Program.winget)." Write-Host "Failed to uninstall $($Program.winget)."
} else { } else {
Write-Host "$($Program.winget) uninstalled successfully." Write-Host "$($Program.winget) uninstalled successfully."
@ -1076,9 +1075,7 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program $failedPackages += $Program
} }
} }
else { $X++
throw "[Install-WinUtilProgramWinget] Invalid Value for Parameter 'manage', Provided Value is: $manage"
}
} }
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
return $failedPackages; return $failedPackages;
@ -5037,9 +5034,9 @@ function Invoke-WPFShortcut {
else{ else{
$shell = "powershell.exe" $shell = "powershell.exe"
} }
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'" $shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
$DestinationName = "WinUtil.lnk" $DestinationName = "WinUtil.lnk"
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png" Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png"
@ -5184,11 +5181,11 @@ function Invoke-WPFTweakPS7{
Write-Host "Windows Terminal not installed. Skipping Terminal preference" Write-Host "Windows Terminal not installed. Skipping Terminal preference"
return return
} }
# Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code) # Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code)
$settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json"
if (-not (Test-Path -Path $settingsPath)){ if (-not (Test-Path -Path $settingsPath)){
Write-Host "Windows Terminal Settings file not found at $settingsPath" Write-Host "Windows Terminal Settings file not found at $settingsPath"
return return
} }
Write-Host "Settings file found." Write-Host "Settings file found."
@ -5203,7 +5200,7 @@ function Invoke-WPFTweakPS7{
Write-Host "using the name attribute." Write-Host "using the name attribute."
} else { } else {
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
} }
} }
function Invoke-WPFtweaksbutton { function Invoke-WPFtweaksbutton {
<# <#
@ -5292,7 +5289,7 @@ Function Invoke-WPFUltimatePerformance {
if ($ultimatePlan) { if ($ultimatePlan) {
# Extract the GUID of the Ultimate Performance plan # Extract the GUID of the Ultimate Performance plan
$ultimatePlanGUID = $ultimatePlan.Line.Split()[3] $ultimatePlanGUID = $ultimatePlan.Line.Split()[3]
# Set a different power plan as active before deleting the Ultimate Performance plan # Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3] $balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
powercfg -setactive $balancedPlanGUID powercfg -setactive $balancedPlanGUID