Compare commits

...

35 Commits

Author SHA1 Message Date
MyDrift
d211ab4b27
Merge branch 'ChrisTitusTech:main' into Progress-bar 2024-07-17 08:26:24 +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
MyDrift
b8416c1f96 hotfix for new commit 2024-07-17 07:37:56 +02: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
ChrisTitusTech
b2cd7d7897 Compile Winutil 2024-07-16 15:56:01 +00:00
Real-MullaC
ad9cc6fffd
Fixes an issue with create changelog not working (#2375)
* Update createchangelog.yml

* Update createchangelog.yml
2024-07-16 10:55:30 -05:00
ChrisTitusTech
594ee94f49 Deploying to main from @ ChrisTitusTech/winutil@30bea93dde 🚀 2024-07-16 15:32:11 +00:00
Angaddeep Singh
30bea93dde
[Wiki] Automatically enabling Dark/Light mode set by user's browser Preference (#2366)
This allows the website to automatically switch to the theme set by the browser or the whole system.
2024-07-15 11:59:25 -05:00
25 changed files with 308 additions and 231 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.]
## Issue related to PR
[What issue is related to this PR (if any)]
[What issue/discussion is related to this PR (if any)]
- Resolves #
[What discussion is related to this PR (if any)]
- Discussion: #
## Additional Information
[Any additional information that reviewers should be aware of.]

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
id: extract-discussion
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
- name: Close the discussion

View File

@ -1,17 +1,42 @@
name: On release published
name: Update update.mb on Release
on:
release:
types: [published]
types: [published, prereleased]
workflow_dispatch: # Add this line to enable manual triggering
jobs:
changelog:
name: Update changelog
update-file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
- uses: rhysd/changelog-from-release/action@v3
with:
file: /docs/updates.md
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get all releases and update update.mb file
run: |
# Fetch all releases including pre-releases using GitHub CLI
gh release list --limit 5 > releases.txt
# Extract numeric versions and create update.mb content
echo "" > docs/update.mb
while read -r line; do
tag=$(echo "$line" | awk '{print $1}')
name=$(echo "$line" | awk -F'\t' '{print $2}')
version_numeric=$(echo "$tag" | grep -o -E '[0-9.]+')
body=$(gh release view "$tag" --json body --jq .body)
echo "## $version_numeric" >> docs/update.mb
echo "Release name: $name" >> docs/update.mb
echo "Release body: $body" >> docs/update.mb
echo "" >> docs/update.mb
done < releases.txt
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/update.mb
git commit -m "Update update.mb with all releases"
git push

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ jobs:
name: PS Script Analyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: lint
uses: devblackops/github-action-psscriptanalyzer@master
with:
@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Pester
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/)
## 🎓 Documenation
## 🎓 Documentation
### [WinUtil Official Documentation](https://christitustech.github.io/winutil/)
@ -54,7 +54,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
These are the sponsors that help keep this project alive with monthly contributions.
<!-- sponsors --><a href="https://github.com/GregoryNavasarkian"><img src="https://github.com/GregoryNavasarkian.png" width="60px" alt="Gregory Navasarkian" /></a><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/broganbranstetter"><img src="https://github.com/broganbranstetter.png" width="60px" alt="Brogan Branstetter" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/TDWillingham"><img src="https://github.com/TDWillingham.png" width="60px" alt="MetalliDan28" /></a><a href="https://github.com/frankolivares"><img src="https://github.com/frankolivares.png" width="60px" alt="" /></a><a href="https://github.com/Cube707"><img src="https://github.com/Cube707.png" width="60px" alt="Jan Wille" /></a><a href="https://github.com/Owen-3456"><img src="https://github.com/Owen-3456.png" width="60px" alt="Owen" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><!-- sponsors -->
<!-- sponsors --><a href="https://github.com/GregoryNavasarkian"><img src="https://github.com/GregoryNavasarkian.png" width="60px" alt="Gregory Navasarkian" /></a><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/broganbranstetter"><img src="https://github.com/broganbranstetter.png" width="60px" alt="Brogan Branstetter" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/TDWillingham"><img src="https://github.com/TDWillingham.png" width="60px" alt="MetalliDan28" /></a><a href="https://github.com/frankolivares"><img src="https://github.com/frankolivares.png" width="60px" alt="" /></a><a href="https://github.com/Cube707"><img src="https://github.com/Cube707.png" width="60px" alt="Jan Wille" /></a><a href="https://github.com/Owen-3456"><img src="https://github.com/Owen-3456.png" width="60px" alt="Owen" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><!-- sponsors -->
## 🏅 Thanks to all Contributors
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.

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'
- 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

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

