Merge branch 'ChrisTitusTech:main' into SoundSwitch
11
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -4,24 +4,23 @@ about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
## Describe the bug
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
## To Reproduce
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
## Expected behavior
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
## Screenshots
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
## Additional context
|
||||
Add any other context about the problem here.
|
||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -22,7 +22,7 @@
|
||||
[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 #
|
||||
|
||||
## Additional Information
|
||||
@ -33,4 +33,4 @@
|
||||
- [ ] I have performed a self-review of my own code.
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas.
|
||||
- [ ] 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
@ -0,0 +1,9 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
ignore:
|
||||
- dependency-name: "actions/stale"
|
||||
versions: '>= 9'
|
30
.github/workflows/close-discussion.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: Close Discussion on PR Merge
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
closeDiscussion:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if PR was merged
|
||||
if: github.event.pull_request.merged == true
|
||||
run: echo "PR was merged"
|
||||
|
||||
- name: Extract Discussion Number
|
||||
if: github.event.pull_request.merged == true
|
||||
id: extract-discussion
|
||||
run: |
|
||||
echo "discussion=$(echo '${{ github.event.pull_request.body }}' | grep -oP '(?<=Resolves #)\d+')" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Close the discussion
|
||||
if: github.event.pull_request.merged == true && steps.extract-discussion.outputs.discussion
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DISCUSSION_ID: ${{ steps.extract-discussion.outputs.discussion }}
|
||||
run: |
|
||||
curl -X PATCH -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-d '{"state": "closed"}' \
|
||||
"https://api.github.com/repos/${{ github.repository }}/discussions/${DISCUSSION_ID}"
|
42
.github/workflows/createchangelog.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: Update update.mb on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published, prereleased]
|
||||
workflow_dispatch: # Add this line to enable manual triggering
|
||||
|
||||
jobs:
|
||||
update-file:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- 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
|
23
.github/workflows/github-pages.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
name: GitHub Pages Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ github.ref }}
|
||||
path: .cache
|
||||
- run: pip install mkdocs-material
|
||||
- run: pip install pillow cairosvg
|
||||
- run: mkdocs gh-deploy --force
|
43
.github/workflows/issue-slash-commands.yaml
vendored
Normal 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 }}
|
42
.github/workflows/pre-release.yaml
vendored
@ -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,9 +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 }}
|
||||
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 }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
5
.github/workflows/release.yaml
vendored
@ -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
|
||||
}
|
||||
}
|
||||
@ -36,6 +35,8 @@ jobs:
|
||||
with:
|
||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||
name: 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
|
||||
files: ./winutil.ps1
|
||||
prerelease: false
|
||||
make_latest: "true"
|
||||
|
25
.github/workflows/sponsors.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Generate Sponsors README
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: 30 15 * * 0-6
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate Sponsors 💖
|
||||
uses: JamesIves/github-sponsors-readme-action@v1
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
file: 'README.md'
|
||||
|
||||
- name: Deploy to GitHub Pages 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
branch: main
|
||||
folder: '.'
|
4
.github/workflows/unittests.yaml
vendored
@ -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: |
|
||||
|
@ -1,20 +0,0 @@
|
||||
## Issues
|
||||
|
||||
If you encounter any challenges or problems with the script, I kindly request that you submit them via the "Issues" tab on the GitHub repository. By filling out the provided template, you can provide specific details about the issue, allowing me (and others in the community) to promptly address any bugs, or consider feature requests.
|
||||
|
||||
## Contribute Code
|
||||
|
||||
Pull Requests are now handled directly on the **MAIN branch**. This was done since we can now select specific releases to launch via releases in GitHub.
|
||||
|
||||
If you're doing code changes, then you can submit a PR to `main` branch, but I am very selective about these.
|
||||
|
||||
> [!WARNING]
|
||||
> Do not use a code formatter, massive amounts of line changes, and make multiple feature changes.
|
||||
> EACH FEATURE CHANGE SHOULD BE IT'S OWN Pull Request!
|
||||
|
||||
When creating pull requests, it is essential to thoroughly document all changes made. This includes, but not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes, document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in denial of the pull request. Additionally, Any code lacking sufficient documentation may also be denied.
|
||||
|
||||
By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented.
|
||||
|
||||
> [!NOTE]
|
||||
> When creating a function, please include "WPF" or "WinUtil" in the file name so it can be loaded into the runspace.
|
@ -56,12 +56,10 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-
|
||||
|
||||
# Replace every XML Special Character so it'll render correctly in final build
|
||||
# Only do so if json files has content to be displayed (for example the applications, tweaks, features json files)
|
||||
# Some Type Convertion using Casting and Cleaning Up of the convertion result using 'Replace' Method
|
||||
# Make an Array List containing every name at first level of Json File
|
||||
$jsonAsObject = $json | convertfrom-json
|
||||
$firstLevelJsonList = ([System.String]$jsonAsObject).split('=;') | ForEach-Object {
|
||||
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
||||
}
|
||||
|
||||
$firstLevelJsonList = [System.Collections.ArrayList]::new()
|
||||
$jsonAsObject.PSObject.Properties.Name | ForEach-Object {$null = $firstLevelJsonList.Add($_)}
|
||||
# Note:
|
||||
# Avoid using HTML Entity Codes, for example '”' (stands for "Right Double Quotation Mark"),
|
||||
# Use **HTML decimal/hex codes instead**, as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
||||
|
@ -1,53 +0,0 @@
|
||||
## Known Issues and Fixes
|
||||
|
||||
### Launch Issues:
|
||||
|
||||
- Windows Security (formerly Defender) and other anti-virus software are known to block the script. The script gets flagged due to the fact that it requires administrator privileges & makes drastic system changes.
|
||||
- If possible: Allow script in Anti-Virus software settings.
|
||||
|
||||
- If you are having TLS 1.2 issues, or are having trouble resolving `christitus.com/win` then run with the following command:
|
||||
|
||||
```ps1
|
||||
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1')
|
||||
```
|
||||
|
||||
- If you are unable to resolve `christitus.com/win` and are getting errors launching the tool, it might be due to India blocking GitHub's content domain and preventing downloads.
|
||||
- Source: <https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms>
|
||||
|
||||
If you are still having issues try using a **VPN**, or changing your **DNS provider** to:
|
||||
|
||||
| `1.1.1.1` | `1.0.0.1` | or | `8.8.8.8` | `8.8.4.4` |
|
||||
|---------|---------|-----|---------|---------|
|
||||
|
||||
- Script doesn't run/PowerShell crashes:
|
||||
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
|
||||
2. Run:
|
||||
```ps1
|
||||
Set-ExecutionPolicy Unrestricted -Scope Process -Force
|
||||
```
|
||||
3. Run:
|
||||
```ps1
|
||||
irm christitus.com/win | iex
|
||||
```
|
||||
|
||||
### Other Issues:
|
||||
|
||||
- Windows taking longer to shut down:
|
||||
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) Turn on fast startup: Press Windows key + R, then type:
|
||||
```
|
||||
control /name Microsoft.PowerOptions /page pageGlobalSettings
|
||||
```
|
||||
- If that doesn't work, Disable Hibernation: Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11) and enter:
|
||||
```ps1
|
||||
powercfg /H off
|
||||
```
|
||||
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232) Windows Search does not work: Enable Background Apps
|
||||
- [#198](https://github.com/ChrisTitusTech/winutil/issues/198) Xbox Game Bar Activation Broken: Set the Xbox Accessory Management Service to Automatic
|
||||
```ps1
|
||||
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
||||
```
|
||||
|
||||
- Winget requires interaction on first run: Manually type 'y' and 'enter' into the PowerShell console to continue
|
||||
- (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'.
|
102
README.md
@ -1,14 +1,14 @@
|
||||
# Chris Titus Tech's Windows Utility
|
||||
|
||||
[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=7a39fb)](https://github.com/ChrisTitusTech/winutil/releases/latest)
|
||||
![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/latest/total)
|
||||
|
||||
[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/winutil/releases/latest)
|
||||
![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/winutil.ps1?label=Total%20Downloads&style=for-the-badge)
|
||||
[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ)
|
||||
|
||||
This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient.
|
||||
|
||||
![screen-install](screen-install.png)
|
||||
![screen-install](./docs/assets/screen-install.png)
|
||||
|
||||
## Usage
|
||||
## 💡 Usage
|
||||
|
||||
Winutil must be run in Admin mode because it performs system-wide tweaks. To achieve this, open PowerShell or Windows Terminal as an administrator. Here are a few ways to do it:
|
||||
|
||||
@ -24,99 +24,43 @@ Winutil must be run in Admin mode because it performs system-wide tweaks. To ach
|
||||
|
||||
### Launch Command
|
||||
|
||||
#### Simple way
|
||||
#### Stable Branch
|
||||
|
||||
```ps1
|
||||
irm "https://christitus.com/win" | iex
|
||||
```
|
||||
Courtesy of the issue: [#144](/../../issues/144)
|
||||
#### Dev Branch
|
||||
|
||||
If this site is not reachable from your country, please try running it directly from GitHub.
|
||||
```ps1
|
||||
irm "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1" | iex
|
||||
irm "https://christitus.com/windev" | iex
|
||||
```
|
||||
|
||||
If you still have Issues, refer to [Known Issues](https://github.com/ChrisTitusTech/winutil/blob/main/KnownIssues.md).
|
||||
If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/)
|
||||
|
||||
## 🎓 Documentation
|
||||
|
||||
### [WinUtil Official Documentation](https://christitustech.github.io/winutil/)
|
||||
|
||||
### [YouTube Tutorial](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
|
||||
|
||||
### [ChrisTitus.com Article](https://christitus.com/windows-tool/)
|
||||
|
||||
|
||||
#### Automation
|
||||
|
||||
Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
|
||||
|
||||
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
||||
![GetInstalled](/wiki/Get-Installed.png)
|
||||
2. Click on the Settings cog in the upper right corner and chose Export, chose file file and location, this will export the setting file.
|
||||
![SettingsExport](/wiki/Settings-Export.png)
|
||||
3. Copy this file to a USB or somewhere you can use after Windows installation.
|
||||
4. Use Microwin tab to create a custom Windows image.
|
||||
5. Install the Windows image.
|
||||
6. In the new Windows, Open PowerShell in the admin mode and run command to automatically apply tweaks and install apps from the config file.
|
||||
```ps1
|
||||
iex "& { $(irm christitus.com/win) } -Config [path-to-your-config] -Run"
|
||||
```
|
||||
7. Have a cup of coffee! Come back when it's done.
|
||||
|
||||
|
||||
|
||||
## Support
|
||||
## 💖 Support
|
||||
- To morally and mentally support the project, make sure to leave a ⭐️!
|
||||
- EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox
|
||||
|
||||
## Tutorial
|
||||
## 💖 Sponsors
|
||||
|
||||
[![Watch the video](https://img.youtube.com/vi/6UQZ5oQg8XA/hqdefault.jpg)](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
|
||||
These are the sponsors that help keep this project alive with monthly contributions.
|
||||
|
||||
## Overview
|
||||
<!-- 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 -->
|
||||
|
||||
- Install
|
||||
- Install Selection: Organize programs by category and facilitate installation by enabling users to select programs and initiate the installation process with a single click.
|
||||
|
||||
- Upgrade All: Upgrade all existing programs to their latest versions, ensuring users have the most up-to-date and feature-rich software.
|
||||
|
||||
- Uninstall Selection: Effortlessly uninstall selected programs, providing users with a streamlined way to remove unwanted software from their system.
|
||||
|
||||
- Get Installed: Retrieve a comprehensive list of installed programs on the system, offering users visibility into the software currently installed on their computer.
|
||||
|
||||
- Import / Export: Enable users to import or export the selection list of programs, allowing them to save their preferred program configurations or share them with others. This feature promotes convenience and flexibility in managing program selections across different systems.
|
||||
|
||||
- Tweaks
|
||||
- Recommended Selection: Provides pre-defined templates tailored for desktop, laptop, and minimal configurations, allowing users to select recommended settings and optimizations specific to their system type.
|
||||
|
||||
- Essential Tweaks: Offers a collection of essential tweaks aimed at improving system performance, privacy, and resource utilization. These tweaks include creating a system restore point, disabling telemetry, Wi-Fi Sense, setting services to manual, disabling location tracking, and HomeGroup, among others.
|
||||
|
||||
- Advanced Tweaks: Encompasses a range of various advanced power user tweaks to further optimize the system. These tweaks include removing OneDrive and Edge, disabling User Account Control (UAC), notification panel, among others.
|
||||
|
||||
- Toggles: Adds easy to use, one click shortcuts for toggling dark mode, NumLock on startup, file extensions, sticky keys, among others.
|
||||
|
||||
- Additional Tweaks: Introduces various other tweaks such as enabling dark mode, changing DNS settings, adding an Ultimate Performance mode, and creating shortcuts for WinUtil tools. These tweaks provide users with additional customization options to tailor their system to their preferences.
|
||||
|
||||
- Config
|
||||
- Features: Allows users to easily install various essential components and features to enhance their Windows experience. These features include installing .NET Frameworks, enabling Hyper-V virtualization, enabling legacy media support for Windows Media Player and DirectPlay, enabling NFS (Network File System) for network file sharing, and enabling Windows Subsystem for Linux (WSL) for running Linux applications on Windows.
|
||||
|
||||
- Fixes: Provides a range of helpful fixes to address common issues and improve system stability. This includes setting up autologon for seamless login experiences, resetting Windows updates to resolve update-related problems, performing a system corruption scan to detect and repair corrupted files, and resetting network settings to troubleshoot network connectivity issues.
|
||||
|
||||
- Legacy Windows Panels: Includes access to legacy Windows panels from Windows 7, allowing users to access familiar and powerful tools. These panels include Control Panel for managing system settings, Network Connections for configuring network adapters and connections, Power Panel for adjusting power and sleep settings, Sound Settings for managing audio devices and settings, System Properties for viewing and modifying system information, and User Accounts for managing user profiles and account settings.
|
||||
|
||||
|
||||
- Updates:
|
||||
- Default (Out of Box) Settings: Provides the default settings that come with Windows for updates.
|
||||
|
||||
- Security (Recommended) Settings: Offers recommended settings, including a slight delay of feature updates by 2 years and installation of security updates 4 days after release.
|
||||
|
||||
- Disable All Updates (Not Recommended!): Allows users to disable all Windows updates, but it's not recommended due to potential security risks.
|
||||
|
||||
|
||||
Video and Written Article walkthrough @ <https://christitus.com/windows-tool/>
|
||||
|
||||
## Contributing Guidelines
|
||||
|
||||
If you encounter any challenges or problems with the script, or want to contribute code to the project, please consider reading through our [Contributing Guidelines](./CONTRIBUTING.md)
|
||||
|
||||
## Thanks to all Contributors
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
||||
[![Contributors](https://contrib.rocks/image?repo=ChrisTitusTech/winutil)](https://github.com/ChrisTitusTech/winutil/graphs/contributors)
|
||||
|
||||
## GitHub Stats
|
||||
## 📊 GitHub Stats
|
||||
|
||||
![Alt](https://repobeats.axiom.co/api/embed/aad37eec9114c507f109d34ff8d38a59adc9503f.svg "Repobeats analytics image")
|
||||
|
@ -2647,6 +2647,14 @@
|
||||
"link": "https://zoom.us/",
|
||||
"winget": "Zoom.Zoom"
|
||||
},
|
||||
"zoomit": {
|
||||
"category": "Utilities",
|
||||
"choco": "na",
|
||||
"content": "ZoomIt",
|
||||
"description": "A screen zoom, annotation, and recording tool for technical presentations and demos",
|
||||
"link": "https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit",
|
||||
"winget": "Microsoft.Sysinternals.ZoomIt"
|
||||
},
|
||||
"zotero": {
|
||||
"category": "Document",
|
||||
"choco": "zotero",
|
||||
@ -2887,6 +2895,14 @@
|
||||
"link": "https://github.com/xM4ddy/OFGB",
|
||||
"winget": "xM4ddy.OFGB"
|
||||
},
|
||||
"PaleMoon": {
|
||||
"category": "Browsers",
|
||||
"choco": "paleMoon",
|
||||
"content": "PaleMoon",
|
||||
"description":"Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use.",
|
||||
"link": "https://www.palemoon.org/download.shtml",
|
||||
"winget": "MoonchildProductions.PaleMoon"
|
||||
},
|
||||
"Shotcut": {
|
||||
"category": "Multimedia Tools",
|
||||
"choco": "na",
|
||||
@ -2894,5 +2910,45 @@
|
||||
"description": "Shotcut is a free, open source, cross-platform video editor.",
|
||||
"link": "https://shotcut.org/",
|
||||
"winget": "Meltytech.Shotcut"
|
||||
},
|
||||
"LenovoLegionToolkit": {
|
||||
"category": "Utilities",
|
||||
"choco": "na",
|
||||
"content": "Lenovo Legion Toolkit",
|
||||
"description": "Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion (and similar) series laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only.",
|
||||
"link": "https://github.com/BartoszCichecki/LenovoLegionToolkit",
|
||||
"winget": "BartoszCichecki.LenovoLegionToolkit"
|
||||
},
|
||||
"PulsarEdit": {
|
||||
"category": "Development",
|
||||
"choco": "pulsar",
|
||||
"content": "Pulsar",
|
||||
"description": "A Community-led Hyper-Hackable Text Editor",
|
||||
"link": "https://pulsar-edit.dev/",
|
||||
"winget": "Pulsar-Edit.Pulsar"
|
||||
},
|
||||
"Aegisub": {
|
||||
"category": "Development",
|
||||
"choco": "aegisub",
|
||||
"content": "Aegisub",
|
||||
"description": "Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.",
|
||||
"link": "https://github.com/Aegisub/Aegisub",
|
||||
"winget": "Aegisub.Aegisub"
|
||||
},
|
||||
"SubtitleEdit": {
|
||||
"category": "Multimedia Tools",
|
||||
"choco": "na",
|
||||
"content": "Subtitle Edit",
|
||||
"description": "Subtitle Edit is a free and open source editor for video subtitles.",
|
||||
"link": "https://github.com/SubtitleEdit/subtitleedit",
|
||||
"winget": "Nikse.SubtitleEdit"
|
||||
},
|
||||
"Fork": {
|
||||
"category": "Development",
|
||||
"choco": "git-fork",
|
||||
"content": "Fork",
|
||||
"description": "Fork - a fast and friendly git client.",
|
||||
"link": "https://git-fork.com/",
|
||||
"winget": "Fork.Fork"
|
||||
}
|
||||
}
|
||||
|
@ -2294,19 +2294,35 @@
|
||||
"panel": "1",
|
||||
"Order": "a006_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"1\"
|
||||
"
|
||||
"$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\"
|
||||
$name = \"TaskbarEndTask\"
|
||||
$value = 1
|
||||
|
||||
# Ensure the registry key exists
|
||||
if (-not (Test-Path $path)) {
|
||||
New-Item -Path $path -Force | Out-Null
|
||||
}
|
||||
|
||||
# Set the property, creating it if it doesn't exist
|
||||
New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"0\"
|
||||
"
|
||||
"$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\"
|
||||
$name = \"TaskbarEndTask\"
|
||||
$value = 0
|
||||
|
||||
# Ensure the registry key exists
|
||||
if (-not (Test-Path $path)) {
|
||||
New-Item -Path $path -Force | Out-Null
|
||||
}
|
||||
|
||||
# Set the property, creating it if it doesn't exist
|
||||
New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null"
|
||||
]
|
||||
},
|
||||
"WPFTweaksPowershell7": {
|
||||
"Content": "Replace Default Powershell 5 to Powershell 7",
|
||||
"Description": "This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary",
|
||||
"Content": "Change Windows Terminal default: PowerShell 5 -> PowerShell 7",
|
||||
"Description": "This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a009_",
|
||||
@ -3067,12 +3083,20 @@
|
||||
"Order": "a108_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleHiddenFiles": {
|
||||
"Content": "Show Hidden Files",
|
||||
"Description": "If Enabled then Hidden Files will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a200_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleShowExt": {
|
||||
"Content": "Show File Extensions",
|
||||
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a200_",
|
||||
"Order": "a201_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarSearch": {
|
||||
@ -3080,7 +3104,7 @@
|
||||
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a201_",
|
||||
"Order": "a202_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskView": {
|
||||
@ -3088,7 +3112,7 @@
|
||||
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a202_",
|
||||
"Order": "a203_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
@ -3096,7 +3120,15 @@
|
||||
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a203_",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarAlignment": {
|
||||
"Content": "Switch Taskbar Items between Center & Left",
|
||||
"Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
|
177
docs/KnownIssues.md
Normal file
@ -0,0 +1,177 @@
|
||||
## Known Issues and Fixes
|
||||
|
||||
### Launch Issues:
|
||||
|
||||
- Windows Security (formerly Defender) and other anti-virus software are known to block the script. The script gets flagged due to the fact that it requires administrator privileges & makes drastic system changes.
|
||||
- If possible: Allow script in Anti-Virus software settings.
|
||||
|
||||
- If you are having TLS 1.2 issues, or are having trouble resolving `christitus.com/win` then run with the following command:
|
||||
|
||||
```ps1
|
||||
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1')
|
||||
```
|
||||
|
||||
- If you are unable to resolve `christitus.com/win` and are getting errors launching the tool, it might be due to India blocking GitHub's content domain and preventing downloads.
|
||||
- Source: <https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms>
|
||||
|
||||
If you are still having issues try using a **VPN**, or changing your **DNS provider** to:
|
||||
|
||||
| `1.1.1.1` | `1.0.0.1` | or | `8.8.8.8` | `8.8.4.4` |
|
||||
|---------|---------|-----|---------|---------|
|
||||
|
||||
- Script doesn't run/PowerShell crashes:
|
||||
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
|
||||
2. Run:
|
||||
```ps1
|
||||
Set-ExecutionPolicy Unrestricted -Scope Process -Force
|
||||
```
|
||||
3. Run:
|
||||
```ps1
|
||||
irm christitus.com/win | iex
|
||||
```
|
||||
|
||||
### Other Issues:
|
||||
|
||||
- Windows taking longer to shut down:
|
||||
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) Turn on fast startup: Press Windows key + R, then type:
|
||||
```
|
||||
control /name Microsoft.PowerOptions /page pageGlobalSettings
|
||||
```
|
||||
- If that doesn't work, Disable Hibernation: Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11) and enter:
|
||||
```ps1
|
||||
powercfg /H off
|
||||
```
|
||||
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232) Windows Search does not work: Enable Background Apps
|
||||
- [#198](https://github.com/ChrisTitusTech/winutil/issues/198) Xbox Game Bar Activation Broken: Set the Xbox Accessory Management Service to Automatic
|
||||
```ps1
|
||||
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
||||
```
|
||||
|
||||
- Winget requires interaction on first run: Manually type 'y' and 'enter' into the PowerShell console to continue
|
||||
- (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.
|
BIN
docs/assets/CommitGHD.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
docs/assets/CreateBranch.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
docs/assets/ForkButton.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
BIN
docs/assets/MicroWinScreen.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
docs/assets/ProgramInstall.png
Normal file
After Width: | Height: | Size: 138 KiB |
BIN
docs/assets/ProgramInstallButton.png
Normal file
After Width: | Height: | Size: 303 KiB |
BIN
docs/assets/ProgramUninstall.png
Normal file
After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
BIN
docs/assets/TweaksScreen.png
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
docs/assets/favicon.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 339 KiB |
57
docs/contribute.md
Normal file
@ -0,0 +1,57 @@
|
||||
# How to Contribute?
|
||||
|
||||
## Issues
|
||||
|
||||
* If you encounter any challenges or problems with the script, I kindly request that you submit them via the "Issues" tab on the GitHub repository. By filling out the provided template, you can provide specific details about the issue, allowing me (and others in the community) to promptly address any bugs, or consider feature requests.
|
||||
|
||||
## Contribute Code
|
||||
|
||||
* Pull Requests are now handled directly on the **MAIN branch**. This was done since we can now select specific releases to launch via releases in GitHub.
|
||||
|
||||
* If you're doing code changes, then you can submit a PR to `main` branch, but I am very selective about these.
|
||||
|
||||
> [!WARNING]
|
||||
> Do not use a code formatter, massive amounts of line changes, and make multiple feature changes.
|
||||
> EACH FEATURE CHANGE SHOULD BE IT'S OWN Pull Request!
|
||||
|
||||
* When creating pull requests, it is essential to thoroughly document all changes made. This includes, but not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes, document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in denial of the pull request. Additionally, Any code lacking sufficient documentation may also be denied.
|
||||
|
||||
* By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented.
|
||||
|
||||
> [!NOTE]
|
||||
> When creating a function, please include "WPF" or "WinUtil" in the file name so it can be loaded into the runspace.
|
||||
|
||||
## Walk through
|
||||
|
||||
### Fork the Repo
|
||||
* 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)
|
||||
|
||||
### 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.
|
||||
* 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
|
||||
* Log in using the same GitHub account u used to fork WinUtil
|
||||
* Choose the fork under "Your Repositories" and press "clone {repo name}"
|
||||
* Create a new Branch and name it something relatable to your changes,
|
||||
|
||||
* Now you can modify WinUtil to your liking using your prefered text editor.
|
||||
|
||||
|
||||
### Testing your changes
|
||||
* To test to see if your changes work as intended run following commands in a powershell teminal:
|
||||
|
||||
* Change the directory where you are running the commands to the forked project.
|
||||
* `cd {path to the folder with the compile.ps1}`
|
||||
* Run following command to compile and run Winutil
|
||||
* `.\Compile.ps1 -run`
|
||||
* After seeing that your changes work properly feel free to commit the changes to the repository and make a PR, for help on that follow the documentation below.
|
||||
|
||||
### Commiting the changes
|
||||
* Commit your changes once you are fine with the result
|
||||
* Push the changes to "upload" them to your fork on github.com.
|
||||
|
||||
### Making a PR
|
||||
* To make a PR on your repo under a new branch linking to the main branch a button will show and say Preview and Create pull request. Click that button and fill in all information that is provided on the template. Once all the information is filled in correctly check your PR to make sure there is not a WinUtil.ps1 file attached to the PR. Once everything is good make the PR and wait for Chris (The Maintainer) to accept or deny your PR. Once it is accepted in by Chris you will be able to see your changes in the /windev build.
|
||||
* If you do not see your feature in the main /win build that is fine. As all new changes go into the /windev build to make sure everything is working ok before going fully public.
|
||||
* Congrats you just submitted your first PR. Thank you so much for contributing to WinUtil.
|
4
docs/faq.md
Normal file
@ -0,0 +1,4 @@
|
||||
# FAQ's
|
||||
|
||||
## How do I uninstall WinUtil?
|
||||
* You do not have to uninstall WinUtil. As it is a script you run from Powershell it only loads into your RAM. This means as soon as you close WinUtil it will be deleted off your system.
|
12
docs/index.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Welcome to Chris Titus WinUtil Official Documentation!
|
||||
|
||||
[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ)](https://discord.gg/RUbZUZyByQ)
|
||||
|
||||
## Running
|
||||
|
||||
There are 4 ways to run WinUtil. The 4 ways goes as follows:
|
||||
|
||||
* `irm christitus.com/win | iex` - Runs WinUtil from ChrisTitus's website using the latest Full Releases.
|
||||
* `irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex` - Runs WinUtil from github using the latest Full Release.
|
||||
* `irm christitus.com/windev | iex` - Runs WinUtil from ChrisTitus website using the latest Pre-Release.
|
||||
* `irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/windev.ps1 | iex` - Runs WinUtil from github using the latest Pre-Release.
|
3
docs/updates.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Update Log
|
||||
|
||||
#
|
159
docs/userguide.md
Normal file
@ -0,0 +1,159 @@
|
||||
# User Guide
|
||||
|
||||
## Overview
|
||||
* short one
|
||||
|
||||
|
||||
## Walkthrough
|
||||
|
||||
### Program
|
||||
|
||||
#### Installation & Updates
|
||||
* To install programs select the programs you wish to install or update like the picture below.
|
||||
![Program Install](assets/ProgramInstall.png)
|
||||
* Once you have selected the programs you wish to install click the select Install/Upgrade Selected button as seen below.
|
||||
![Program Install Button](assets/ProgramInstallButton.png)
|
||||
|
||||
#### Upgrade All
|
||||
* Press the button to upgrade all installed programs that are supported by WinGet, there is no selection needed.
|
||||
|
||||
#### Uninstall
|
||||
* To uninstall programs select the programs you wish to uninstall like the picture below.
|
||||
![Program Uninstall](assets/ProgramInstall.png)
|
||||
* Once you have selected the programs you wish to uninstall click the select Uninstall Selected button as seen below.
|
||||
![Program Uninstall Button](assets/ProgramUninstall.png)
|
||||
|
||||
#### Get Installed
|
||||
* Checks for installed programs that are supported by WinGet and selects them in the Utility.
|
||||
|
||||
#### Clear Selection
|
||||
* Clears ur current selection so no program is checked.
|
||||
|
||||
### Tweaks
|
||||
|
||||
#### Tweaks Addition
|
||||
* 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.
|
||||
![Tweaks Screen](assets/TweaksScreen.PNG)
|
||||
* After you have chosen your tweaks click the Run Tweaks button at the bottom of the screen.
|
||||
|
||||
#### Tweaks Removal
|
||||
* To disable tweaks on your system select Tweaks at the top next to Install.
|
||||
* Then you can select what tweaks you want removing from your system.
|
||||
* After you have chosen your tweaks you want to remove click the Undo Selected Tweaks button at the bottom of the screen.
|
||||
|
||||
#### Essential Tweaks
|
||||
* The Tweaks under the Essential
|
||||
|
||||
#### Advanced Tweaks - CAUTION
|
||||
|
||||
#### O&O Shutup
|
||||
|
||||
#### DNS
|
||||
|
||||
#### Customize Preferences
|
||||
|
||||
#### Performance Plans
|
||||
|
||||
#### Shortcuts
|
||||
|
||||
|
||||
![Tweaks Screen](assets/TweaksScreen.PNG)
|
||||
|
||||
### Config
|
||||
|
||||
#### Features
|
||||
* Install the most used Windows Features by checking the checkbox and clicking "Install Features" to install them
|
||||
|
||||
#### Fixes
|
||||
* Quick Fixes for your system if you are having Issues.
|
||||
|
||||
* Set Up Autologin
|
||||
* Reset Windows Update
|
||||
* Reset Network
|
||||
* System Corruption Scan
|
||||
* WinGet Reinstall
|
||||
* Remove Adobe Creative Cloud
|
||||
|
||||
#### Legacy Windows Panels
|
||||
|
||||
### Updates | Not working rn
|
||||
|
||||
### MicroWin
|
||||
|
||||
**MicroWin** lets you customize your Windows 10 and 11 installation images by debloating them however you want.
|
||||
|
||||
![MicroWin](assets/MicroWinScreen.png)
|
||||
|
||||
#### Basic usage
|
||||
|
||||
1. Specify the source Windows ISO to customize
|
||||
|
||||
* If you don't have a Windows ISO file prepared, you can download it using the Media Creation Tool for the respective Windows version. [Here](https://go.microsoft.com/fwlink/?linkid=2156295) is the Windows 11 version, and [here](https://go.microsoft.com/fwlink/?LinkId=2265055) is the Windows 10 version
|
||||
|
||||
2. Configure the debloat process
|
||||
3. Specify the target location for the new ISO file
|
||||
4. Let the magic happen!
|
||||
|
||||
**NOTE:** this feature is still in development and you may encounter some issues with the generated images. If that happens, don't hesitate to report an issue!
|
||||
|
||||
#### Options
|
||||
|
||||
* **Download oscdimg.exe from CTT GitHub repo** will grab a OSCDIMG executable from the GitHub repository instead of a Chocolatey package
|
||||
|
||||
OSCDIMG is the tool that lets the program create ISO images. Typically, you would find this in the [Windows Assessment and Deployment Kit](https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install)
|
||||
|
||||
* Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder on the `%TEMP%` directory
|
||||
* You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu
|
||||
|
||||
By default, MicroWin will debloat the Pro edition, but you can choose any edition you want
|
||||
|
||||
|
||||
##### Customization options
|
||||
|
||||
* **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
|
||||
|
||||
* **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
|
||||
|
||||
* **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
|
||||
|
||||
* **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)
|
||||
|
||||
|
||||
##### Driver integration options
|
||||
|
||||
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image
|
||||
* **Import drivers from current system** will add every third-party driver that is present in your active installation
|
||||
|
||||
This makes the target image have the same hardware compatibility of the active installation. However, this means that you will only be able to install the target Windows image and take full advantage of it on computers with **the same hardware**. To avoid this, you'll need to customize the `install.wim` file of the target ISO in the `sources` folder
|
||||
|
||||
|
||||
##### Ventoy options
|
||||
|
||||
* **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
|
||||
|
||||
|
||||
## Automation
|
||||
|
||||
* Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
|
||||
|
||||
* On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
||||
![GetInstalled](assets/Get-Installed.png)
|
||||
* Click on the Settings cog in the upper right corner and chose Export, chose file file and location, this will export the setting file.
|
||||
![SettingsExport](assets/Settings-Export.png)
|
||||
* Copy this file to a USB or somewhere you can use after Windows installation.
|
||||
* Use Microwin tab to create a custom Windows image.
|
||||
* Install the Windows image.
|
||||
* In the new Windows, Open PowerShell in the admin mode and run command to automatically apply tweaks and install apps from the config file.
|
||||
* ``` iex "& { $(irm christitus.com/win) } -Config [path-to-your-config] -Run" ```
|
||||
* Have a cup of coffee! Come back when it's done.
|
@ -125,13 +125,33 @@ Function Get-WinUtilToggleStatus {
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($ToggleSwitch -eq "WPFToggleHiddenFiles") {
|
||||
$HiddenFiles = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').Hidden
|
||||
if($HiddenFiles -eq 0){
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
||||
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
||||
if($TaskbarWidgets -eq 0) {
|
||||
if($TaskbarWidgets -eq 0) {
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($ToggleSwitch -eq "WPFToggleTaskbarAlignment") {
|
||||
$TaskbarAlignment = (Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskbarAl
|
||||
if($TaskbarAlignment -eq 0) {
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ function Install-WinUtilProgramChoco {
|
||||
|
||||
# Cleanup leftovers files
|
||||
if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $installOutputFilePath }
|
||||
if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath }
|
||||
if(Test-Path -Path $uninstallOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath }
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -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,21 +40,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
|
||||
}
|
||||
@ -69,11 +68,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
|
||||
}
|
||||
@ -82,11 +81,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."
|
||||
@ -97,9 +96,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;
|
||||
|
34
functions/private/Invoke-WinUtilHiddenFiles.ps1
Normal file
@ -0,0 +1,34 @@
|
||||
function Invoke-WinUtilHiddenFiles {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Hidden Files
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Hidden Files
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
Try{
|
||||
if ($Enabled -eq $false){
|
||||
Write-Host "Enabling Hidden Files"
|
||||
$value = 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Disabling Hidden Files"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name Hidden -Value $value
|
||||
}
|
||||
Catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
}
|
||||
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
}
|
||||
Catch{
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
45
functions/private/Invoke-WinUtilSponsors.ps1
Normal file
@ -0,0 +1,45 @@
|
||||
Function Invoke-WinUtilSponsors {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists Sponsors from ChrisTitusTech
|
||||
.DESCRIPTION
|
||||
Lists Sponsors from ChrisTitusTech
|
||||
.EXAMPLE
|
||||
Invoke-WinUtilSponsors
|
||||
.NOTES
|
||||
This function is used to list sponsors from ChrisTitusTech
|
||||
#>
|
||||
try {
|
||||
# Define the URL and headers
|
||||
$url = "https://github.com/sponsors/ChrisTitusTech"
|
||||
$headers = @{
|
||||
"User-Agent" = "Chrome/58.0.3029.110"
|
||||
}
|
||||
|
||||
# Fetch the webpage content
|
||||
try {
|
||||
$html = Invoke-RestMethod -Uri $url -Headers $headers
|
||||
} catch {
|
||||
Write-Output $_.Exception.Message
|
||||
exit
|
||||
}
|
||||
|
||||
# Use regex to extract the content between "Current sponsors" and "Past sponsors"
|
||||
$currentSponsorsPattern = '(?s)(?<=Current sponsors).*?(?=Past sponsors)'
|
||||
$currentSponsorsHtml = [regex]::Match($html, $currentSponsorsPattern).Value
|
||||
|
||||
# Use regex to extract the sponsor usernames from the alt attributes in the "Current Sponsors" section
|
||||
$sponsorPattern = '(?<=alt="@)[^"]+'
|
||||
$sponsors = [regex]::Matches($currentSponsorsHtml, $sponsorPattern) | ForEach-Object { $_.Value }
|
||||
|
||||
# Exclude "ChrisTitusTech" from the sponsors
|
||||
$sponsors = $sponsors | Where-Object { $_ -ne "ChrisTitusTech" }
|
||||
|
||||
# Return the sponsors
|
||||
return $sponsors
|
||||
}
|
||||
catch {
|
||||
Write-Error "An error occurred while fetching or processing the sponsors: $_"
|
||||
return $null
|
||||
}
|
||||
}
|
34
functions/private/Invoke-WinUtilTaskbarAlignment.ps1
Normal file
@ -0,0 +1,34 @@
|
||||
function Invoke-WinUtilTaskbarAlignment {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Switches between Center & Left Taskbar Alignment
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to make Taskbar Alignment Center or Left
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
Try{
|
||||
if ($Enabled -eq $false){
|
||||
Write-Host "Making Taskbar Alignment to the Center"
|
||||
$value = 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Making Taskbar Alignment to the Left"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name "TaskbarAl" -Value $value
|
||||
}
|
||||
Catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $value due to a Security Exception"
|
||||
}
|
||||
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
}
|
||||
Catch{
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -24,6 +24,9 @@ function Show-CustomDialog {
|
||||
.PARAMETER IconSize
|
||||
The Size to use for Icon inside the custom dialog window.
|
||||
|
||||
.PARAMETER EnableScroll
|
||||
A flag indicating whether to enable scrolling if the content exceeds the window size.
|
||||
|
||||
.EXAMPLE
|
||||
Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200
|
||||
|
||||
@ -34,7 +37,8 @@ function Show-CustomDialog {
|
||||
[int]$Height = 200,
|
||||
[int]$FontSize = 10,
|
||||
[int]$HeaderFontSize = 14,
|
||||
[int]$IconSize = 25
|
||||
[int]$IconSize = 25,
|
||||
[bool]$EnableScroll = $false
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
@ -246,11 +250,18 @@ $cttLogoPath = @"
|
||||
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($Message)))
|
||||
}
|
||||
|
||||
|
||||
# Add the TextBlock to the Grid
|
||||
$grid.Children.Add($messageTextBlock)
|
||||
[Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index)
|
||||
|
||||
# Create a ScrollViewer if EnableScroll is true
|
||||
if ($EnableScroll) {
|
||||
$scrollViewer = New-Object System.Windows.Controls.ScrollViewer
|
||||
$scrollViewer.VerticalScrollBarVisibility = 'Auto'
|
||||
$scrollViewer.HorizontalScrollBarVisibility = 'Disabled'
|
||||
$scrollViewer.Content = $messageTextBlock
|
||||
$grid.Children.Add($scrollViewer)
|
||||
[Windows.Controls.Grid]::SetRow($scrollViewer, 1) # Set the row to the second row (0-based index)
|
||||
} else {
|
||||
$grid.Children.Add($messageTextBlock)
|
||||
[Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index)
|
||||
}
|
||||
|
||||
# Add OK button
|
||||
$okButton = New-Object Windows.Controls.Button
|
||||
|
@ -311,6 +311,19 @@ public class PowerManagement {
|
||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "Pinned" /f >$null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "LayoutCycle" /f >$null 2>&1
|
||||
Write-Host "Edge icon removed from taskbar"
|
||||
if (Test-Path "HKLM:\zSOFTWARE\WOW6432Node")
|
||||
{
|
||||
# Remove leftovers of 64-bit installations
|
||||
# ---
|
||||
# Remove registry values first...
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /va /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /va /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /va /f > $null 2>&1
|
||||
# ...then the registry keys
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f > $null 2>&1
|
||||
}
|
||||
}
|
||||
|
||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
|
||||
|
@ -17,14 +17,20 @@ function Invoke-WPFShortcut {
|
||||
[bool]$RunAsAdmin = $false
|
||||
)
|
||||
|
||||
# Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon.
|
||||
# add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon.
|
||||
$iconPath = $null
|
||||
Switch ($ShortcutToAdd) {
|
||||
"WinUtil" {
|
||||
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
|
||||
$IRM = 'irm https://christitus.com/win | iex'
|
||||
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
||||
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
||||
# Use Powershell 7 if installed and fallback to PS5 if not
|
||||
if (Get-Command "pwsh" -ErrorAction SilentlyContinue){
|
||||
$shell = "pwsh.exe"
|
||||
}
|
||||
else{
|
||||
$shell = "powershell.exe"
|
||||
}
|
||||
|
||||
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
|
||||
|
||||
$DestinationName = "WinUtil.lnk"
|
||||
|
||||
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png"
|
||||
@ -52,9 +58,9 @@ function Invoke-WPFShortcut {
|
||||
# Prepare the Shortcut paramter
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
||||
$Shortcut.TargetPath = $SourceExe
|
||||
$Shortcut.Arguments = $ArgumentsToSourceExe
|
||||
if ($iconPath -ne $null) {
|
||||
$Shortcut.TargetPath = $shell
|
||||
$Shortcut.Arguments = $shellArgs
|
||||
if ($null -ne $iconPath) {
|
||||
$shortcut.IconLocation = $iconPath
|
||||
}
|
||||
|
||||
|
@ -30,5 +30,7 @@ function Invoke-WPFToggle {
|
||||
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
||||
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)}
|
||||
"WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)}
|
||||
"WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $(Get-WinUtilToggleStatus WPFToggleHiddenFiles)}
|
||||
"WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $(Get-WinUtilToggleStatus WPFToggleTaskbarAlignment)}
|
||||
}
|
||||
}
|
||||
|
@ -25,22 +25,29 @@ function Invoke-WPFTweakPS7{
|
||||
$targetTerminalName = "Windows PowerShell"
|
||||
}
|
||||
}
|
||||
|
||||
# Check if the Windows Terminal is installed and return if not (Prerequisite for the following code)
|
||||
if (-not (Get-Command "wt" -ErrorAction SilentlyContinue)){
|
||||
Write-Host "Windows Terminal not installed. Skipping Terminal preference"
|
||||
return
|
||||
}
|
||||
# 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"
|
||||
if (Test-Path -Path $settingsPath) {
|
||||
Write-Host "Settings file found."
|
||||
$settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json
|
||||
$ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName }
|
||||
if ($ps7Profile) {
|
||||
$settingsContent.defaultProfile = $ps7Profile.guid
|
||||
$updatedSettings = $settingsContent | ConvertTo-Json -Depth 100
|
||||
Set-Content -Path $settingsPath -Value $updatedSettings
|
||||
Write-Host "Default profile updated to $targetTerminalName using the name attribute."
|
||||
} else {
|
||||
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
|
||||
}
|
||||
if (-not (Test-Path -Path $settingsPath)){
|
||||
Write-Host "Windows Terminal Settings file not found at $settingsPath"
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Settings file found."
|
||||
$settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json
|
||||
$ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName }
|
||||
if ($ps7Profile) {
|
||||
$settingsContent.defaultProfile = $ps7Profile.guid
|
||||
$updatedSettings = $settingsContent | ConvertTo-Json -Depth 100
|
||||
Set-Content -Path $settingsPath -Value $updatedSettings
|
||||
Write-Host "Default profile updated to " -NoNewline
|
||||
Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline
|
||||
Write-Host "using the name attribute."
|
||||
} else {
|
||||
Write-Host "Settings file not found at $settingsPath"
|
||||
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ Function Invoke-WPFUltimatePerformance {
|
||||
if ($ultimatePlan) {
|
||||
# Extract the GUID of the Ultimate Performance plan
|
||||
$ultimatePlanGUID = $ultimatePlan.Line.Split()[3]
|
||||
|
||||
|
||||
# Set a different power plan as active before deleting the Ultimate Performance plan
|
||||
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
|
||||
powercfg -setactive $balancedPlanGUID
|
||||
|
44
mkdocs.yml
Normal file
@ -0,0 +1,44 @@
|
||||
site_name: Chris Titus WinUtil Official Documentation
|
||||
repo_url: https://github.com/ChrisTitusTech/winutil
|
||||
|
||||
nav:
|
||||
- Introduction: 'index.md'
|
||||
- User Guide: 'userguide.md'
|
||||
- Contribute: 'contribute.md'
|
||||
- Updates: 'updates.md'
|
||||
- Known Issues: 'KnownIssues.md'
|
||||
- FAQ: 'faq.md'
|
||||
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: 'overrides'
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
||||
- toc.integrate
|
||||
- navigation.top
|
||||
- search.suggest
|
||||
- search.highlight
|
||||
- content.tabs.link
|
||||
- content.code.annotation
|
||||
- content.code.copy
|
||||
language: en
|
||||
logo: assets/favicon.png
|
||||
favicon: assets/favicon.png
|
||||
palette:
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
toggle:
|
||||
icon: material/toggle-switch-off-outline
|
||||
name: Switch to dark mode
|
||||
primary: black
|
||||
accent: purple
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
toggle:
|
||||
icon: material/toggle-switch
|
||||
name: Switch to light mode
|
||||
primary: teal
|
||||
accent: lime
|
||||
markdown_extensions:
|
||||
- admonition
|
12
overrides/main.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
{{ super() }}
|
||||
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
|
||||
<strong>Announcement:</strong> This documentation is still in progress.
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{# Empty block to override the footer #}
|
||||
{% endblock %}
|
@ -505,5 +505,32 @@ Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sy
|
||||
$Height = $sync.configs.themes.$ctttheme.CustomDialogHeight
|
||||
Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize
|
||||
})
|
||||
|
||||
$sync["SponsorMenuItem"].Add_Click({
|
||||
# Handle Export menu item click
|
||||
Write-Debug "Sponsors clicked"
|
||||
$sync["SettingsPopup"].IsOpen = $false
|
||||
$authorInfo = @"
|
||||
<a href="https://github.com/sponsors/ChrisTitusTech">Current sponsors for ChrisTitusTech:</a>
|
||||
"@
|
||||
$authorInfo += "`n"
|
||||
try {
|
||||
# Call the function to get the sponsors
|
||||
$sponsors = Invoke-WinUtilSponsors
|
||||
|
||||
# Append the sponsors to the authorInfo
|
||||
$sponsors | ForEach-Object { $authorInfo += "$_`n" }
|
||||
}
|
||||
catch {
|
||||
$authorInfo += "An error occurred while fetching or processing the sponsors: $_`n"
|
||||
}
|
||||
|
||||
$FontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSize
|
||||
$HeaderFontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSizeHeader
|
||||
$IconSize = $sync.configs.themes.$ctttheme.CustomDialogIconSize
|
||||
$Width = $sync.configs.themes.$ctttheme.CustomDialogWidth
|
||||
$Height = $sync.configs.themes.$ctttheme.CustomDialogHeight
|
||||
Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize -EnableScroll $true
|
||||
})
|
||||
$sync["Form"].ShowDialog() | out-null
|
||||
Stop-Transcript
|
||||
|
@ -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.
|
@ -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.
|
477
winutil.ps1
@ -8,7 +8,7 @@
|
||||
Author : Chris Titus @christitustech
|
||||
Runspace Author: @DeveloperDurp
|
||||
GitHub : https://github.com/ChrisTitusTech
|
||||
Version : 24.07.08
|
||||
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.08"
|
||||
$sync.version = "24.07.17"
|
||||
$sync.configs = @{}
|
||||
$sync.ProcessRunning = $false
|
||||
|
||||
@ -715,14 +715,34 @@ Function Get-WinUtilToggleStatus {
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($ToggleSwitch -eq "WPFToggleHiddenFiles") {
|
||||
$HiddenFiles = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').Hidden
|
||||
if($HiddenFiles -eq 0){
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
||||
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
||||
if($TaskbarWidgets -eq 0) {
|
||||
if($TaskbarWidgets -eq 0) {
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($ToggleSwitch -eq "WPFToggleTaskbarAlignment") {
|
||||
$TaskbarAlignment = (Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskbarAl
|
||||
if($TaskbarAlignment -eq 0) {
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
}
|
||||
function Get-WinUtilVariables {
|
||||
@ -953,7 +973,7 @@ function Install-WinUtilProgramChoco {
|
||||
|
||||
# Cleanup leftovers files
|
||||
if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $installOutputFilePath }
|
||||
if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath }
|
||||
if(Test-Path -Path $uninstallOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath }
|
||||
|
||||
return;
|
||||
}
|
||||
@ -981,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.
|
||||
@ -1000,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
|
||||
}
|
||||
@ -1028,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
|
||||
}
|
||||
@ -1041,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."
|
||||
@ -1056,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;
|
||||
@ -2029,6 +2046,40 @@ function Invoke-WinUtilGPU {
|
||||
}
|
||||
return $true
|
||||
}
|
||||
function Invoke-WinUtilHiddenFiles {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Hidden Files
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Hidden Files
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
Try{
|
||||
if ($Enabled -eq $false){
|
||||
Write-Host "Enabling Hidden Files"
|
||||
$value = 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Disabling Hidden Files"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name Hidden -Value $value
|
||||
}
|
||||
Catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
}
|
||||
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
}
|
||||
Catch{
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
Function Invoke-WinUtilMouseAcceleration {
|
||||
<#
|
||||
|
||||
@ -2282,6 +2333,51 @@ function Invoke-WinUtilSnapWindow {
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
Function Invoke-WinUtilSponsors {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists Sponsors from ChrisTitusTech
|
||||
.DESCRIPTION
|
||||
Lists Sponsors from ChrisTitusTech
|
||||
.EXAMPLE
|
||||
Invoke-WinUtilSponsors
|
||||
.NOTES
|
||||
This function is used to list sponsors from ChrisTitusTech
|
||||
#>
|
||||
try {
|
||||
# Define the URL and headers
|
||||
$url = "https://github.com/sponsors/ChrisTitusTech"
|
||||
$headers = @{
|
||||
"User-Agent" = "Chrome/58.0.3029.110"
|
||||
}
|
||||
|
||||
# Fetch the webpage content
|
||||
try {
|
||||
$html = Invoke-RestMethod -Uri $url -Headers $headers
|
||||
} catch {
|
||||
Write-Output $_.Exception.Message
|
||||
exit
|
||||
}
|
||||
|
||||
# Use regex to extract the content between "Current sponsors" and "Past sponsors"
|
||||
$currentSponsorsPattern = '(?s)(?<=Current sponsors).*?(?=Past sponsors)'
|
||||
$currentSponsorsHtml = [regex]::Match($html, $currentSponsorsPattern).Value
|
||||
|
||||
# Use regex to extract the sponsor usernames from the alt attributes in the "Current Sponsors" section
|
||||
$sponsorPattern = '(?<=alt="@)[^"]+'
|
||||
$sponsors = [regex]::Matches($currentSponsorsHtml, $sponsorPattern) | ForEach-Object { $_.Value }
|
||||
|
||||
# Exclude "ChrisTitusTech" from the sponsors
|
||||
$sponsors = $sponsors | Where-Object { $_ -ne "ChrisTitusTech" }
|
||||
|
||||
# Return the sponsors
|
||||
return $sponsors
|
||||
}
|
||||
catch {
|
||||
Write-Error "An error occurred while fetching or processing the sponsors: $_"
|
||||
return $null
|
||||
}
|
||||
}
|
||||
Function Invoke-WinUtilStickyKeys {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
@ -2313,6 +2409,40 @@ Function Invoke-WinUtilStickyKeys {
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
function Invoke-WinUtilTaskbarAlignment {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Switches between Center & Left Taskbar Alignment
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to make Taskbar Alignment Center or Left
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
Try{
|
||||
if ($Enabled -eq $false){
|
||||
Write-Host "Making Taskbar Alignment to the Center"
|
||||
$value = 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Making Taskbar Alignment to the Left"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name "TaskbarAl" -Value $value
|
||||
}
|
||||
Catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $value due to a Security Exception"
|
||||
}
|
||||
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
}
|
||||
Catch{
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
||||
function Invoke-WinUtilTaskbarSearch {
|
||||
<#
|
||||
|
||||
@ -2828,6 +2958,9 @@ function Show-CustomDialog {
|
||||
.PARAMETER IconSize
|
||||
The Size to use for Icon inside the custom dialog window.
|
||||
|
||||
.PARAMETER EnableScroll
|
||||
A flag indicating whether to enable scrolling if the content exceeds the window size.
|
||||
|
||||
.EXAMPLE
|
||||
Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200
|
||||
|
||||
@ -2838,7 +2971,8 @@ function Show-CustomDialog {
|
||||
[int]$Height = 200,
|
||||
[int]$FontSize = 10,
|
||||
[int]$HeaderFontSize = 14,
|
||||
[int]$IconSize = 25
|
||||
[int]$IconSize = 25,
|
||||
[bool]$EnableScroll = $false
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
@ -3050,11 +3184,18 @@ $cttLogoPath = @"
|
||||
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($Message)))
|
||||
}
|
||||
|
||||
|
||||
# Add the TextBlock to the Grid
|
||||
$grid.Children.Add($messageTextBlock)
|
||||
[Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index)
|
||||
|
||||
# Create a ScrollViewer if EnableScroll is true
|
||||
if ($EnableScroll) {
|
||||
$scrollViewer = New-Object System.Windows.Controls.ScrollViewer
|
||||
$scrollViewer.VerticalScrollBarVisibility = 'Auto'
|
||||
$scrollViewer.HorizontalScrollBarVisibility = 'Disabled'
|
||||
$scrollViewer.Content = $messageTextBlock
|
||||
$grid.Children.Add($scrollViewer)
|
||||
[Windows.Controls.Grid]::SetRow($scrollViewer, 1) # Set the row to the second row (0-based index)
|
||||
} else {
|
||||
$grid.Children.Add($messageTextBlock)
|
||||
[Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index)
|
||||
}
|
||||
|
||||
# Add OK button
|
||||
$okButton = New-Object Windows.Controls.Button
|
||||
@ -4479,6 +4620,19 @@ public class PowerManagement {
|
||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "Pinned" /f >$null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "LayoutCycle" /f >$null 2>&1
|
||||
Write-Host "Edge icon removed from taskbar"
|
||||
if (Test-Path "HKLM:\zSOFTWARE\WOW6432Node")
|
||||
{
|
||||
# Remove leftovers of 64-bit installations
|
||||
# ---
|
||||
# Remove registry values first...
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /va /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /va /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /va /f > $null 2>&1
|
||||
# ...then the registry keys
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f > $null 2>&1
|
||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f > $null 2>&1
|
||||
}
|
||||
}
|
||||
|
||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
|
||||
@ -4869,14 +5023,20 @@ function Invoke-WPFShortcut {
|
||||
[bool]$RunAsAdmin = $false
|
||||
)
|
||||
|
||||
# Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon.
|
||||
# add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon.
|
||||
$iconPath = $null
|
||||
Switch ($ShortcutToAdd) {
|
||||
"WinUtil" {
|
||||
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
|
||||
$IRM = 'irm https://christitus.com/win | iex'
|
||||
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
||||
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
||||
# Use Powershell 7 if installed and fallback to PS5 if not
|
||||
if (Get-Command "pwsh" -ErrorAction SilentlyContinue){
|
||||
$shell = "pwsh.exe"
|
||||
}
|
||||
else{
|
||||
$shell = "powershell.exe"
|
||||
}
|
||||
|
||||
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
|
||||
|
||||
$DestinationName = "WinUtil.lnk"
|
||||
|
||||
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png"
|
||||
@ -4904,9 +5064,9 @@ function Invoke-WPFShortcut {
|
||||
# Prepare the Shortcut paramter
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
||||
$Shortcut.TargetPath = $SourceExe
|
||||
$Shortcut.Arguments = $ArgumentsToSourceExe
|
||||
if ($iconPath -ne $null) {
|
||||
$Shortcut.TargetPath = $shell
|
||||
$Shortcut.Arguments = $shellArgs
|
||||
if ($null -ne $iconPath) {
|
||||
$shortcut.IconLocation = $iconPath
|
||||
}
|
||||
|
||||
@ -4985,6 +5145,8 @@ function Invoke-WPFToggle {
|
||||
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
||||
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)}
|
||||
"WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)}
|
||||
"WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $(Get-WinUtilToggleStatus WPFToggleHiddenFiles)}
|
||||
"WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $(Get-WinUtilToggleStatus WPFToggleTaskbarAlignment)}
|
||||
}
|
||||
}
|
||||
function Invoke-WPFTweakPS7{
|
||||
@ -5014,25 +5176,32 @@ function Invoke-WPFTweakPS7{
|
||||
$targetTerminalName = "Windows PowerShell"
|
||||
}
|
||||
}
|
||||
|
||||
# Check if the Windows Terminal is installed and return if not (Prerequisite for the following code)
|
||||
if (-not (Get-Command "wt" -ErrorAction SilentlyContinue)){
|
||||
Write-Host "Windows Terminal not installed. Skipping Terminal preference"
|
||||
return
|
||||
}
|
||||
# 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"
|
||||
if (Test-Path -Path $settingsPath) {
|
||||
Write-Host "Settings file found."
|
||||
$settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json
|
||||
$ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName }
|
||||
if ($ps7Profile) {
|
||||
$settingsContent.defaultProfile = $ps7Profile.guid
|
||||
$updatedSettings = $settingsContent | ConvertTo-Json -Depth 100
|
||||
Set-Content -Path $settingsPath -Value $updatedSettings
|
||||
Write-Host "Default profile updated to $targetTerminalName using the name attribute."
|
||||
} else {
|
||||
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
|
||||
}
|
||||
if (-not (Test-Path -Path $settingsPath)){
|
||||
Write-Host "Windows Terminal Settings file not found at $settingsPath"
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Settings file found."
|
||||
$settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json
|
||||
$ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName }
|
||||
if ($ps7Profile) {
|
||||
$settingsContent.defaultProfile = $ps7Profile.guid
|
||||
$updatedSettings = $settingsContent | ConvertTo-Json -Depth 100
|
||||
Set-Content -Path $settingsPath -Value $updatedSettings
|
||||
Write-Host "Default profile updated to " -NoNewline
|
||||
Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline
|
||||
Write-Host "using the name attribute."
|
||||
} else {
|
||||
Write-Host "Settings file not found at $settingsPath"
|
||||
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-WPFtweaksbutton {
|
||||
<#
|
||||
|
||||
@ -5120,7 +5289,7 @@ Function Invoke-WPFUltimatePerformance {
|
||||
if ($ultimatePlan) {
|
||||
# Extract the GUID of the Ultimate Performance plan
|
||||
$ultimatePlanGUID = $ultimatePlan.Line.Split()[3]
|
||||
|
||||
|
||||
# Set a different power plan as active before deleting the Ultimate Performance plan
|
||||
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
|
||||
powercfg -setactive $balancedPlanGUID
|
||||
@ -8185,6 +8354,14 @@ $sync.configs.applications = '{
|
||||
"link": "https://zoom.us/",
|
||||
"winget": "Zoom.Zoom"
|
||||
},
|
||||
"WPFInstallzoomit": {
|
||||
"category": "Utilities",
|
||||
"choco": "na",
|
||||
"content": "ZoomIt",
|
||||
"description": "A screen zoom, annotation, and recording tool for technical presentations and demos",
|
||||
"link": "https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit",
|
||||
"winget": "Microsoft.Sysinternals.ZoomIt"
|
||||
},
|
||||
"WPFInstallzotero": {
|
||||
"category": "Document",
|
||||
"choco": "zotero",
|
||||
@ -8425,6 +8602,14 @@ $sync.configs.applications = '{
|
||||
"link": "https://github.com/xM4ddy/OFGB",
|
||||
"winget": "xM4ddy.OFGB"
|
||||
},
|
||||
"WPFInstallPaleMoon": {
|
||||
"category": "Browsers",
|
||||
"choco": "paleMoon",
|
||||
"content": "PaleMoon",
|
||||
"description": "Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use.",
|
||||
"link": "https://www.palemoon.org/download.shtml",
|
||||
"winget": "MoonchildProductions.PaleMoon"
|
||||
},
|
||||
"WPFInstallShotcut": {
|
||||
"category": "Multimedia Tools",
|
||||
"choco": "na",
|
||||
@ -8432,6 +8617,46 @@ $sync.configs.applications = '{
|
||||
"description": "Shotcut is a free, open source, cross-platform video editor.",
|
||||
"link": "https://shotcut.org/",
|
||||
"winget": "Meltytech.Shotcut"
|
||||
},
|
||||
"WPFInstallLenovoLegionToolkit": {
|
||||
"category": "Utilities",
|
||||
"choco": "na",
|
||||
"content": "Lenovo Legion Toolkit",
|
||||
"description": "Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion (and similar) series laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only.",
|
||||
"link": "https://github.com/BartoszCichecki/LenovoLegionToolkit",
|
||||
"winget": "BartoszCichecki.LenovoLegionToolkit"
|
||||
},
|
||||
"WPFInstallPulsarEdit": {
|
||||
"category": "Development",
|
||||
"choco": "pulsar",
|
||||
"content": "Pulsar",
|
||||
"description": "A Community-led Hyper-Hackable Text Editor",
|
||||
"link": "https://pulsar-edit.dev/",
|
||||
"winget": "Pulsar-Edit.Pulsar"
|
||||
},
|
||||
"WPFInstallAegisub": {
|
||||
"category": "Development",
|
||||
"choco": "aegisub",
|
||||
"content": "Aegisub",
|
||||
"description": "Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.",
|
||||
"link": "https://github.com/Aegisub/Aegisub",
|
||||
"winget": "Aegisub.Aegisub"
|
||||
},
|
||||
"WPFInstallSubtitleEdit": {
|
||||
"category": "Multimedia Tools",
|
||||
"choco": "na",
|
||||
"content": "Subtitle Edit",
|
||||
"description": "Subtitle Edit is a free and open source editor for video subtitles.",
|
||||
"link": "https://github.com/SubtitleEdit/subtitleedit",
|
||||
"winget": "Nikse.SubtitleEdit"
|
||||
},
|
||||
"WPFInstallFork": {
|
||||
"category": "Development",
|
||||
"choco": "git-fork",
|
||||
"content": "Fork",
|
||||
"description": "Fork - a fast and friendly git client.",
|
||||
"link": "https://git-fork.com/",
|
||||
"winget": "Fork.Fork"
|
||||
}
|
||||
}' | convertfrom-json
|
||||
$sync.configs.dns = '{
|
||||
@ -11263,19 +11488,35 @@ $sync.configs.tweaks = '{
|
||||
"panel": "1",
|
||||
"Order": "a006_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"1\"
|
||||
"
|
||||
"$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\"
|
||||
$name = \"TaskbarEndTask\"
|
||||
$value = 1
|
||||
|
||||
# Ensure the registry key exists
|
||||
if (-not (Test-Path $path)) {
|
||||
New-Item -Path $path -Force | Out-Null
|
||||
}
|
||||
|
||||
# Set the property, creating it if it doesn''t exist
|
||||
New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"0\"
|
||||
"
|
||||
"$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\"
|
||||
$name = \"TaskbarEndTask\"
|
||||
$value = 0
|
||||
|
||||
# Ensure the registry key exists
|
||||
if (-not (Test-Path $path)) {
|
||||
New-Item -Path $path -Force | Out-Null
|
||||
}
|
||||
|
||||
# Set the property, creating it if it doesn''t exist
|
||||
New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null"
|
||||
]
|
||||
},
|
||||
"WPFTweaksPowershell7": {
|
||||
"Content": "Replace Default Powershell 5 to Powershell 7",
|
||||
"Description": "This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary",
|
||||
"Content": "Change Windows Terminal default: PowerShell 5 -> PowerShell 7",
|
||||
"Description": "This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a009_",
|
||||
@ -12035,12 +12276,20 @@ $sync.configs.tweaks = '{
|
||||
"Order": "a108_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleHiddenFiles": {
|
||||
"Content": "Show Hidden Files",
|
||||
"Description": "If Enabled then Hidden Files will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a200_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleShowExt": {
|
||||
"Content": "Show File Extensions",
|
||||
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a200_",
|
||||
"Order": "a201_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarSearch": {
|
||||
@ -12048,7 +12297,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a201_",
|
||||
"Order": "a202_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskView": {
|
||||
@ -12056,7 +12305,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a202_",
|
||||
"Order": "a203_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
@ -12064,7 +12313,15 @@ $sync.configs.tweaks = '{
|
||||
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a203_",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarAlignment": {
|
||||
"Content": "Switch Taskbar Items between Center & Left",
|
||||
"Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
@ -12820,6 +13077,7 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<Separator/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
@ -12913,6 +13171,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallmullvadbrowser" Content="Mullvad Browser" ToolTip="Mullvad Browser is a privacy-focused web browser, developed in partnership with the Tor Project." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallmullvadbrowserLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://mullvad.net/browser"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallPaleMoon" Content="PaleMoon" ToolTip="Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallPaleMoonLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.palemoon.org/download.shtml"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallthorium" Content="Thorium Browser AVX2" ToolTip="Browser built for speed over vanilla chromium. It is built with AVX2 optimizations and is the fastest browser on the market." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallthoriumLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="http://thorium.rocks/"/>
|
||||
@ -13031,6 +13293,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
|
||||
<Label Name="WPFLabelDevelopment" Content="Development" FontSize="{FontSizeHeading}" FontFamily="{HeaderFontFamily}"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallAegisub" Content="Aegisub" ToolTip="Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallAegisubLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://github.com/Aegisub/Aegisub"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallanaconda3" Content="Anaconda" ToolTip="Anaconda is a distribution of the Python and R programming languages for scientific computing." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallanaconda3Link" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.anaconda.com/products/distribution"/>
|
||||
@ -13055,6 +13321,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallfnm" Content="Fast Node Manager" ToolTip="Fast Node Manager (fnm) allows you to switch your Node version by using the Terminal" Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallfnmLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://github.com/Schniz/fnm"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallFork" Content="Fork" ToolTip="Fork - a fast and friendly git client." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallForkLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://git-fork.com/"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallgit" Content="Git" ToolTip="Git is a distributed version control system widely used for tracking changes in source code during software development." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallgitLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://git-scm.com/"/>
|
||||
@ -13151,6 +13421,14 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallpostman" Content="Postman" ToolTip="Postman is a collaboration platform for API development that simplifies the process of developing APIs." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallpostmanLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.postman.com/"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallPulsarEdit" Content="Pulsar" ToolTip="A Community-led Hyper-Hackable Text Editor" Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallPulsarEditLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://pulsar-edit.dev/"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="1">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallpyenvwin" Content="Python Version Manager (pyenv-win)" ToolTip="pyenv for Windows is a simple python version management tool. It lets you easily switch between multiple versions of Python." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallpyenvwinLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://pyenv-win.github.io/pyenv-win/"/>
|
||||
@ -13159,10 +13437,6 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallpython3" Content="Python3" ToolTip="Python is a versatile programming language used for web development, data analysis, artificial intelligence, and more." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallpython3Link" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.python.org/"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="1">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallrustlang" Content="Rust" ToolTip="Rust is a programming language designed for safety and performance, particularly focused on systems programming." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallrustlangLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.rust-lang.org/"/>
|
||||
@ -13707,6 +13981,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallstremio" Content="Stremio" ToolTip="Stremio is a media center application that allows users to organize and stream their favorite movies, TV shows, and video content." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallstremioLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.stremio.com/"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallSubtitleEdit" Content="Subtitle Edit" ToolTip="Subtitle Edit is a free and open source editor for video subtitles." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallSubtitleEditLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://github.com/SubtitleEdit/subtitleedit"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstalltagscanner" Content="TagScanner (Tag Scanner)" ToolTip="TagScanner is a powerful tool for organizing and managing your music collection" Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstalltagscannerLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.xdlab.ru/en/"/>
|
||||
@ -13754,14 +14032,14 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallheidisql" Content="HeidiSQL" ToolTip="HeidiSQL is a powerful and easy-to-use client for MySQL, MariaDB, Microsoft SQL Server, and PostgreSQL databases. It provides tools for database management and development." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallheidisqlLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.heidisql.com/"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="3">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallmremoteng" Content="mRemoteNG" ToolTip="mRemoteNG is a free and open-source remote connections manager. It allows you to view and manage multiple remote sessions in a single interface." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallmremotengLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://mremoteng.org/"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="3">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallmullvadvpn" Content="Mullvad VPN" ToolTip="This is the VPN client software for the Mullvad VPN service." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallmullvadvpnLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://github.com/mullvad/mullvadvpn-app"/>
|
||||
@ -14045,14 +14323,14 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallkeepass" Content="KeePassXC" ToolTip="KeePassXC is a cross-platform, open-source password manager with strong encryption features." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallkeepassLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://keepassxc.org/"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallLenovoLegionToolkit" Content="Lenovo Legion Toolkit" ToolTip="Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion (and similar) series laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallLenovoLegionToolkitLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://github.com/BartoszCichecki/LenovoLegionToolkit"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstalllinkshellextension" Content="Link Shell extension" ToolTip="Link Shell Extension (LSE) provides for the creation of Hardlinks, Junctions, Volume Mountpoints, Symbolic Links, a folder cloning process that utilises Hardlinks or Symbolic Links and a copy process taking care of Junctions, Symbolic Links, and Hardlinks. LSE, as its name implies is implemented as a Shell extension and is accessed from Windows Explorer, or similar file/folder managers." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstalllinkshellextensionLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="4">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstalllivelywallpaper" Content="Lively Wallpaper" ToolTip="Free and open-source software that allows users to set animated desktop wallpapers and screensavers." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstalllivelywallpaperLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://www.rocksdanister.com/lively/"/>
|
||||
@ -14061,6 +14339,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstalllocalsend" Content="LocalSend" ToolTip="An open source cross-platform alternative to AirDrop." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstalllocalsendLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://localsend.org/"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="4">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstalllockhunter" Content="LockHunter" ToolTip="LockHunter is a free tool to delete files blocked by something you do not know." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstalllockhunterLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://lockhunter.com/"/>
|
||||
@ -14349,6 +14631,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFInstallzerotierone" Content="ZeroTier One" ToolTip="ZeroTier One is a software-defined networking tool that allows you to create secure and scalable networks." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallzerotieroneLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://zerotier.com/"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallzoomit" Content="ZoomIt" ToolTip="A screen zoom, annotation, and recording tool for technical presentations and demos" Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallzoomitLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Name="WPFInstallzoxide" Content="Zoxide" ToolTip="Zoxide is a fast and efficient directory changer (cd) that helps you navigate your file system with ease." Margin="0,0,2,0"/>
|
||||
<TextBlock Name="WPFInstallzoxideLink" Style="{StaticResource HoverTextBlockStyle}" Text="(?)" ToolTip="https://github.com/ajeetdsouza/zoxide"/>
|
||||
@ -14394,7 +14680,7 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFTweaksWifi" Content="Disable Wifi-Sense" Margin="5,0" ToolTip="Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location."/>
|
||||
<CheckBox Name="WPFTweaksEndTaskOnTaskbar" Content="Enable End Task With Right Click" Margin="5,0" ToolTip="Enables option to end task when right clicking a program in the taskbar"/>
|
||||
<CheckBox Name="WPFTweaksDiskCleanup" Content="Run Disk Cleanup" Margin="5,0" ToolTip="Runs Disk Cleanup on Drive C: and removes old Windows Updates."/>
|
||||
<CheckBox Name="WPFTweaksPowershell7" Content="Replace Default Powershell 5 to Powershell 7" Margin="5,0" ToolTip="This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary"/>
|
||||
<CheckBox Name="WPFTweaksPowershell7" Content="Change Windows Terminal default: PowerShell 5 -> PowerShell 7" Margin="5,0" ToolTip="This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary"/>
|
||||
<CheckBox Name="WPFTweaksPowershell7Tele" Content="Disable Powershell 7 Telemetry" Margin="5,0" ToolTip="This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data."/>
|
||||
<CheckBox Name="WPFTweaksLaptopHibernation" Content="Set Hibernation as default (good for laptops)" Margin="5,0" ToolTip="Most modern laptops have connected stadby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399"/>
|
||||
<CheckBox Name="WPFTweaksServices" Content="Set Services to Manual" Margin="5,0" ToolTip="Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand."/>
|
||||
@ -14474,6 +14760,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFToggleStickyKeys" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="4,0" HorizontalAlignment="Right" FontSize="{FontSize}"/>
|
||||
<Label Content="Enable Sticky Keys" ToolTip="If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury." HorizontalAlignment="Left" FontSize="{FontSize}"/>
|
||||
</DockPanel>
|
||||
<DockPanel LastChildFill="True">
|
||||
<CheckBox Name="WPFToggleHiddenFiles" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="4,0" HorizontalAlignment="Right" FontSize="{FontSize}"/>
|
||||
<Label Content="Show Hidden Files" ToolTip="If Enabled then Hidden Files will be shown." HorizontalAlignment="Left" FontSize="{FontSize}"/>
|
||||
</DockPanel>
|
||||
<DockPanel LastChildFill="True">
|
||||
<CheckBox Name="WPFToggleShowExt" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="4,0" HorizontalAlignment="Right" FontSize="{FontSize}"/>
|
||||
<Label Content="Show File Extensions" ToolTip="If enabled then File extensions (e.g., .txt, .jpg) are visible." HorizontalAlignment="Left" FontSize="{FontSize}"/>
|
||||
@ -14486,6 +14776,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFToggleTaskView" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="4,0" HorizontalAlignment="Right" FontSize="{FontSize}"/>
|
||||
<Label Content="Show Task View Button in Taskbar" ToolTip="If Enabled then Task View Button in Taskbar will be shown." HorizontalAlignment="Left" FontSize="{FontSize}"/>
|
||||
</DockPanel>
|
||||
<DockPanel LastChildFill="True">
|
||||
<CheckBox Name="WPFToggleTaskbarAlignment" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="4,0" HorizontalAlignment="Right" FontSize="{FontSize}"/>
|
||||
<Label Content="Switch Taskbar Items between Center & Left" ToolTip="[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left." HorizontalAlignment="Left" FontSize="{FontSize}"/>
|
||||
</DockPanel>
|
||||
<DockPanel LastChildFill="True">
|
||||
<CheckBox Name="WPFToggleTaskbarWidgets" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="4,0" HorizontalAlignment="Right" FontSize="{FontSize}"/>
|
||||
<Label Content="Show Widgets Button in Taskbar" ToolTip="If Enabled then Widgets Button in Taskbar will be shown." HorizontalAlignment="Left" FontSize="{FontSize}"/>
|
||||
@ -15296,5 +15590,32 @@ Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sy
|
||||
$Height = $sync.configs.themes.$ctttheme.CustomDialogHeight
|
||||
Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize
|
||||
})
|
||||
|
||||
$sync["SponsorMenuItem"].Add_Click({
|
||||
# Handle Export menu item click
|
||||
Write-Debug "Sponsors clicked"
|
||||
$sync["SettingsPopup"].IsOpen = $false
|
||||
$authorInfo = @"
|
||||
<a href="https://github.com/sponsors/ChrisTitusTech">Current sponsors for ChrisTitusTech:</a>
|
||||
"@
|
||||
$authorInfo += "`n"
|
||||
try {
|
||||
# Call the function to get the sponsors
|
||||
$sponsors = Invoke-WinUtilSponsors
|
||||
|
||||
# Append the sponsors to the authorInfo
|
||||
$sponsors | ForEach-Object { $authorInfo += "$_`n" }
|
||||
}
|
||||
catch {
|
||||
$authorInfo += "An error occurred while fetching or processing the sponsors: $_`n"
|
||||
}
|
||||
|
||||
$FontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSize
|
||||
$HeaderFontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSizeHeader
|
||||
$IconSize = $sync.configs.themes.$ctttheme.CustomDialogIconSize
|
||||
$Width = $sync.configs.themes.$ctttheme.CustomDialogWidth
|
||||
$Height = $sync.configs.themes.$ctttheme.CustomDialogHeight
|
||||
Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize -EnableScroll $true
|
||||
})
|
||||
$sync["Form"].ShowDialog() | out-null
|
||||
Stop-Transcript
|
||||
|
@ -697,6 +697,7 @@
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<Separator/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
|