@ -22,18 +22,17 @@ Function Install-WinUtilProgramWinget {
[Parameter(Position=1)]
[String]$manage = "Installing"
)
$x = 0
$count = $ProgramsToInstall.Count
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
Write-Host "==========================================="
Write-Host "-- Configuring winget packages ---"
Write-Host "==========================================="
for ($i = 0; $i -le $ProgramsToInstall.Count; $i++) {
$Program = $ProgramsToInstall[$i]
Foreach ($Program in $ProgramsToInstall){
$failedPackages = @()
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($i + 1) of $count" -PercentComplete $(($i/$count) * 100)
if($manage -eq "Installing") {
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){
# 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.
# Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode.
@ -41,26 +40,26 @@ Function Install-WinUtilProgramWinget {
Write-Host "Starting install of $($Program.winget) with winget."
try {
$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."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
continue
}
if ($status -eq -1978335189) {
if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
continue
}
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
if($status -eq 0) {
if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User scope."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
continue
}
if ($status -eq -1978335189) {
if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
continue
}
Write-Host "Attempt with User prompt"
@ -73,28 +72,29 @@ Function Install-WinUtilProgramWinget {
} else {
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."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
continue
}
if ($status -eq -1978335189) {
if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
continue
}
} catch {
Write-Host "Failed to install $($Program.winget). With winget"
$failedPackages += $Program
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($i/$count) })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
}
}
elseif($manage -eq "Uninstalling") {
if($manage -eq "Uninstalling"){
# Uninstall package via ID using winget directly.
try {
$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)."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} else {
Write-Host "$($Program.winget) uninstalled successfully."
$failedPackages += $Program
@ -104,11 +104,9 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
}
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
}
else {
throw "[Install-WinUtilProgramWinget] Invalid Value for Parameter 'manage', Provided Value is: $manage"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$count) })
}
$X++
}
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
return $failedPackages;

View File

@ -26,13 +26,15 @@ theme:
logo: assets/favicon.png
favicon: assets/favicon.png
palette:
- scheme: default
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
primary: black
accent: purple
- scheme: slate
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode

View File

@ -8,7 +8,7 @@
Author : Chris Titus @christitustech
Runspace Author: @DeveloperDurp
GitHub : https://github.com/ChrisTitusTech
Version : 24.07.15
Version : 24.07.17
#>
param (
[switch]$Debug,
@ -45,7 +45,7 @@ Add-Type -AssemblyName System.Windows.Forms
# Variable to sync between runspaces
$sync = [Hashtable]::Synchronized(@{})
$sync.PSScriptRoot = $PSScriptRoot
$sync.version = "24.07.15"
$sync.version = "24.07.17"
$sync.configs = @{}
$sync.ProcessRunning = $false
@ -1001,18 +1001,17 @@ Function Install-WinUtilProgramWinget {
[Parameter(Position=1)]
[String]$manage = "Installing"
)
$x = 0
$count = $ProgramsToInstall.Count
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
Write-Host "==========================================="
Write-Host "-- Configuring winget packages ---"
Write-Host "==========================================="
for ($i = 0; $i -le $ProgramsToInstall.Count; $i++) {
$Program = $ProgramsToInstall[$i]
Foreach ($Program in $ProgramsToInstall){
$failedPackages = @()
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($i + 1) of $count" -PercentComplete $(($i/$count) * 100)
if($manage -eq "Installing") {
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){
# 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.
# 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."
try {
$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."
continue
}
if ($status -eq -1978335189) {
if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found"
continue
}
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
if($status -eq 0) {
if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User scope."
continue
}
if ($status -eq -1978335189) {
if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found"
continue
}
@ -1048,11 +1047,11 @@ Function Install-WinUtilProgramWinget {
} else {
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."
continue
}
if ($status -eq -1978335189) {
if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found"
continue
}
@ -1061,11 +1060,11 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program
}
}
elseif($manage -eq "Uninstalling") {
if($manage -eq "Uninstalling"){
# Uninstall package via ID using winget directly.
try {
$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)."
} else {
Write-Host "$($Program.winget) uninstalled successfully."
@ -1076,9 +1075,7 @@ Function Install-WinUtilProgramWinget {
$failedPackages += $Program
}
}
else {
throw "[Install-WinUtilProgramWinget] Invalid Value for Parameter 'manage', Provided Value is: $manage"
}
$X++
}
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
return $failedPackages;