Compare commits
241 Commits
49016c0cf8
...
24.07.18
Author | SHA1 | Date | |
---|---|---|---|
e82870da89 | |||
e784604a1a | |||
e8022b8556 | |||
e7ed7829cf | |||
508f909fc9 | |||
60a6c387e2 | |||
1307abc1d6 | |||
45a103f76b | |||
b84c0d9248 | |||
f51c30023a | |||
bce4868896 | |||
8141baa879 | |||
280f8a7dbc | |||
0a472c06c4 | |||
1c72007a29 | |||
07434f706b | |||
4176435ebf | |||
a38cfb14d3 | |||
b319c32ae6 | |||
829e46b3a8 | |||
2304b06f68 | |||
c90363181c | |||
5d3d47eeb5 | |||
bc213d34d9 | |||
df2cd71d1e | |||
a760400aeb | |||
07a78fc3d8 | |||
78a6a60d96 | |||
1fb986a05d | |||
51e5af41ed | |||
7dba867101 | |||
ce787a9074 | |||
425ec42cb5 | |||
b2cd7d7897 | |||
ad9cc6fffd | |||
594ee94f49 | |||
30bea93dde | |||
2e26ae7ef1 | |||
0138a76601 | |||
8340aca48f | |||
265f4eb705 | |||
40cf1f80ef | |||
e182d2433f | |||
4831828b27 | |||
c9934a53b0 | |||
904e0ad468 | |||
792a5c4b38 | |||
ff0b3d29cf | |||
ac9b4fd645 | |||
84ca02a033 | |||
8cfd47e1b7 | |||
8df9a7c590 | |||
1d01b7490f | |||
3245756935 | |||
54ad3198dd | |||
7904380c8b | |||
81e8ca7fdc | |||
86cf331e01 | |||
150a99026f | |||
272a993099 | |||
d4faee5fbc | |||
e5ba389606 | |||
af36d76e65 | |||
5b7f0a0edf | |||
7294064aaa | |||
1e7b73df33 | |||
c68b8d0f75 | |||
2c1031865f | |||
b1e995fcaf | |||
e798ec9126 | |||
c4daafbe79 | |||
1f0ee72834 | |||
950bd59e2f | |||
05267d8a37 | |||
37089aeb5c | |||
bdb60b0b44 | |||
84242db2db | |||
2844b0df54 | |||
b2e3487989 | |||
01837b028a | |||
af1743066f | |||
d261f42ae4 | |||
02f335f4f3 | |||
3cb9a4f0ea | |||
d5c68029fe | |||
5375675347 | |||
8ed7732cbf | |||
fb932d7e10 | |||
78f2aa5979 | |||
5176e3d4ff | |||
b4aff6f7d3 | |||
ae240af11f | |||
cedc752be5 | |||
a1f534e6b5 | |||
cb1aed3bdd | |||
9e155c94d0 | |||
700a785092 | |||
80c7f6045f | |||
3466ea222d | |||
448d27f064 | |||
90f9c16446 | |||
0a821f6e21 | |||
aaaf5f7f85 | |||
d7c2e2cf2a | |||
9f3ad1b998 | |||
88612b4225 | |||
5c14d44afa | |||
d62d41347a | |||
6aaeb09e73 | |||
96d80c486b | |||
47dbbfb4ff | |||
ce7d14b227 | |||
79afb8c1bd | |||
65f76c2a77 | |||
cf9cb52cdb | |||
7dcd0ed67e | |||
49b7224a6f | |||
f04c87f5a3 | |||
d732c40b9a | |||
8984c177a0 | |||
747b1d76fd | |||
1b1ac22251 | |||
bcc8ad8171 | |||
6b73f71876 | |||
b47036630c | |||
e5ca44a0bd | |||
e7d49fe48b | |||
a5fbff142b | |||
e830894819 | |||
d4dc9aec9b | |||
e4d0e16b26 | |||
d6102e8954 | |||
227cb21c24 | |||
1891ea7966 | |||
6c49a8f2c9 | |||
ab384029f1 | |||
0c32d016b4 | |||
45818fd80c | |||
d08954945c | |||
a7ab24e3c9 | |||
a924d91d65 | |||
676e46f59f | |||
37b9c552df | |||
2e12176b2d | |||
7d1e4a8d82 | |||
4f8e7a8ea7 | |||
6c4c24b26d | |||
d205e75030 | |||
12561aba2c | |||
84fd1bc71c | |||
b9cd563915 | |||
58df438b92 | |||
9086b30a75 | |||
b268f98b91 | |||
25a4ebe062 | |||
60f5ef1f8e | |||
491b0b534c | |||
a59a30f905 | |||
227babe0e8 | |||
a0c4b33483 | |||
b831901967 | |||
d0427403f1 | |||
312f42f39a | |||
f68c9bf213 | |||
7b6a624ec6 | |||
43304808a9 | |||
ad0ed09940 | |||
b9813f86b9 | |||
2c5707e18f | |||
b646b139b8 | |||
5b369250b6 | |||
9274c683a2 | |||
f559de3a8c | |||
1e71020757 | |||
83ef15ccaf | |||
c2938f9339 | |||
b2be290be2 | |||
b6723bebf0 | |||
42c1ef434c | |||
a6ad919f16 | |||
52fd667ef9 | |||
04130231ff | |||
a510b52acb | |||
48581d6aad | |||
c3a77e71ad | |||
3d7b232248 | |||
b6d1dc50cb | |||
f6af93afbd | |||
0c841f98e8 | |||
e4c44e4878 | |||
8a78c960ea | |||
cb3b64e195 | |||
83f93ceba4 | |||
9ac93fd2dc | |||
13712b4c77 | |||
8d65f3bcf8 | |||
5c937efa9b | |||
ade1c3b830 | |||
8ded42a3ce | |||
65b91330ed | |||
98f8b07951 | |||
acaad991a7 | |||
e00bc5f723 | |||
a5fd8e355d | |||
8a2e1391e0 | |||
81c3722881 | |||
279e707a7a | |||
e894613f68 | |||
be08211cdc | |||
118c3e3964 | |||
3f4e353d13 | |||
a09ae3e251 | |||
f9c09495fc | |||
de424ce636 | |||
c28760e11a | |||
53090a6164 | |||
4661bf31ba | |||
5c687c98c6 | |||
495e08db05 | |||
a23d63613f | |||
acbabd4962 | |||
45a18b335f | |||
c23ea45e61 | |||
1f01933cc0 | |||
4958c5efe9 | |||
5dd3bb492f | |||
9d6d21bd40 | |||
ff80ef491a | |||
4bc54de8cd | |||
864f063878 | |||
009ab5066c | |||
a735a02257 | |||
360cc15b4b | |||
1e906696f5 | |||
b6902c116a | |||
8ace1a32bf | |||
4fcd3f5b2f | |||
c942287172 | |||
7c58eb0e78 | |||
9be030a4e2 | |||
4348f052c3 |
9
.gitattributes
vendored
@ -1,3 +1,12 @@
|
||||
* text=auto
|
||||
|
||||
*.ps1 text eol=crlf
|
||||
*.json text eol=crlf
|
||||
*.cfg text eol=crlf
|
||||
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
|
||||
config/* diff
|
||||
config/applications.json diff
|
||||
*.json diff
|
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.
|
||||
|
36
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
# Pull Request
|
||||
|
||||
## Title
|
||||
[Provide a succinct and descriptive title for the pull request.]
|
||||
|
||||
## Type of Change
|
||||
- [ ] New feature
|
||||
- [ ] Bug fix
|
||||
- [ ] Documentation update
|
||||
- [ ] Refactoring
|
||||
- [ ] Hotfix
|
||||
- [ ] Security patch
|
||||
- [ ] UI/UX improvement
|
||||
|
||||
## Description
|
||||
[Provide a detailed explanation of the changes you have made. Include the reasons behind these changes and any relevant context. Link any related issues.]
|
||||
|
||||
## Testing
|
||||
[Detail the testing you have performed to ensure that these changes function as intended. Include information about any added tests.]
|
||||
|
||||
## Impact
|
||||
[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/discussion is related to this PR (if any)]
|
||||
- Resolves #
|
||||
|
||||
## Additional Information
|
||||
[Any additional information that reviewers should be aware of.]
|
||||
|
||||
## Checklist
|
||||
- [ ] My code adheres to the coding and style guidelines of the project.
|
||||
- [ ] I have performed a self-review of my own code.
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas.
|
||||
- [ ] I have made corresponding changes to the documentation.
|
||||
- [ ] 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}"
|
24
.github/workflows/close-old-issues.yaml
vendored
@ -14,10 +14,26 @@ jobs:
|
||||
contents: none
|
||||
steps:
|
||||
- name: Close inactive issues
|
||||
uses: actions/stale@v9.0.0
|
||||
uses: actions/stale@v8
|
||||
with:
|
||||
# A list of labels to reference when looking through issues,
|
||||
# and only when one (or even more) of these labels are found..
|
||||
# then skip this issue, and never try to stale and/or close it.
|
||||
exempt-issue-labels: "Keep Issue Open"
|
||||
days-before-issue-close: 14
|
||||
close-issue-message: "This issue was closed because it has been inactive for 14 days"
|
||||
debug-only: false # Make this field equal true if you want to test your configuration if it works or not
|
||||
# Split it into two weeks, after one week the issue will be marked as stale,
|
||||
# after another week have pasted without any update.. the issue will then be closed.
|
||||
days-before-issue-stale: 7
|
||||
days-before-issue-close: 7
|
||||
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
# Sends a message for both the Stale and Close events of an issue.
|
||||
stale-issue-message: "This issue was marked as stale because it has been inactive for 7 days"
|
||||
close-issue-message: "This issue was closed because it has been inactive for 7 days since it was marked as stale"
|
||||
# Increase this value if the project receives a lot of
|
||||
# PRs (yes.. apparently they're processed no matter what) & Issues.
|
||||
# Default value for it (according to the docs) is 30
|
||||
operations-per-run: 200
|
||||
# Make this field equal true if you want to test your configuration if it works correctly or not
|
||||
debug-only: false
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
1
.github/workflows/compile.yaml
vendored
@ -5,6 +5,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- test*
|
||||
workflow_dispatch: # Manual trigger added
|
||||
|
||||
jobs:
|
||||
build-runspace:
|
||||
|
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
|
22
.github/workflows/github-pages.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: GitHub Pages Deploy
|
||||
on:
|
||||
release:
|
||||
types: [published, prereleased]
|
||||
workflow_dispatch:
|
||||
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 }}
|
48
.github/workflows/pre-release.yaml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: Pre-Release WinUtil
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger added
|
||||
|
||||
jobs:
|
||||
build-runspace:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract Version from winutil.ps1
|
||||
id: extract_version
|
||||
run: |
|
||||
$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
|
||||
|
||||
- name: Create and Upload Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
name: Pre-Release ${{ env.VERSION }}
|
||||
body: ""
|
||||
append_body: false
|
||||
files: ./winutil.ps1
|
||||
prerelease: true
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
12
.github/workflows/release.yaml
vendored
@ -1,10 +1,7 @@
|
||||
name: Release WinUtil
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Compile"] #Ensure Compile winget.ps1 is done
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch: # Manual trigger added
|
||||
|
||||
jobs:
|
||||
build-runspace:
|
||||
@ -22,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
|
||||
}
|
||||
}
|
||||
@ -39,6 +35,10 @@ jobs:
|
||||
with:
|
||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||
name: Release ${{ steps.extract_version.outputs.version }}
|
||||
body: ""
|
||||
append_body: true
|
||||
files: ./winutil.ps1
|
||||
prerelease: false
|
||||
make_latest: "true"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
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: |
|
||||
|
88
Compile.ps1
@ -1,5 +1,6 @@
|
||||
param (
|
||||
[switch]$Debug
|
||||
[switch]$Debug,
|
||||
[switch]$Run
|
||||
)
|
||||
$OFS = "`r`n"
|
||||
$scriptname = "winutil.ps1"
|
||||
@ -9,6 +10,22 @@ $sync = [Hashtable]::Synchronized(@{})
|
||||
$sync.PSScriptRoot = $PSScriptRoot
|
||||
$sync.configs = @{}
|
||||
|
||||
function Update-Progress {
|
||||
param (
|
||||
[Parameter(Mandatory, position=0)]
|
||||
[string]$StatusMessage,
|
||||
|
||||
[Parameter(Mandatory, position=1)]
|
||||
[ValidateRange(0,100)]
|
||||
[int]$Percent,
|
||||
|
||||
[Parameter(position=2)]
|
||||
[string]$Activity = "Compiling"
|
||||
)
|
||||
|
||||
Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent
|
||||
}
|
||||
|
||||
$header = @"
|
||||
################################################################################################################
|
||||
### ###
|
||||
@ -17,72 +34,79 @@ $header = @"
|
||||
################################################################################################################
|
||||
"@
|
||||
|
||||
|
||||
# Create the script in memory.
|
||||
Update-Progress "Pre-req: Allocating Memory" 0
|
||||
$script_content = [System.Collections.Generic.List[string]]::new()
|
||||
|
||||
Write-Progress -Activity "Compiling" -Status "Adding: Header" -PercentComplete 5
|
||||
Update-Progress "Adding: Header" 5
|
||||
$script_content.Add($header)
|
||||
|
||||
Write-Progress -Activity "Compiling" -Status "Adding: Version" -PercentComplete 10
|
||||
Update-Progress "Adding: Version" 10
|
||||
$script_content.Add($(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
||||
|
||||
Write-Progress -Activity "Compiling" -Status "Adding: Functions" -PercentComplete 20
|
||||
Update-Progress "Adding: Functions" 20
|
||||
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
||||
$script_content.Add($(Get-Content $psitem.FullName))
|
||||
}
|
||||
Write-Progress -Activity "Compiling" -Status "Adding: Config *.json" -PercentComplete 40
|
||||
Update-Progress "Adding: Config *.json" 40
|
||||
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
||||
|
||||
$json = (Get-Content $psitem.FullName).replace("'","''")
|
||||
|
||||
# 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.
|
||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
||||
$firstLevelName = $firstLevelJsonList[$i]
|
||||
# Note: Avoid using HTML Entity Codes (for example '”' (stands for "Right Double Quotation Mark")), and use HTML decimal/hex codes instead.
|
||||
# as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
||||
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>')
|
||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||
}
|
||||
if ($jsonAsObject.$firstLevelName.description -ne $null) {
|
||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>')
|
||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||
}
|
||||
}
|
||||
# The replace at the end is required, as without it the output of converto-json will be somewhat weird for Multiline String
|
||||
# Most Notably is the scripts in json files, making it harder for users who want to review these scripts that are found in the final compiled script
|
||||
|
||||
# Add 'WPFInstall' as a prefix to every entry-name in 'applications.json' file
|
||||
if ($psitem.Name -eq "applications.json") {
|
||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
||||
$appEntryName = $firstLevelJsonList[$i]
|
||||
$appEntryContent = $jsonAsObject.$appEntryName
|
||||
# Remove the entire app entry, so we could add it later with a different name
|
||||
$jsonAsObject.PSObject.Properties.Remove($appEntryName)
|
||||
# Add the app entry, but with a different name (WPFInstall + The App Entry Name)
|
||||
$jsonAsObject | Add-Member -MemberType NoteProperty -Name "WPFInstall$appEntryName" -Value $appEntryContent
|
||||
}
|
||||
}
|
||||
|
||||
# The replace at the end is required, as without it the output of 'converto-json' will be somewhat weird for Multiline Strings
|
||||
# Most Notably is the scripts in some json files, making it harder for users who want to review these scripts, which're found in the compiled script
|
||||
$json = ($jsonAsObject | convertto-json -Depth 3).replace('\r\n',"`r`n")
|
||||
|
||||
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" ))
|
||||
}
|
||||
Write-Progress -Activity "Compiling" -Status "Adding: Config *.cfg" -PercentComplete 45
|
||||
Get-ChildItem .\config | Where-Object {$PSItem.Extension -eq ".cfg"} | ForEach-Object {
|
||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$(Get-Content $PSItem.FullName)'"))
|
||||
}
|
||||
Get-ChildItem .\config | Where-Object {$PSItem.Extension -eq ".cfg"} | ForEach-Object {
|
||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$(Get-Content $PSItem.FullName)'"))
|
||||
}
|
||||
|
||||
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
||||
|
||||
# Dot-source the Get-TabXaml function
|
||||
. .\functions\private\Get-TabXaml.ps1
|
||||
|
||||
Write-Progress -Activity "Compiling" -Status "Building: Xaml " -PercentComplete 75
|
||||
Update-Progress "Building: Xaml " 75
|
||||
$appXamlContent = Get-TabXaml "applications" 5
|
||||
$tweaksXamlContent = Get-TabXaml "tweaks"
|
||||
$featuresXamlContent = Get-TabXaml "feature"
|
||||
|
||||
|
||||
Write-Progress -Activity "Compiling" -Status "Adding: Xaml " -PercentComplete 90
|
||||
Update-Progress "Adding: Xaml " 90
|
||||
# Replace the placeholder in $inputXML with the content of inputApp.xaml
|
||||
$xaml = $xaml -replace "{{InstallPanel_applications}}", $appXamlContent
|
||||
$xaml = $xaml -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent
|
||||
@ -93,13 +117,13 @@ $script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
||||
$script_content.Add($(Get-Content .\scripts\main.ps1))
|
||||
|
||||
if ($Debug){
|
||||
Write-Progress -Activity "Compiling" -Status "Writing debug files" -PercentComplete 95
|
||||
Update-Progress "Writing debug files" 95
|
||||
$appXamlContent | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii
|
||||
$tweaksXamlContent | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii
|
||||
$featuresXamlContent | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii
|
||||
}
|
||||
else {
|
||||
Write-Progress -Activity "Compiling" -Status "Removing temporary files" -PercentComplete 99
|
||||
Update-Progress "Removing temporary files" 99
|
||||
Remove-Item ".\xaml\inputApp.xaml" -ErrorAction SilentlyContinue
|
||||
Remove-Item ".\xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue
|
||||
Remove-Item ".\xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue
|
||||
@ -107,3 +131,13 @@ else {
|
||||
|
||||
Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding ascii
|
||||
Write-Progress -Activity "Compiling" -Completed
|
||||
|
||||
if ($run){
|
||||
try {
|
||||
Start-Process -FilePath "pwsh" -ArgumentList ".\$scriptname"
|
||||
}
|
||||
catch {
|
||||
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
## Known Issues and Fixes
|
||||
- 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:
|
||||
```
|
||||
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
|
||||
```
|
||||
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
||||
```
|
||||
- Windows Insider Builds not installing: Telemetry needs to be enabled
|
||||
```
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
||||
```
|
||||
- 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'.
|
||||
- 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:
|
||||
```
|
||||
Set-ExecutionPolicy Unrestricted -Scope Process -Force
|
||||
```
|
||||
3. Run:
|
||||
```
|
||||
irm christitus.com/win | iex
|
||||
```
|
129
README.md
@ -1,10 +1,14 @@
|
||||
# Chris Titus Tech's Windows Utility
|
||||
|
||||
[](https://github.com/ChrisTitusTech/winutil/releases/latest)
|
||||

|
||||
[](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.
|
||||
|
||||

|
||||

|
||||
|
||||
## 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:
|
||||
|
||||
@ -20,128 +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
|
||||
```
|
||||
irm https://christitus.com/win | iex
|
||||
```
|
||||
Courtesy of the issue raised at: [#144](/../../issues/144)
|
||||
#### Dev Branch
|
||||
|
||||
or by executing:
|
||||
```
|
||||
iwr -useb https://christitus.com/win | iex
|
||||
```ps1
|
||||
irm "https://christitus.com/windev" | iex
|
||||
```
|
||||
|
||||
if for some reason this site is not reachable from your country please try running it directly from github (replace `RELEASE_TAG` with current release that you are interested in, for example `v2024.06.05`)
|
||||
```
|
||||
irm "https://github.com/ChrisTitusTech/winutil/releases/download/RELEASE_TAG/winutil.ps1" | iex
|
||||
```
|
||||
If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/)
|
||||
|
||||
#### Automation
|
||||
## 🎓 Documentation
|
||||
|
||||
Some features are avaliable 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
|
||||
### [WinUtil Official Documentation](https://christitustech.github.io/winutil/)
|
||||
|
||||
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
||||

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

|
||||
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.
|
||||
```
|
||||
iex "& { $(irm christitus.com/win) } -Config [path-to-your-config] -Run"
|
||||
```
|
||||
7. Have a cup of coffee! Come back when it's done.
|
||||
### [YouTube Tutorial](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
|
||||
|
||||
### [ChrisTitus.com Article](https://christitus.com/windows-tool/)
|
||||
|
||||
|
||||
## Issues:
|
||||
|
||||
- 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. You may use a VPN or change your DNS provider to Google/Cloudflare/etc.
|
||||
|
||||
Source: <https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms>
|
||||
|
||||
- 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 you are having TLS 1.2 issues, or are having trouble resolving `christitus.com/win` then run with the following command:
|
||||
|
||||
```
|
||||
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winutil.ps1')
|
||||
```
|
||||
|
||||
If you are still having issues try changing your DNS provider to 1.1.1.1 || 1.0.0.1 or 8.8.8.8 || 8.8.4.4
|
||||
|
||||
## 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
|
||||
|
||||
[](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/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><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></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/>
|
||||
|
||||
## 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 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 doing a code change and you can submit a PR to main branch, but I am very selective about these. 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 documenting any additions made to the tweaks section and ensuring that corresponding undo measures are in place to remove the newly added tweaks if necessary. Failure to adhere to this format may result in denial of the pull request. Additionally, comprehensive documentation is required for all code changes. 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 name so that it can be loaded into the runspace.
|
||||
|
||||
## Thanks to all Contributors
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
||||
[](https://github.com/ChrisTitusTech/winutil/graphs/contributors)
|
||||
|
||||
## GitHub Stats
|
||||
## 📊 GitHub Stats
|
||||
|
||||

|
||||
|
@ -1,30 +1,50 @@
|
||||
{
|
||||
"Google":{
|
||||
"Primary": "8.8.8.8",
|
||||
"Secondary": "8.8.4.4"
|
||||
"Secondary": "8.8.4.4",
|
||||
"Primary6": "2001:4860:4860::8888",
|
||||
"Secondary6": "2001:4860:4860::8844"
|
||||
},
|
||||
"Cloudflare":{
|
||||
"Primary": "1.1.1.1",
|
||||
"Secondary": "1.0.0.1"
|
||||
"Secondary": "1.0.0.1",
|
||||
"Primary6": "2606:4700:4700::1111",
|
||||
"Secondary6": "2606:4700:4700::1001"
|
||||
},
|
||||
"Cloudflare_Malware":{
|
||||
"Primary": "1.1.1.2",
|
||||
"Secondary": "1.0.0.2"
|
||||
"Secondary": "1.0.0.2",
|
||||
"Primary6": "2606:4700:4700::1112",
|
||||
"Secondary6": "2606:4700:4700::1002"
|
||||
},
|
||||
"Cloudflare_Malware_Adult":{
|
||||
"Primary": "1.1.1.3",
|
||||
"Secondary": "1.0.0.3"
|
||||
},
|
||||
"Level3":{
|
||||
"Primary": "4.2.2.2",
|
||||
"Secondary": "4.2.2.1"
|
||||
"Secondary": "1.0.0.3",
|
||||
"Primary6": "2606:4700:4700::1113",
|
||||
"Secondary6": "2606:4700:4700::1003"
|
||||
},
|
||||
"Open_DNS":{
|
||||
"Primary": "208.67.222.222",
|
||||
"Secondary": "208.67.220.220"
|
||||
"Secondary": "208.67.220.220",
|
||||
"Primary6": "2620:119:35::35",
|
||||
"Secondary6": "2620:119:53::53"
|
||||
},
|
||||
"Quad9":{
|
||||
"Primary": "9.9.9.9",
|
||||
"Secondary": "149.112.112.112"
|
||||
"Secondary": "149.112.112.112",
|
||||
"Primary6": "2620:fe::fe",
|
||||
"Secondary6": "2620:fe::9"
|
||||
},
|
||||
"AdGuard_Ads_Trackers":{
|
||||
"Primary": "94.140.14.14",
|
||||
"Secondary": "94.140.15.15",
|
||||
"Primary6": "2a10:50c0::ad1:ff",
|
||||
"Secondary6": "2a10:50c0::ad2:ff"
|
||||
},
|
||||
"AdGuard_Ads_Trackers_Malware_Adult":{
|
||||
"Primary": "94.140.14.15",
|
||||
"Secondary": "94.140.15.16",
|
||||
"Primary6": "2a10:50c0::bad1:ff",
|
||||
"Secondary6": "2a10:50c0::bad2:ff"
|
||||
}
|
||||
}
|
@ -184,90 +184,104 @@
|
||||
"category": "Features",
|
||||
"panel": "1",
|
||||
"Order": "a060_",
|
||||
"Type": "150"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelAutologin": {
|
||||
"Content": "Set Up Autologin",
|
||||
"category": "Fixes",
|
||||
"Order": "a040_",
|
||||
"panel": "1",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFFixesUpdate": {
|
||||
"Content": "Reset Windows Update",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a041_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFFixesNetwork": {
|
||||
"Content": "Reset Network",
|
||||
"category": "Fixes",
|
||||
"Order": "a042_",
|
||||
"panel": "1",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelDISM": {
|
||||
"Content": "System Corruption Scan",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a043_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFFixesWinget": {
|
||||
"Content": "WinGet Reinstall",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a044_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFRunAdobeCCCleanerTool": {
|
||||
"Content": "Remove Adobe Creative Cloud",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a045_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelnetwork": {
|
||||
"Content": "Network Connections",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelcontrol": {
|
||||
"Content": "Control Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelpower": {
|
||||
"Content": "Power Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelregion": {
|
||||
"Content": "Region",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelsound": {
|
||||
"Content": "Sound Settings",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelsystem": {
|
||||
"Content": "System Properties",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPaneluser": {
|
||||
"Content": "User Accounts",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
}
|
||||
}
|
||||
|
@ -1,399 +0,0 @@
|
||||
# This file is meant to assist in building out the json files inside this folder.
|
||||
|
||||
#===========================================================================
|
||||
# applications.json
|
||||
#===========================================================================
|
||||
|
||||
<#
|
||||
Applications.json
|
||||
-----------------
|
||||
This file holds all the install commands to install the applications.
|
||||
This file has the ability to expect multiple frameworks per checkbox.
|
||||
You can also add multiple install commands by separating them with ;
|
||||
|
||||
The structure of the json is as follows
|
||||
|
||||
{
|
||||
"Name of Button": {
|
||||
"winget": "Winget command"
|
||||
"choco": "Chocolatey command"
|
||||
},
|
||||
}
|
||||
|
||||
Example:
|
||||
|
||||
{
|
||||
"WPFInstalladobe": {
|
||||
"winget": "Adobe.Acrobat.Reader.64-bit"
|
||||
"choco": "adobereader"
|
||||
},
|
||||
"WPFInstalladvancedip": {
|
||||
"winget": "Famatech.AdvancedIPScanner"
|
||||
"choco": "advanced-ip-scanner"
|
||||
}
|
||||
}
|
||||
|
||||
#>
|
||||
|
||||
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||
#------Do not delete WPF------
|
||||
|
||||
$NameofButton = "WPF" + ""
|
||||
$WingetCommand = ""
|
||||
$ChocoCommand = ""
|
||||
|
||||
$ButtonToAdd = New-Object psobject
|
||||
$jsonfile = Get-Content ./config/applications.json | ConvertFrom-Json
|
||||
|
||||
# Remove if already exists
|
||||
if($jsonfile.$NameofButton){
|
||||
$jsonfile.psobject.Properties.remove($NameofButton)
|
||||
}
|
||||
|
||||
Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "Winget" -Value $WingetCommand
|
||||
Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "choco" -Value $ChocoCommand
|
||||
Add-Member -InputObject $jsonfile.install -MemberType NoteProperty -Name $NameofButton -Value $ButtonToAdd
|
||||
|
||||
$jsonfile | ConvertTo-Json | Out-File ./config/applications.json
|
||||
|
||||
#===========================================================================
|
||||
# feature.json
|
||||
#===========================================================================
|
||||
|
||||
<#
|
||||
feature.json
|
||||
-----------------
|
||||
This file holds all the windows commands to install specific features (IE Hyper-v)
|
||||
|
||||
The structure of the json is as follows
|
||||
|
||||
{
|
||||
"Name of Button": [
|
||||
"Array of",
|
||||
"commands"
|
||||
]
|
||||
}
|
||||
|
||||
Example:
|
||||
{
|
||||
"Featurewsl": [
|
||||
"VirtualMachinePlatform",
|
||||
"Microsoft-Windows-Subsystem-Linux"
|
||||
],
|
||||
"Featurenfs": [
|
||||
"ServicesForNFS-ClientOnly",
|
||||
"ClientForNFS-Infrastructure",
|
||||
"NFS-Administration"
|
||||
]
|
||||
}
|
||||
#>
|
||||
|
||||
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||
|
||||
$NameofButton = ""
|
||||
$commands = @(
|
||||
|
||||
)
|
||||
|
||||
$jsonfile = Get-Content ./config/feature.json | ConvertFrom-Json
|
||||
|
||||
# Remove if already exists
|
||||
if($jsonfile.$NameofButton){
|
||||
$jsonfile.psobject.Properties.remove($NameofButton)
|
||||
}
|
||||
|
||||
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $commands
|
||||
|
||||
$jsonfile | ConvertTo-Json | Out-File ./config/feature.json
|
||||
|
||||
#===========================================================================
|
||||
# preset.json
|
||||
#===========================================================================
|
||||
|
||||
<#
|
||||
preset.json
|
||||
-----------------
|
||||
This file holds all check boxes you wish to check when clicking a preset button in the tweaks section.
|
||||
|
||||
The structure of the json is as follows
|
||||
|
||||
{
|
||||
"Name of Button": [
|
||||
"Array of",
|
||||
"checkboxes to check"
|
||||
]
|
||||
}
|
||||
|
||||
Example:
|
||||
{
|
||||
"laptop": [
|
||||
"EssTweaksAH",
|
||||
"EssTweaksDVR",
|
||||
"EssTweaksHome",
|
||||
"EssTweaksLoc",
|
||||
"EssTweaksOO",
|
||||
"EssTweaksRP",
|
||||
"EssTweaksServices",
|
||||
"EssTweaksStorage",
|
||||
"EssTweaksTele",
|
||||
"EssTweaksWifi",
|
||||
"MiscTweaksLapPower",
|
||||
"MiscTweaksLapNum"
|
||||
],
|
||||
"minimal": [
|
||||
"EssTweaksHome",
|
||||
"EssTweaksOO",
|
||||
"EssTweaksRP",
|
||||
"EssTweaksServices",
|
||||
"EssTweaksTele"
|
||||
]
|
||||
}
|
||||
#>
|
||||
|
||||
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||
|
||||
$NameofButton = "WPF" + ""
|
||||
$commands = @(
|
||||
|
||||
)
|
||||
|
||||
$jsonfile = Get-Content ./config/preset.json | ConvertFrom-Json
|
||||
|
||||
# Remove if already exists
|
||||
if($jsonfile.$NameofButton){
|
||||
$jsonfile.psobject.Properties.remove($NameofButton)
|
||||
}
|
||||
|
||||
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $commands
|
||||
|
||||
$jsonfile | ConvertTo-Json | Out-File ./config/preset.json
|
||||
|
||||
#===========================================================================
|
||||
# tweaks.json
|
||||
#===========================================================================
|
||||
|
||||
<#
|
||||
tweaks.json
|
||||
-----------------
|
||||
This file holds all the tweaks needed to make modifications to windows. This file is the most complicated so modify with care.
|
||||
|
||||
The structure of the json is as follows
|
||||
|
||||
{
|
||||
"Name of button": {
|
||||
"registry" : [
|
||||
{
|
||||
"Path": "Path in registry",
|
||||
"Name": "Name of Registry key",
|
||||
"Type": "Item type",
|
||||
"Value": "Value to modify",
|
||||
"OriginalValue": "value to reset"
|
||||
}
|
||||
],
|
||||
"service" : [
|
||||
{
|
||||
"Name": "Name of service",
|
||||
"StartupType": "Startup type to set",
|
||||
"OriginalType": "Startup type to reset"
|
||||
}
|
||||
],
|
||||
"ScheduledTask" : [
|
||||
{
|
||||
"Name": "Path to scheduled task",
|
||||
"State": "State to set",
|
||||
"OriginalState": "State to reset"
|
||||
}
|
||||
],
|
||||
"appx": [
|
||||
List of appx,
|
||||
files to uninstall
|
||||
],
|
||||
"InvokeScript": [
|
||||
"Script to make modifications not possible with the above types
|
||||
Special care needs to be taken here as converting from json to a scriptblock
|
||||
can cause weird issues. Please look at the example below to get an idea of how things should work"
|
||||
],
|
||||
"UndoScript": [
|
||||
"Same as above however is meant to undo what you did above"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Example:
|
||||
|
||||
{
|
||||
EssTweaksAH": {
|
||||
"registry" : [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||
"Name": "EnableActivityFeed",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||
"Name": "PublishUserActivities",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"EssTweaksHome": {
|
||||
"service" : [
|
||||
{
|
||||
"Name": "HomeGroupListener",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "HomeGroupProvider",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"EssTweaksTele": {
|
||||
"ScheduledTask" : [
|
||||
{
|
||||
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
|
||||
"State": "Disabled",
|
||||
"OriginalState": "Enabled"
|
||||
},
|
||||
{
|
||||
"Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater",
|
||||
"State": "Disabled",
|
||||
"OriginalState": "Enabled"
|
||||
}
|
||||
]
|
||||
},
|
||||
"EssTweaksDeBloat": {
|
||||
"appx": [
|
||||
"Microsoft.Microsoft3DViewer",
|
||||
"Microsoft.AppConnector"
|
||||
]
|
||||
},
|
||||
"EssTweaksOO": {
|
||||
"InvokeScript": [
|
||||
"Import-Module BitsTransfer
|
||||
Start-BitsTransfer -Source \"https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg\" -Destination C:\\Windows\\Temp\\ooshutup10.cfg
|
||||
Start-BitsTransfer -Source \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -Destination C:\\Windows\\Temp\\OOSU10.exe
|
||||
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#>
|
||||
|
||||
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||
# Make sure to uncomment the sections you which to add.
|
||||
|
||||
#$Registry = @(
|
||||
# # To add more repeat this separated by a comma
|
||||
# @{
|
||||
# Path = ""
|
||||
# Name = ""
|
||||
# Type = ""
|
||||
# Value = ""
|
||||
# OriginalValue = ""
|
||||
# }
|
||||
#)
|
||||
|
||||
#$Service = @(
|
||||
# # To add more repeat this separated by a comma
|
||||
# @{
|
||||
# Name = ""
|
||||
# StartupType = ""
|
||||
# OriginalType = ""
|
||||
# }
|
||||
#)
|
||||
|
||||
#$ScheduledTask = @(
|
||||
# # To add more repeat this separated by a comma
|
||||
# @{
|
||||
# Name = ""
|
||||
# State = ""
|
||||
# OriginalState = ""
|
||||
# }
|
||||
#)
|
||||
|
||||
#$Appx = @(
|
||||
# ""
|
||||
#)
|
||||
|
||||
#$InvokeScript = @(
|
||||
# ""
|
||||
#)
|
||||
|
||||
#$UndoScript = @(
|
||||
# ""
|
||||
#)
|
||||
|
||||
$NameofButton = "WPF" + ""
|
||||
|
||||
$ButtonToAdd = New-Object psobject
|
||||
$jsonfile = Get-Content ./config/tweaks.json | ConvertFrom-Json
|
||||
|
||||
# Remove if already exists
|
||||
if($jsonfile.$NameofButton){
|
||||
$jsonfile.psobject.Properties.remove($NameofButton)
|
||||
}
|
||||
|
||||
if($Registry){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "registry" -Value $Registry}
|
||||
if($Service){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "service" -Value $Service}
|
||||
if($ScheduledTask){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "ScheduledTask" -Value $ScheduledTask}
|
||||
if($Appx){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "Appx" -Value $Appx}
|
||||
if($InvokeScript){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "InvokeScript" -Value $InvokeScript}
|
||||
if($UndoScript){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "UndoScript" -Value $UndoScript}
|
||||
|
||||
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $ButtonToAdd
|
||||
|
||||
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/tweaks.json
|
||||
|
||||
#===========================================================================
|
||||
# dns.json
|
||||
#===========================================================================
|
||||
|
||||
<#
|
||||
dns.json
|
||||
-----------------
|
||||
This file holds all the DNS entries.
|
||||
|
||||
The structure of the json is as follows
|
||||
|
||||
{
|
||||
"DNS Provider": [
|
||||
"Primary": "IP address",
|
||||
"Secondary": "IP address"
|
||||
]
|
||||
}
|
||||
|
||||
Example:
|
||||
{
|
||||
"Cloudflare":{
|
||||
"Primary": "1.1.1.1",
|
||||
"Secondary": "1.0.0.1"
|
||||
}
|
||||
}
|
||||
#>
|
||||
|
||||
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||
|
||||
$NameofProvider = "" -replace " ","_"
|
||||
$IPAddress = @{
|
||||
"Primary" = "0.0.0.0"
|
||||
"Secondary" = "0.0.0.0"
|
||||
}
|
||||
|
||||
$ButtonToAdd = New-Object psobject
|
||||
$jsonfile = Get-Content ./config/dns.json | ConvertFrom-Json
|
||||
|
||||
# Remove if already exists
|
||||
if($jsonfile.$NameofProvider){
|
||||
$jsonfile.psobject.Properties.remove($NameofProvider)
|
||||
}
|
||||
|
||||
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofProvider -Value $IPAddress
|
||||
|
||||
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/dns.json
|
@ -1,227 +0,0 @@
|
||||
############################################################################
|
||||
# This file was created with O&O ShutUp10++ V1.9.1436
|
||||
# and can be imported onto another computer.
|
||||
#
|
||||
# Download the application at https://www.oo-software.com/shutup10
|
||||
# You can then import the file from within the program.
|
||||
#
|
||||
# Alternatively you can import it automatically over a command line.
|
||||
# Simply use the following parameter:
|
||||
# OOSU10.exe <path to file>
|
||||
#
|
||||
# Selecting the Option /quiet ends the app right after the import and the
|
||||
# user does not get any feedback about the import.
|
||||
#
|
||||
# We are always happy to answer any questions you may have!
|
||||
# © 2015-2023 O&O Software GmbH, Berlin. All rights reserved.
|
||||
# https://www.oo-software.com/
|
||||
############################################################################
|
||||
|
||||
P001 -
|
||||
P002 -
|
||||
P003 -
|
||||
P004 -
|
||||
P005 -
|
||||
P006 -
|
||||
P008 -
|
||||
P026 -
|
||||
P027 -
|
||||
P028 -
|
||||
P064 -
|
||||
P065 -
|
||||
P066 -
|
||||
P067 -
|
||||
P070 -
|
||||
P069 -
|
||||
P009 -
|
||||
P010 -
|
||||
P015 -
|
||||
P068 -
|
||||
P016 -
|
||||
A001 -
|
||||
A002 -
|
||||
A003 -
|
||||
A004 -
|
||||
A006 -
|
||||
A005 -
|
||||
P007 -
|
||||
P036 -
|
||||
P025 -
|
||||
P033 -
|
||||
P023 -
|
||||
P056 -
|
||||
P057 -
|
||||
P012 -
|
||||
P034 -
|
||||
P013 -
|
||||
P035 -
|
||||
P062 -
|
||||
P063 -
|
||||
P081 -
|
||||
P047 -
|
||||
P019 -
|
||||
P048 -
|
||||
P049 -
|
||||
P020 -
|
||||
P037 -
|
||||
P011 -
|
||||
P038 -
|
||||
P050 -
|
||||
P051 -
|
||||
P018 -
|
||||
P039 -
|
||||
P021 -
|
||||
P040 -
|
||||
P022 -
|
||||
P041 -
|
||||
P014 -
|
||||
P042 -
|
||||
P052 -
|
||||
P053 -
|
||||
P054 -
|
||||
P055 -
|
||||
P029 -
|
||||
P043 -
|
||||
P030 -
|
||||
P044 -
|
||||
P031 -
|
||||
P045 -
|
||||
P032 -
|
||||
P046 -
|
||||
P058 -
|
||||
P059 -
|
||||
P060 -
|
||||
P061 -
|
||||
P071 -
|
||||
P072 -
|
||||
P073 -
|
||||
P074 -
|
||||
P075 -
|
||||
P076 -
|
||||
P077 -
|
||||
P078 -
|
||||
P079 -
|
||||
P080 -
|
||||
P024 -
|
||||
S001 -
|
||||
S002 -
|
||||
S003 -
|
||||
S008 -
|
||||
E101 -
|
||||
E201 -
|
||||
E115 -
|
||||
E215 -
|
||||
E118 -
|
||||
E218 -
|
||||
E107 -
|
||||
E207 -
|
||||
E111 -
|
||||
E211 -
|
||||
E112 -
|
||||
E212 -
|
||||
E109 -
|
||||
E209 -
|
||||
E121 -
|
||||
E221 -
|
||||
E103 -
|
||||
E203 -
|
||||
E123 -
|
||||
E223 -
|
||||
E124 -
|
||||
E224 -
|
||||
E128 -
|
||||
E228 -
|
||||
E119 -
|
||||
E219 -
|
||||
E120 -
|
||||
E220 -
|
||||
E122 -
|
||||
E222 -
|
||||
E125 -
|
||||
E225 -
|
||||
E126 -
|
||||
E226 -
|
||||
E106 -
|
||||
E206 -
|
||||
E127 -
|
||||
E227 -
|
||||
E001 -
|
||||
E002 -
|
||||
E003 -
|
||||
E008 -
|
||||
E007 -
|
||||
E010 -
|
||||
E011 +
|
||||
E012 +
|
||||
E009 -
|
||||
E004 -
|
||||
E005 -
|
||||
E013 -
|
||||
E014 -
|
||||
E006 -
|
||||
Y001 -
|
||||
Y002 -
|
||||
Y003 -
|
||||
Y004 -
|
||||
Y005 -
|
||||
Y006 -
|
||||
Y007 -
|
||||
C012 -
|
||||
C002 -
|
||||
C013 -
|
||||
C007 -
|
||||
C008 -
|
||||
C009 -
|
||||
C010 -
|
||||
C011 -
|
||||
C014 -
|
||||
C015 -
|
||||
C101 -
|
||||
C201 -
|
||||
C102 -
|
||||
L001 -
|
||||
L003 -
|
||||
L004 -
|
||||
L005 -
|
||||
U001 -
|
||||
U004 -
|
||||
U005 -
|
||||
U006 -
|
||||
U007 -
|
||||
W001 -
|
||||
W011 -
|
||||
W004 -
|
||||
W005 -
|
||||
W010 -
|
||||
W009 -
|
||||
P017 -
|
||||
W006 -
|
||||
W008 -
|
||||
M006 -
|
||||
M011 -
|
||||
M010 -
|
||||
O003 -
|
||||
O001 -
|
||||
S012 -
|
||||
S013 -
|
||||
S014 -
|
||||
K001 -
|
||||
K002 -
|
||||
K005 -
|
||||
M003 -
|
||||
M015 -
|
||||
M016 -
|
||||
M017 -
|
||||
M018 -
|
||||
M019 -
|
||||
M020 -
|
||||
M021 -
|
||||
M022 -
|
||||
M001 -
|
||||
M004 -
|
||||
M005 -
|
||||
M024 -
|
||||
M012 -
|
||||
M013 -
|
||||
M014 -
|
||||
N001 -
|
@ -1,231 +0,0 @@
|
||||
############################################################################
|
||||
# This file was created with O&O ShutUp10++ V1.9.1438
|
||||
# and can be imported onto another computer.
|
||||
#
|
||||
# Download the application at https://www.oo-software.com/shutup10
|
||||
# You can then import the file from within the program.
|
||||
#
|
||||
# Alternatively you can import it automatically over a command line.
|
||||
# Simply use the following parameter:
|
||||
# OOSU10.exe <path to file>
|
||||
#
|
||||
# Selecting the Option /quiet ends the app right after the import and the
|
||||
# user does not get any feedback about the import.
|
||||
#
|
||||
# We are always happy to answer any questions you may have!
|
||||
# © 2015-2024 O&O Software GmbH, Berlin. All rights reserved.
|
||||
# https://www.oo-software.com/
|
||||
############################################################################
|
||||
|
||||
P001 +
|
||||
P002 +
|
||||
P003 +
|
||||
P004 +
|
||||
P005 +
|
||||
P006 +
|
||||
P008 +
|
||||
P026 +
|
||||
P027 +
|
||||
P028 +
|
||||
P064 +
|
||||
P065 +
|
||||
P066 +
|
||||
P067 +
|
||||
P070 +
|
||||
P069 +
|
||||
P009 -
|
||||
P010 +
|
||||
P015 +
|
||||
P068 -
|
||||
P016 -
|
||||
A001 +
|
||||
A002 +
|
||||
A003 +
|
||||
A004 +
|
||||
A006 +
|
||||
A005 +
|
||||
P007 +
|
||||
P036 +
|
||||
P025 +
|
||||
P033 +
|
||||
P023 +
|
||||
P056 +
|
||||
P057 -
|
||||
P012 -
|
||||
P034 -
|
||||
P013 -
|
||||
P035 -
|
||||
P062 -
|
||||
P063 -
|
||||
P081 -
|
||||
P047 -
|
||||
P019 -
|
||||
P048 -
|
||||
P049 -
|
||||
P020 -
|
||||
P037 -
|
||||
P011 -
|
||||
P038 -
|
||||
P050 -
|
||||
P051 -
|
||||
P018 -
|
||||
P039 -
|
||||
P021 -
|
||||
P040 -
|
||||
P022 -
|
||||
P041 -
|
||||
P014 -
|
||||
P042 -
|
||||
P052 -
|
||||
P053 -
|
||||
P054 -
|
||||
P055 -
|
||||
P029 -
|
||||
P043 -
|
||||
P030 -
|
||||
P044 -
|
||||
P031 -
|
||||
P045 -
|
||||
P032 -
|
||||
P046 -
|
||||
P058 -
|
||||
P059 -
|
||||
P060 -
|
||||
P061 -
|
||||
P071 -
|
||||
P072 -
|
||||
P073 -
|
||||
P074 -
|
||||
P075 -
|
||||
P076 -
|
||||
P077 -
|
||||
P078 -
|
||||
P079 -
|
||||
P080 -
|
||||
P024 +
|
||||
S001 +
|
||||
S002 +
|
||||
S003 +
|
||||
S008 -
|
||||
E101 +
|
||||
E201 +
|
||||
E115 +
|
||||
E215 +
|
||||
E118 +
|
||||
E218 +
|
||||
E107 +
|
||||
E207 +
|
||||
E111 +
|
||||
E211 +
|
||||
E112 +
|
||||
E212 +
|
||||
E109 +
|
||||
E209 +
|
||||
E121 +
|
||||
E221 +
|
||||
E103 +
|
||||
E203 +
|
||||
E123 +
|
||||
E223 +
|
||||
E124 +
|
||||
E224 +
|
||||
E128 +
|
||||
E228 +
|
||||
E119 -
|
||||
E219 -
|
||||
E120 -
|
||||
E220 -
|
||||
E122 -
|
||||
E222 -
|
||||
E125 -
|
||||
E225 -
|
||||
E126 -
|
||||
E226 -
|
||||
E106 -
|
||||
E206 -
|
||||
E127 -
|
||||
E227 -
|
||||
E001 +
|
||||
E002 +
|
||||
E003 +
|
||||
E008 +
|
||||
E007 +
|
||||
E010 +
|
||||
E011 +
|
||||
E012 +
|
||||
E009 -
|
||||
E004 -
|
||||
E005 -
|
||||
E013 -
|
||||
E014 -
|
||||
E006 -
|
||||
Y001 +
|
||||
Y002 +
|
||||
Y003 +
|
||||
Y004 +
|
||||
Y005 +
|
||||
Y006 +
|
||||
Y007 +
|
||||
C012 +
|
||||
C002 +
|
||||
C013 +
|
||||
C007 +
|
||||
C008 +
|
||||
C009 +
|
||||
C010 +
|
||||
C011 +
|
||||
C014 +
|
||||
C015 +
|
||||
C101 +
|
||||
C201 +
|
||||
C102 +
|
||||
C103 +
|
||||
C203 +
|
||||
L001 +
|
||||
L003 +
|
||||
L004 -
|
||||
L005 -
|
||||
U001 +
|
||||
U004 +
|
||||
U005 +
|
||||
U006 +
|
||||
U007 +
|
||||
W001 +
|
||||
W011 +
|
||||
W004 -
|
||||
W005 -
|
||||
W010 -
|
||||
W009 -
|
||||
P017 +
|
||||
W006 -
|
||||
W008 -
|
||||
M006 +
|
||||
M011 -
|
||||
M010 +
|
||||
O003 -
|
||||
O001 -
|
||||
S012 -
|
||||
S013 -
|
||||
S014 -
|
||||
K001 +
|
||||
K002 +
|
||||
K005 +
|
||||
M003 +
|
||||
M015 +
|
||||
M016 +
|
||||
M017 -
|
||||
M018 +
|
||||
M019 -
|
||||
M020 +
|
||||
M021 +
|
||||
M022 +
|
||||
M001 +
|
||||
M004 +
|
||||
M005 +
|
||||
M024 +
|
||||
M026 +
|
||||
M027 +
|
||||
M012 -
|
||||
M013 -
|
||||
M014 -
|
||||
N001 -
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"Standard": [
|
||||
"WPFTweaksAH",
|
||||
"WPFTweaksConsumerFeatures",
|
||||
"WPFTweaksDVR",
|
||||
"WPFTweaksHiber",
|
||||
"WPFTweaksHome",
|
||||
"WPFTweaksLoc",
|
||||
"WPFTweaksOO",
|
||||
"WPFTweaksServices",
|
||||
"WPFTweaksStorage",
|
||||
"WPFTweaksTele",
|
||||
@ -14,11 +14,12 @@
|
||||
"WPFTweaksDeleteTempFiles",
|
||||
"WPFTweaksEndTaskOnTaskbar",
|
||||
"WPFTweaksRestorePoint",
|
||||
"WPFTweaksTeredo"
|
||||
"WPFTweaksTeredo",
|
||||
"WPFTweaksPowershell7Tele"
|
||||
],
|
||||
"Minimal": [
|
||||
"WPFTweaksConsumerFeatures",
|
||||
"WPFTweaksHome",
|
||||
"WPFTweaksOO",
|
||||
"WPFTweaksServices",
|
||||
"WPFTweaksTele"
|
||||
]
|
||||
|
@ -1,5 +1,30 @@
|
||||
{
|
||||
"Classic": {
|
||||
"CustomDialogFontSize": "12",
|
||||
"CustomDialogFontSizeHeader": "14",
|
||||
"CustomDialogIconSize": "25",
|
||||
"CustomDialogWidth": "400",
|
||||
"CustomDialogHeight": "200",
|
||||
|
||||
"FontSize": "12",
|
||||
"FontFamily": "Arial",
|
||||
"FontSizeHeading": "14",
|
||||
"HeaderFontFamily": "Consolas, Monaco",
|
||||
|
||||
"CheckBoxBulletDecoratorFontSize": "14",
|
||||
"CheckBoxMargin": "15,0,0,2",
|
||||
|
||||
"TabButtonFontSize": "14",
|
||||
"TabButtonWidth": "100",
|
||||
"TabButtonHeight": "25",
|
||||
"TabRowHeightInPixels": "50",
|
||||
"IconFontSize": "14",
|
||||
"IconButtonSize": "35",
|
||||
"WinUtilIconSize": "Auto",
|
||||
"SettingsIconFontSize": "18",
|
||||
|
||||
"MicroWinLogoSize": "10",
|
||||
|
||||
"ComboBoxBackgroundColor": "#FFFFFF",
|
||||
"LabelboxForegroundColor": "#000000",
|
||||
"MainForegroundColor": "#000000",
|
||||
@ -9,6 +34,18 @@
|
||||
"LinkHoverForegroundColor": "#000000",
|
||||
"GroupBorderBackgroundColor": "#000000",
|
||||
"ComboBoxForegroundColor": "#000000",
|
||||
|
||||
"ButtonFontSize": "12",
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "16",
|
||||
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "25",
|
||||
"SearchBarTextBoxFontSize": "16",
|
||||
"SearchBarClearButtonFontSize": "14",
|
||||
|
||||
"ButtonInstallBackgroundColor": "#FFFFFF",
|
||||
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
||||
"ButtonConfigBackgroundColor": "#FFFFFF",
|
||||
@ -24,15 +61,40 @@
|
||||
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
||||
"ButtonForegroundColor": "#000000",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"ToggleButtonHeight": "25",
|
||||
"BorderColor": "#000000",
|
||||
"BorderOpacity": "0.2",
|
||||
"ShadowPulse": "Forever"
|
||||
},
|
||||
"Matrix": {
|
||||
"CustomDialogFontSize": "12",
|
||||
"CustomDialogFontSizeHeader": "14",
|
||||
"CustomDialogIconSize": "25",
|
||||
"CustomDialogWidth": "400",
|
||||
"CustomDialogHeight": "200",
|
||||
|
||||
"FontSize": "12",
|
||||
"FontFamily": "Arial",
|
||||
"FontSizeHeading": "14",
|
||||
"HeaderFontFamily": "Consolas, Monaco",
|
||||
|
||||
"CheckBoxBulletDecoratorFontSize": "14",
|
||||
"CheckBoxMargin": "15,0,0,2",
|
||||
|
||||
"TabButtonFontSize": "14",
|
||||
"TabButtonWidth": "100",
|
||||
"TabButtonHeight": "25",
|
||||
"TabRowHeightInPixels": "50",
|
||||
"IconFontSize": "14",
|
||||
"IconButtonSize": "35",
|
||||
"WinUtilIconSize": "Auto",
|
||||
"SettingsIconFontSize": "18",
|
||||
|
||||
"MicroWinLogoSize": "10",
|
||||
|
||||
"ComboBoxBackgroundColor": "#000000",
|
||||
"LabelboxForegroundColor": "#FFEE58",
|
||||
"MainForegroundColor": "#9CCC65",
|
||||
@ -41,6 +103,18 @@
|
||||
"LinkForegroundColor": "#add8e6",
|
||||
"LinkHoverForegroundColor": "#FFFFFF",
|
||||
"ComboBoxForegroundColor": "#FFEE58",
|
||||
|
||||
"ButtonFontSize": "12",
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "16",
|
||||
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "25",
|
||||
"SearchBarTextBoxFontSize": "16",
|
||||
"SearchBarClearButtonFontSize": "14",
|
||||
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
@ -55,15 +129,40 @@
|
||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||
"ButtonForegroundColor": "#9CCC65",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"ToggleButtonHeight": "25",
|
||||
"BorderColor": "#FFAC1C",
|
||||
"BorderOpacity": "0.8",
|
||||
"ShadowPulse": "0:0:3"
|
||||
},
|
||||
"Dark": {
|
||||
"CustomDialogFontSize": "12",
|
||||
"CustomDialogFontSizeHeader": "14",
|
||||
"CustomDialogIconSize": "25",
|
||||
"CustomDialogWidth": "400",
|
||||
"CustomDialogHeight": "200",
|
||||
|
||||
"FontSize": "12",
|
||||
"FontFamily": "Arial",
|
||||
"FontSizeHeading": "14",
|
||||
"HeaderFontFamily": "Consolas, Monaco",
|
||||
|
||||
"CheckBoxBulletDecoratorFontSize": "14",
|
||||
"CheckBoxMargin": "15,0,0,2",
|
||||
|
||||
"TabButtonFontSize": "14",
|
||||
"TabButtonWidth": "100",
|
||||
"TabButtonHeight": "25",
|
||||
"TabRowHeightInPixels": "50",
|
||||
"IconFontSize": "14",
|
||||
"IconButtonSize": "35",
|
||||
"WinUtilIconSize": "Auto",
|
||||
"SettingsIconFontSize": "18",
|
||||
|
||||
"MicroWinLogoSize": "10",
|
||||
|
||||
"ComboBoxBackgroundColor": "#000000",
|
||||
"LabelboxForegroundColor": "#FFEE58",
|
||||
"MainForegroundColor": "#9CCC65",
|
||||
@ -72,6 +171,18 @@
|
||||
"LinkForegroundColor": "#add8e6",
|
||||
"LinkHoverForegroundColor": "#FFFFFF",
|
||||
"ComboBoxForegroundColor": "#FFEE58",
|
||||
|
||||
"ButtonFontSize": "12",
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "16",
|
||||
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "25",
|
||||
"SearchBarTextBoxFontSize": "16",
|
||||
"SearchBarClearButtonFontSize": "14",
|
||||
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
@ -86,10 +197,10 @@
|
||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||
"ButtonForegroundColor": "#9CCC65",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"ToggleButtonHeight": "25",
|
||||
"BorderColor": "#FFAC1C",
|
||||
"BorderOpacity": "0.2",
|
||||
"ShadowPulse": "Forever"
|
||||
|
@ -58,7 +58,7 @@
|
||||
"powercfg.exe /hibernate on"
|
||||
]
|
||||
},
|
||||
"WPFToggleTweaksLaptopHybernation": {
|
||||
"WPFTweaksLaptopHibernation": {
|
||||
"Content": "Set Hibernation as default (good for laptops)",
|
||||
"Description": "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",
|
||||
"category": "Essential Tweaks",
|
||||
@ -1580,6 +1580,22 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksConsumerFeatures":{
|
||||
"Content": "Disable ConsumerFeatures",
|
||||
"Description": "Windows 10 will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a003_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
|
||||
"OriginalValue": "0",
|
||||
"Name": "DisableWindowsConsumerFeatures",
|
||||
"Value": "1",
|
||||
"Type": "DWord"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksTele": {
|
||||
"Content": "Disable Telemetry",
|
||||
"Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.",
|
||||
@ -1738,13 +1754,6 @@
|
||||
"Value": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
|
||||
"OriginalValue": "0",
|
||||
"Name": "DisableWindowsConsumerFeatures",
|
||||
"Value": "1",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
|
||||
"OriginalValue": "0",
|
||||
@ -2285,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_",
|
||||
@ -2308,18 +2333,17 @@
|
||||
"Invoke-WPFTweakPS7 -action \"PS5\""
|
||||
]
|
||||
},
|
||||
"WPFTweaksOO": {
|
||||
"Content": "Run OO Shutup",
|
||||
"Description": "Runs OO Shutup and applies the recommended Tweaks. https://www.oo-software.com/en/shutup10",
|
||||
"WPFTweaksPowershell7Tele": {
|
||||
"Content": "Disable Powershell 7 Telemetry",
|
||||
"Description": "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.",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a009_",
|
||||
"ToolTip": "Runs OO Shutup and applies the recommended Tweaks https://www.oo-software.com/en/shutup10",
|
||||
"InvokeScript": [
|
||||
"Invoke-WPFOOSU -action \"recommended\""
|
||||
"[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')"
|
||||
],
|
||||
"UndoScript": [
|
||||
"Invoke-WPFOOSU -action \"undo\""
|
||||
"[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '', 'Machine')"
|
||||
]
|
||||
},
|
||||
"WPFTweaksStorage": {
|
||||
@ -2337,17 +2361,15 @@
|
||||
},
|
||||
"WPFTweaksRemoveEdge": {
|
||||
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
||||
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
||||
"Description": "Removes MS Edge when it gets reinstalled by updates. Credit: AveYo",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a029_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
||||
|
||||
curl.exe -s \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -o $ENV:temp\\edgeremoval.bat
|
||||
Invoke-WebRequest -Uri \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -OutFile \"$ENV:TEMP\\edgeremoval.bat\"
|
||||
Start-Process $ENV:temp\\edgeremoval.bat
|
||||
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
@ -2403,12 +2425,12 @@
|
||||
"WPFTweaksDisableLMS1": {
|
||||
"Content": "Disable Intel MM (vPro LMS)",
|
||||
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
||||
"category": "Essential Tweaks",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a0015_",
|
||||
"Order": "a026_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Write-Host \"Kill OneDrive process\"
|
||||
Write-Host \"Kill LMS\"
|
||||
$serviceName = \"LMS\"
|
||||
Write-Host \"Stopping and disabling service: $serviceName\"
|
||||
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue;
|
||||
@ -2452,39 +2474,45 @@
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Write-Host \"Install Microsoft Edge\"
|
||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
||||
Write-Host \"LMS vPro needs to be redownloaded from intel.com\"
|
||||
|
||||
"
|
||||
]
|
||||
},
|
||||
"WPFTweaksRemoveOnedrive": {
|
||||
"Content": "Remove OneDrive",
|
||||
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
|
||||
"Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a030_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
|
||||
Write-Host \"Kill OneDrive process\"
|
||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
||||
taskkill.exe /F /IM \"explorer.exe\"
|
||||
|
||||
Write-Host \"Copy all OneDrive to Root UserProfile\"
|
||||
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($env:USERPROFILE.TrimEnd())\\OneDrive' '$($env:USERPROFILE.TrimEnd())\\' /e /xj\" -NoNewWindow -Wait
|
||||
|
||||
Write-Host \"Remove OneDrive\"
|
||||
Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --force --silent Microsoft.OneDrive \" -NoNewWindow -Wait
|
||||
$OneDrivePath = $($env:OneDrive)
|
||||
Write-Host \"Removing OneDrive\"
|
||||
$regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\"
|
||||
if (Test-Path $regPath){
|
||||
$OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\"
|
||||
$OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \")
|
||||
Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait
|
||||
}
|
||||
else{
|
||||
Write-Host \"Onedrive dosn't seem to be installed anymore\" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
# Check if OneDrive got Uninstalled
|
||||
if (-not (Test-Path $regPath)){
|
||||
Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\"
|
||||
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait
|
||||
|
||||
Write-Host \"Removing OneDrive leftovers\"
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\"
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\"
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\"
|
||||
reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\OneDrive\" -f
|
||||
# check if directory is empty before removing:
|
||||
If ((Get-ChildItem \"$env:userprofile\\OneDrive\" -Recurse | Measure-Object).Count -eq 0) {
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:userprofile\\OneDrive\"
|
||||
If ((Get-ChildItem \"$OneDrivePath\" -Recurse | Measure-Object).Count -eq 0) {
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\"
|
||||
}
|
||||
|
||||
Write-Host \"Remove Onedrive from explorer sidebar\"
|
||||
@ -2527,11 +2555,17 @@
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
||||
Write-Host \"Restarting explorer\"
|
||||
taskkill.exe /F /IM \"explorer.exe\"
|
||||
Start-Process \"explorer.exe\"
|
||||
|
||||
Write-Host \"Waiting for explorer to complete loading\"
|
||||
Write-Host \"Please Note - OneDrive folder may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
||||
Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
||||
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
|
||||
Start-Sleep 5
|
||||
}
|
||||
else{
|
||||
Write-Host \"Something went Wrong during the Unistallation of OneDrive\" -ForegroundColor Red
|
||||
}
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
@ -2714,7 +2748,7 @@
|
||||
},
|
||||
"WPFTweaksBlockAdobeNet": {
|
||||
"Content": "Adobe Network Block",
|
||||
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. ",
|
||||
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a021_",
|
||||
@ -2977,58 +3011,84 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksEnableipsix": {
|
||||
"Content": "Enable IPv6",
|
||||
"Description": "Enables IPv6.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a023_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||
"Name": "DisabledComponents",
|
||||
"Value": "0",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
||||
],
|
||||
"UndoScript": [
|
||||
"Disable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
||||
]
|
||||
},
|
||||
"WPFToggleDarkMode": {
|
||||
"Content": "Dark Theme",
|
||||
"Content": "Enable Dark Theme for Windows",
|
||||
"Description": "Enable/Disable Dark Mode.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a060_",
|
||||
"Order": "a100_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleBingSearch": {
|
||||
"Content": "Bing Search in Start Menu",
|
||||
"Content": "Enable Bing Search in Start Menu",
|
||||
"Description": "If enable then includes web search results from Bing in your Start Menu search.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a061_",
|
||||
"Order": "a101_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleNumLock": {
|
||||
"Content": "NumLock on Startup",
|
||||
"Content": "Enable NumLock on Startup",
|
||||
"Description": "Toggle the Num Lock key state when your computer starts.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a062_",
|
||||
"Order": "a102_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleVerboseLogon": {
|
||||
"Content": "Verbose Logon Messages",
|
||||
"Content": "Enable Verbose Messages During Logon",
|
||||
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a063_",
|
||||
"Order": "a103_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapWindow": {
|
||||
"Content": "Enable Snap Window",
|
||||
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a104_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapFlyout": {
|
||||
"Content": "Enable Snap Assist Flyout",
|
||||
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a105_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapSuggestion": {
|
||||
"Content": "Enable Snap Assist Suggestion",
|
||||
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a106_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleMouseAcceleration": {
|
||||
"Content": "Enable Mouse Acceleration",
|
||||
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a107_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleStickyKeys": {
|
||||
"Content": "Enable Sticky Keys",
|
||||
"Description": "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.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"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": {
|
||||
@ -3036,63 +3096,47 @@
|
||||
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a064_",
|
||||
"Order": "a201_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapWindow": {
|
||||
"Content": "Snap Window",
|
||||
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
||||
"WPFToggleTaskbarSearch": {
|
||||
"Content": "Show Search Button in Taskbar",
|
||||
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a065_",
|
||||
"Order": "a202_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapFlyout": {
|
||||
"Content": "Snap Assist Flyout",
|
||||
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
|
||||
"WPFToggleTaskView": {
|
||||
"Content": "Show Task View Button in Taskbar",
|
||||
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a066_",
|
||||
"Order": "a203_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapSuggestion": {
|
||||
"Content": "Snap Assist Suggestion",
|
||||
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
"Content": "Show Widgets Button in Taskbar",
|
||||
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a067_",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleMouseAcceleration": {
|
||||
"Content": "Mouse Acceleration",
|
||||
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
|
||||
"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": "a068_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleStickyKeys": {
|
||||
"Content": "Sticky Keys",
|
||||
"Description": "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.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a069_",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
"Content": "Customize OO Shutup Tweaks",
|
||||
"Content": "Run OO Shutup 10",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a039_",
|
||||
"Type": "220"
|
||||
},
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
"Content": "Taskbar Widgets",
|
||||
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a068_",
|
||||
"Type": "Toggle"
|
||||
"Type": "Button"
|
||||
},
|
||||
"WPFchangedns": {
|
||||
"Content": "DNS",
|
||||
@ -3107,34 +3151,37 @@
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a041_",
|
||||
"Type": "160"
|
||||
"Type": "Button"
|
||||
},
|
||||
"WPFUndoall": {
|
||||
"Content": "Undo Selected Tweaks",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a042_",
|
||||
"Type": "160"
|
||||
"Type": "Button"
|
||||
},
|
||||
"WPFAddUltPerf": {
|
||||
"Content": "Add and Activate Ultimate Performance Profile",
|
||||
"category": "Performance Plans",
|
||||
"panel": "2",
|
||||
"Order": "a080_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFRemoveUltPerf": {
|
||||
"Content": "Remove Ultimate Performance Profile",
|
||||
"category": "Performance Plans",
|
||||
"panel": "2",
|
||||
"Order": "a081_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFWinUtilShortcut": {
|
||||
"Content": "Create WinUtil Shortcut",
|
||||
"category": "Shortcuts",
|
||||
"panel": "2",
|
||||
"Order": "a082_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
}
|
||||
}
|
||||
|
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.
|
||||

|
||||
|
||||
### 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://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.
|
||||

|
||||
* Once you have selected the programs you wish to install click the select Install/Upgrade Selected button as seen below.
|
||||

|
||||
|
||||
#### 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.
|
||||

|
||||
* Once you have selected the programs you wish to uninstall click the select Uninstall Selected button as seen below.
|
||||

|
||||
|
||||
#### 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.
|
||||

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

|
||||
|
||||
### 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.
|
||||
|
||||

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

|
||||
* Click on the Settings cog in the upper right corner and chose Export, chose file file and location, this will export the setting file.
|
||||

|
||||
* 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.
|
@ -2,26 +2,92 @@ function ConvertTo-Icon {
|
||||
<#
|
||||
|
||||
.DESCRIPTION
|
||||
This function will convert PNG to ICO file
|
||||
This function will convert BMP, GIF, EXIF, JPG, PNG and TIFF to ICO file
|
||||
|
||||
.PARAMETER bitmapPath
|
||||
The file path to bitmap image to make '.ico' file out of.
|
||||
Supported file types according to Microsoft Documentation is the following:
|
||||
BMP, GIF, EXIF, JPG, PNG and TIFF.
|
||||
|
||||
.PARAMETER iconPath
|
||||
The file path to write the new '.ico' resource.
|
||||
|
||||
.PARAMETER overrideIconFile
|
||||
An optional boolean Parameter that makes the function overrides
|
||||
the Icon File Path if the file exists. Defaults to $true.
|
||||
|
||||
.EXAMPLE
|
||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
||||
try {
|
||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath "$env:TEMP\cttlogo.ico"
|
||||
} catch [System.IO.FileNotFoundException] {
|
||||
# Handle the thrown exception here...
|
||||
}
|
||||
|
||||
This Example makes a '.ico' file at "$env:TEMP\cttlogo.ico" File Path using the bitmap file
|
||||
found in "$env:TEMP\cttlogo.png", the function overrides the '.ico' File if it's found.
|
||||
this function will throw a FileNotFound Exception at the event of not finding the provided bitmap File Path.
|
||||
|
||||
.EXAMPLE
|
||||
try {
|
||||
ConvertTo-Icon "$env:TEMP\cttlogo.png" "$env:TEMP\cttlogo.ico"
|
||||
} catch [System.IO.FileNotFoundException] {
|
||||
# Handle the thrown exception here...
|
||||
}
|
||||
|
||||
This Example is the same as Example 1, but uses Positional Parameters instead.
|
||||
|
||||
.EXAMPLE
|
||||
if (Test-Path "$env:TEMP\cttlogo.png") {
|
||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath "$env:TEMP\cttlogo.ico"
|
||||
}
|
||||
|
||||
This Example is same as Example 1, but checks if the bitmap File exists before calling 'ConvertTo-Icon' Function.
|
||||
This's the recommended way of using this function, as it doesn't require any try-catch blocks.
|
||||
|
||||
.EXAMPLE
|
||||
try {
|
||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath "$env:TEMP\cttlogo.ico" -overrideIconFile $false
|
||||
} catch [System.IO.FileNotFoundException] {
|
||||
# Handle the thrown exception here...
|
||||
}
|
||||
|
||||
This Example make use of '-overrideIconFile' Optional Parameter, the default for this paramter is $true.
|
||||
By doing '-overrideIconFile $false', the 'ConvertTo-Icon' function will raise an exception that needs to be catched throw a 'catch' Code Block,
|
||||
otherwise it'll crash the running PowerShell instance/process.
|
||||
|
||||
#>
|
||||
param( [Parameter(Mandatory=$true)]
|
||||
$bitmapPath,
|
||||
$iconPath = "$env:temp\newicon.ico"
|
||||
param(
|
||||
[Parameter(Mandatory=$true, position=0)]
|
||||
[string]$bitmapPath,
|
||||
[Parameter(Mandatory=$true, position=1)]
|
||||
[string]$iconPath,
|
||||
[Parameter(position=2)]
|
||||
[bool]$overrideIconFile = $true
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName System.Drawing
|
||||
|
||||
if (Test-Path $bitmapPath) {
|
||||
if ((Test-Path $iconPath) -AND ($overrideIconFile -eq $false)) {
|
||||
Write-Host "[ConvertTo-Icon] Icon File is found at '$iconPath', and the 'overrideIconFile' Parameter is set to '$overrideIconFile'. Skipping the bitmap to icon convertion..." -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
|
||||
# Load bitmap file into memory, and make an Icon version out of it
|
||||
$b = [System.Drawing.Bitmap]::FromFile($bitmapPath)
|
||||
$icon = [System.Drawing.Icon]::FromHandle($b.GetHicon())
|
||||
|
||||
# Create the folder for the new icon file if it doesn't exists
|
||||
$iconFolder = (New-Object System.IO.FileInfo($iconPath)).Directory.FullName
|
||||
[System.IO.Directory]::CreateDirectory($iconFolder) | Out-Null
|
||||
|
||||
# Write the Icon File and do some cleaning-up
|
||||
$file = New-Object System.IO.FileStream($iconPath, 'OpenOrCreate')
|
||||
$icon.Save($file)
|
||||
$file.Close()
|
||||
$icon.Dispose()
|
||||
#explorer "/SELECT,$iconpath"
|
||||
}
|
||||
else { Write-Warning "$BitmapPath does not exist" }
|
||||
else {
|
||||
throw [System.IO.FileNotFoundException] "[ConvertTo-Icon] The provided bitmap File Path is not found at '$bitmapPath'."
|
||||
}
|
||||
}
|
@ -30,58 +30,5 @@ function Get-LocalizedYesNo {
|
||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
||||
# Return the array of characters
|
||||
return $charactersArray
|
||||
}
|
||||
|
||||
|
||||
function Get-LocalizedYesNoTakeown {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
This function runs takeown.exe and captures its output to extract yes no in a localized Windows
|
||||
|
||||
.DESCRIPTION
|
||||
The function retrieves lines from the output of takeown.exe until there are at least 2 characters
|
||||
captured in a specific format, such as "Yes=<first character>, No=<second character>".
|
||||
|
||||
.EXAMPLE
|
||||
$yesNoArray = Get-LocalizedYesNo
|
||||
Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])"
|
||||
#>
|
||||
|
||||
# Run takeown.exe and capture its output
|
||||
$takeownOutput = & takeown.exe /? | Out-String
|
||||
|
||||
# Parse the output and retrieve lines until there are at least 2 characters in the array
|
||||
$found = $false
|
||||
$charactersArray = @()
|
||||
foreach ($line in $takeownOutput -split "`r`n")
|
||||
{
|
||||
# skip everything before /D flag help
|
||||
if ($found)
|
||||
{
|
||||
# now that /D is found start looking for a single character in double quotes
|
||||
# in help text there is another string in double quotes but it is not a single character
|
||||
$regexPattern = '"([a-zA-Z])"'
|
||||
|
||||
$charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value }
|
||||
|
||||
# if ($charactersArray.Count -gt 0) {
|
||||
# Write-Output "Extracted symbols: $($matches -join ', ')"
|
||||
# } else {
|
||||
# Write-Output "No matches found."
|
||||
# }
|
||||
|
||||
if ($charactersArray.Count -ge 2)
|
||||
{
|
||||
break
|
||||
}
|
||||
}
|
||||
elseif ($line -match "/D ")
|
||||
{
|
||||
$found = $true
|
||||
}
|
||||
}
|
||||
|
||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
||||
# Return the array of characters
|
||||
return $charactersArray
|
||||
|
||||
}
|
@ -6,8 +6,10 @@ function Get-TabXaml {
|
||||
It takes the tabname and the number of columns to display the applications in as input and returns the XAML for the tab as output
|
||||
.PARAMETER tabname
|
||||
The name of the tab to generate XAML for
|
||||
Note: the 'tabname' parameter must equal one of the json files found in $sync.configs variable
|
||||
Otherwise, it'll throw an exception
|
||||
.PARAMETER columncount
|
||||
The number of columns to display the applications in
|
||||
The number of columns to display the applications in, default is 0
|
||||
.OUTPUTS
|
||||
The XAML for the tab
|
||||
.EXAMPLE
|
||||
@ -15,10 +17,20 @@ function Get-TabXaml {
|
||||
#>
|
||||
|
||||
|
||||
param( [Parameter(Mandatory=$true)]
|
||||
$tabname,
|
||||
$columncount = 0
|
||||
param(
|
||||
[Parameter(Mandatory, position=0)]
|
||||
[string]$tabname,
|
||||
|
||||
[Parameter(position=1)]
|
||||
[ValidateRange(0,10)] # 10 panels as max number is more then enough
|
||||
[int]$columncount = 0
|
||||
)
|
||||
|
||||
# Validate tabname
|
||||
if ($sync.configs.$tabname -eq $null) {
|
||||
throw "Invalid parameter passed, can't find '$tabname' in '`$sync.configs' variable, please double check any calls to 'Get-TabXaml' function."
|
||||
}
|
||||
|
||||
$organizedData = @{}
|
||||
# Iterate through JSON data and organize by panel and category
|
||||
foreach ($appName in $sync.configs.$tabname.PSObject.Properties.Name) {
|
||||
@ -39,6 +51,7 @@ function Get-TabXaml {
|
||||
ComboItems = $appInfo.ComboItems
|
||||
# Checked is the property to set startup checked status of checkbox (Default is false)
|
||||
Checked = $appInfo.Checked
|
||||
ButtonWidth = $appInfo.ButtonWidth
|
||||
}
|
||||
|
||||
if (-not $organizedData.ContainsKey($appObject.panel)) {
|
||||
@ -53,6 +66,21 @@ function Get-TabXaml {
|
||||
# Add Order property to keep the original order of tweaks and features
|
||||
$organizedData[$appObject.panel][$appInfo.Category]["$($appInfo.order)$appName"] = $appObject
|
||||
}
|
||||
|
||||
# Same tab amount in last line of 'inputXML.xaml' file
|
||||
# TODO: Get the base repeat (amount) of tabs from last line (or even lines)
|
||||
# so it can dynamicly react to whatever is before this generated XML string.
|
||||
# .. may be solve this even before calling this function, and pass the result as a parameter?
|
||||
$tab_repeat = 7
|
||||
$spaces_per_tab = 4 # The convenction used across the code base
|
||||
$tab_as_spaces = $(" " * $spaces_per_tab)
|
||||
$precal_indent = $($tab_as_spaces * $tab_repeat)
|
||||
$precal_indent_p1 = $($tab_as_spaces * ($tab_repeat + 1))
|
||||
$precal_indent_p2 = $($tab_as_spaces * ($tab_repeat + 2))
|
||||
$precal_indent_m1 = $($tab_as_spaces * ($tab_repeat - 1))
|
||||
$precal_indent_m2 = $($tab_as_spaces * ($tab_repeat - 2))
|
||||
|
||||
# Calculate the needed number of panels
|
||||
$panelcount = 0
|
||||
$paneltotal = $organizedData.Keys.Count
|
||||
if ($columncount -gt 0) {
|
||||
@ -61,19 +89,27 @@ function Get-TabXaml {
|
||||
$paneltotal = $columncount
|
||||
}
|
||||
# add ColumnDefinitions to evenly draw colums
|
||||
$blockXml="<Grid.ColumnDefinitions>`n"+("<ColumnDefinition Width=""*""/>`n"*($paneltotal))+"</Grid.ColumnDefinitions>`n"
|
||||
# Iterate through organizedData by panel, category, and application
|
||||
$blockXml = "<Grid.ColumnDefinitions>"
|
||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat) +
|
||||
"<ColumnDefinition Width=""*""/>") * $paneltotal
|
||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * ($tab_repeat - 1))) +
|
||||
"</Grid.ColumnDefinitions>" + "`r`n"
|
||||
|
||||
# Iterate through 'organizedData' by panel, category, and application
|
||||
$count = 0
|
||||
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
||||
$blockXml += $precal_indent_m1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
||||
$blockXml += $precal_indent + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
||||
$panelcount++
|
||||
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
||||
$count++
|
||||
if ($columncount -gt 0) {
|
||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||
if ($panelcount -eq $panelcount2 ) {
|
||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
||||
$blockXml += $precal_indent_p2 + "</StackPanel>" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 + "</Border>" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
||||
$blockXml += $precal_indent_p2 + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
||||
$panelcount++
|
||||
}
|
||||
}
|
||||
@ -83,49 +119,99 @@ function Get-TabXaml {
|
||||
|
||||
$categorycontent = $($category -replace '^.__', '')
|
||||
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
|
||||
$blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`n"
|
||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat)) +
|
||||
"<Label Name=""$categoryname"" Content=""$categorycontent""" + " " +
|
||||
"FontSize=""{FontSizeHeading}"" FontFamily=""{HeaderFontFamily}""/>" + "`r`n" + "`r`n"
|
||||
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
||||
foreach ($appName in $sortedApps) {
|
||||
$count++
|
||||
|
||||
if ($columncount -gt 0) {
|
||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||
# Verify the indentation actually works...
|
||||
if ($panelcount -eq $panelcount2 ) {
|
||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"</StackPanel>" + "`r`n"
|
||||
$blockXml += $precal_indent_m2 +
|
||||
"</Border>" + "`r`n"
|
||||
$blockXml += $precal_indent_m2 +
|
||||
"<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
||||
$panelcount++
|
||||
}
|
||||
}
|
||||
|
||||
$appInfo = $organizedData[$panel][$category][$appName]
|
||||
if ("Toggle" -eq $appInfo.Type) {
|
||||
$blockXml += "<DockPanel LastChildFill=`"True`">`n<Label Content=`"$($appInfo.Content)`" ToolTip=`"$($appInfo.Description)`" HorizontalAlignment=`"Left`"/>`n"
|
||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`" HorizontalAlignment=`"Right`"/>`n</DockPanel>`n"
|
||||
} elseif ("Combobox" -eq $appInfo.Type) {
|
||||
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`n"
|
||||
$blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`n"
|
||||
$addfirst="IsSelected=`"True`""
|
||||
switch ($appInfo.Type) {
|
||||
"Toggle" {
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"<DockPanel LastChildFill=""True"">" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<CheckBox Name=""$($appInfo.Name)"" Style=""{StaticResource ColorfulToggleSwitchStyle}"" Margin=""4,0""" + " " +
|
||||
"HorizontalAlignment=""Right"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<Label Content=""$($appInfo.Content)"" ToolTip=""$($appInfo.Description)""" + " " +
|
||||
"HorizontalAlignment=""Left"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"</DockPanel>" + "`r`n"
|
||||
}
|
||||
|
||||
"Combobox" {
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"<StackPanel Orientation=""Horizontal"" Margin=""0,5,0,0"">" + "`r`n"
|
||||
$blockXml += $precal_indent + "<Label Content=""$($appInfo.Content)"" HorizontalAlignment=""Left""" + " " +
|
||||
"VerticalAlignment=""Center"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<ComboBox Name=""$($appInfo.Name)"" Height=""32"" Width=""186"" HorizontalAlignment=""Left""" + " " +
|
||||
"VerticalAlignment=""Center"" Margin=""5,5"" FontSize=""{FontSize}"">" + "`r`n"
|
||||
|
||||
$addfirst="IsSelected=""True"""
|
||||
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
||||
$blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`n"
|
||||
$blockXml += $precal_indent_p1 +
|
||||
"<ComboBoxItem $addfirst Content=""$comboitem"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$addfirst=""
|
||||
}
|
||||
$blockXml += "</ComboBox>`n</StackPanel>"
|
||||
# If it is a digit, type is button and button length is digits
|
||||
} elseif ($appInfo.Type -match "^[\d\.]+$") {
|
||||
$blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`n"
|
||||
|
||||
$blockXml += $precal_indent_p1 + "</ComboBox>" + "`r`n"
|
||||
$blockXml += $precal_indent + "</StackPanel>" + "`r`n"
|
||||
}
|
||||
|
||||
"Button" {
|
||||
if ($appInfo.ButtonWidth -ne $null) {
|
||||
$ButtonWidthStr = "Width=""$($appInfo.ButtonWidth)"""
|
||||
}
|
||||
$blockXml += $precal_indent +
|
||||
"<Button Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""" + " " +
|
||||
"HorizontalAlignment=""Left"" Margin=""5"" Padding=""20,5"" $($ButtonWidthStr)/>" + "`r`n"
|
||||
}
|
||||
|
||||
# else it is a checkbox
|
||||
default {
|
||||
$checkedStatus = If ($appInfo.Checked -eq $null) {""} Else {" IsChecked=""$($appInfo.Checked)"""}
|
||||
if ($appInfo.Link -eq $null) {
|
||||
$blockXml += $precal_indent +
|
||||
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus) Margin=""5,0""" + " " +
|
||||
"ToolTip=""$($appInfo.Description)""/>" + "`r`n"
|
||||
} else {
|
||||
$checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
|
||||
if ($null -eq $appInfo.Link)
|
||||
{
|
||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`n"
|
||||
}
|
||||
else
|
||||
{
|
||||
$blockXml += "<StackPanel Orientation=""Horizontal"">`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`n</StackPanel>`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<StackPanel Orientation=""Horizontal"">" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 +
|
||||
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus)" + " " +
|
||||
"ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/>" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 +
|
||||
"<TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)""" + " " +
|
||||
"ToolTip=""$($appInfo.Link)""/>" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"</StackPanel>" + "`r`n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
||||
}
|
||||
|
||||
$blockXml += $precal_indent_p1 + "</StackPanel>" + "`r`n"
|
||||
$blockXml += $precal_indent + "</Border>" + "`r`n"
|
||||
}
|
||||
return ($blockXml)
|
||||
}
|
||||
|
@ -98,6 +98,15 @@ Function Get-WinUtilToggleStatus {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
if($ToggleSwitch -eq "WPFToggleTaskbarSearch"){
|
||||
$SearchButton = (Get-ItemProperty -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search").SearchboxTaskbarMode
|
||||
if($SearchButton -eq 0){
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
return $true
|
||||
}
|
||||
}
|
||||
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
|
||||
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
|
||||
if($StickyKeys -eq 58){
|
||||
@ -107,6 +116,26 @@ Function Get-WinUtilToggleStatus {
|
||||
return $true
|
||||
}
|
||||
}
|
||||
if ($ToggleSwitch -eq "WPFToggleTaskView") {
|
||||
$TaskView = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').ShowTaskViewButton
|
||||
if($TaskView -eq 0){
|
||||
return $false
|
||||
}
|
||||
else{
|
||||
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) {
|
||||
@ -116,4 +145,13 @@ Function Get-WinUtilToggleStatus {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,9 +11,7 @@ function Get-WinUtilVariables {
|
||||
[Parameter()]
|
||||
[string[]]$Type
|
||||
)
|
||||
|
||||
$keys = $sync.keys | Where-Object { $_ -like "WPF*" }
|
||||
|
||||
$keys = ($sync.keys).where{ $_ -like "WPF*" }
|
||||
if ($Type) {
|
||||
$output = $keys | ForEach-Object {
|
||||
Try {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,19 +1,3 @@
|
||||
function Invoke-MicroWin-Helper {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
checking unit tests
|
||||
|
||||
.PARAMETER Name
|
||||
no parameters
|
||||
|
||||
.EXAMPLE
|
||||
placeholder
|
||||
|
||||
#>
|
||||
|
||||
}
|
||||
|
||||
function Test-CompatibleImage() {
|
||||
<#
|
||||
|
||||
@ -175,8 +159,14 @@ function Remove-ProvisionedPackages([switch] $keepSecurity = $false)
|
||||
{
|
||||
$status = "Removing Provisioned $($appx.PackageName)"
|
||||
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
||||
try {
|
||||
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
||||
}
|
||||
catch {
|
||||
Write-Host "Application $($appx.PackageName) could not be removed"
|
||||
continue
|
||||
}
|
||||
}
|
||||
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
||||
}
|
||||
else
|
||||
|
@ -58,6 +58,9 @@ Function Invoke-WinUtilCurrentSystem {
|
||||
$values += $False
|
||||
}
|
||||
}
|
||||
else {
|
||||
$values += $False
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,29 +1,21 @@
|
||||
function Invoke-WinUtilGPU {
|
||||
$gpuInfo = Get-CimInstance Win32_VideoController
|
||||
|
||||
foreach ($gpu in $gpuInfo) {
|
||||
$gpuName = $gpu.Name
|
||||
if ($gpuName -like "*NVIDIA*") {
|
||||
return $true # NVIDIA GPU found
|
||||
}
|
||||
}
|
||||
# GPUs to blacklist from using Demanding Theming
|
||||
$lowPowerGPUs = (
|
||||
"*NVIDIA GeForce*M*",
|
||||
"*NVIDIA GeForce*Laptop*",
|
||||
"*NVIDIA GeForce*GT*",
|
||||
"*AMD Radeon(TM)*",
|
||||
"*UHD*"
|
||||
)
|
||||
|
||||
foreach ($gpu in $gpuInfo) {
|
||||
$gpuName = $gpu.Name
|
||||
if ($gpuName -like "*AMD Radeon RX*") {
|
||||
return $true # AMD GPU Found
|
||||
}
|
||||
}
|
||||
foreach ($gpu in $gpuInfo) {
|
||||
$gpuName = $gpu.Name
|
||||
if ($gpuName -like "*UHD*") {
|
||||
return $false # Intel Intergrated GPU Found
|
||||
}
|
||||
}
|
||||
foreach ($gpu in $gpuInfo) {
|
||||
$gpuName = $gpu.Name
|
||||
if ($gpuName -like "*AMD Radeon(TM)*") {
|
||||
return $false # AMD Intergrated GPU Found
|
||||
foreach ($gpuPattern in $lowPowerGPUs){
|
||||
if ($gpu.Name -like $gpuPattern) {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
}
|
||||
return $true
|
||||
}
|
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
|
||||
}
|
||||
}
|
@ -15,6 +15,7 @@ function Invoke-WinUtilNumLock {
|
||||
Write-Host "Disabling Numlock on startup"
|
||||
$value = 0
|
||||
}
|
||||
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
||||
$Path = "HKU:\.Default\Control Panel\Keyboard"
|
||||
Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value
|
||||
}
|
||||
|
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-WinUtilTaskView.ps1
Normal file
@ -0,0 +1,34 @@
|
||||
function Invoke-WinUtilTaskView {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Task View
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Task View
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
Try{
|
||||
if ($Enabled -eq $false){
|
||||
Write-Host "Enabling Task View"
|
||||
$value = 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Disabling Task View"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name ShowTaskViewButton -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
|
||||
}
|
||||
}
|
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
|
||||
}
|
||||
}
|
34
functions/private/Invoke-WinUtilTaskbarSearch.ps1
Normal file
@ -0,0 +1,34 @@
|
||||
function Invoke-WinUtilTaskbarSearch {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Taskbar Search Button.
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Taskbar Search Button.
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
Try{
|
||||
if ($Enabled -eq $false){
|
||||
Write-Host "Enabling Search Button"
|
||||
$value = 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Disabling Search Button"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search\"
|
||||
Set-ItemProperty -Path $Path -Name SearchboxTaskbarMode -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,7 @@ function Set-WinUtilDNS {
|
||||
}
|
||||
Else{
|
||||
Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ServerAddresses ("$($sync.configs.dns.$DNSProvider.Primary)", "$($sync.configs.dns.$DNSProvider.Secondary)")
|
||||
Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ServerAddresses ("$($sync.configs.dns.$DNSProvider.Primary6)", "$($sync.configs.dns.$DNSProvider.Secondary6)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,18 @@ function Show-CustomDialog {
|
||||
.PARAMETER Height
|
||||
The height of the custom dialog window.
|
||||
|
||||
.PARAMETER FontSize
|
||||
The Font Size for text shown inside the custom dialog window.
|
||||
|
||||
.PARAMETER HeaderFontSize
|
||||
The Font Size for the Header of the custom dialog window.
|
||||
|
||||
.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
|
||||
|
||||
@ -22,7 +34,11 @@ function Show-CustomDialog {
|
||||
param(
|
||||
[string]$Message,
|
||||
[int]$Width = 300,
|
||||
[int]$Height = 200
|
||||
[int]$Height = 200,
|
||||
[int]$FontSize = 10,
|
||||
[int]$HeaderFontSize = 14,
|
||||
[int]$IconSize = 25,
|
||||
[bool]$EnableScroll = $false
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
@ -48,6 +64,7 @@ function Show-CustomDialog {
|
||||
$dialog.Foreground = $foregroundColor
|
||||
$dialog.Background = $backgroundColor
|
||||
$dialog.FontFamily = $font
|
||||
$dialog.FontSize = $FontSize
|
||||
|
||||
# Create a Border for the green edge with rounded corners
|
||||
$border = New-Object Windows.Controls.Border
|
||||
@ -111,8 +128,8 @@ function Show-CustomDialog {
|
||||
[Windows.Controls.Grid]::SetRow($stackPanel, 0) # Set the row to the second row (0-based index)
|
||||
|
||||
$viewbox = New-Object Windows.Controls.Viewbox
|
||||
$viewbox.Width = 25
|
||||
$viewbox.Height = 25
|
||||
$viewbox.Width = $IconSize
|
||||
$viewbox.Height = $IconSize
|
||||
|
||||
# Combine the paths into a single string
|
||||
# $cttLogoPath = @"
|
||||
@ -174,24 +191,82 @@ $cttLogoPath = @"
|
||||
# Add "Winutil" text
|
||||
$winutilTextBlock = New-Object Windows.Controls.TextBlock
|
||||
$winutilTextBlock.Text = "Winutil"
|
||||
$winutilTextBlock.FontSize = 18 # Adjust font size as needed
|
||||
$winutilTextBlock.FontSize = $HeaderFontSize
|
||||
$winutilTextBlock.Foreground = $foregroundColor
|
||||
$winutilTextBlock.Margin = New-Object Windows.Thickness(10, 5, 10, 5) # Add margins around the text block
|
||||
$stackPanel.Children.Add($winutilTextBlock)
|
||||
|
||||
# Add TextBlock for information with text wrapping and margins
|
||||
$messageTextBlock = New-Object Windows.Controls.TextBlock
|
||||
$messageTextBlock.Text = $Message
|
||||
$messageTextBlock.TextWrapping = [Windows.TextWrapping]::Wrap # Enable text wrapping
|
||||
$messageTextBlock.HorizontalAlignment = [Windows.HorizontalAlignment]::Left
|
||||
$messageTextBlock.VerticalAlignment = [Windows.VerticalAlignment]::Top
|
||||
$messageTextBlock.Margin = New-Object Windows.Thickness(10) # Add margins around the text block
|
||||
|
||||
# Define the Regex to find hyperlinks formatted as HTML <a> tags
|
||||
$regex = [regex]::new('<a href="([^"]+)">([^<]+)</a>')
|
||||
$lastPos = 0
|
||||
|
||||
# Iterate through each match and add regular text and hyperlinks
|
||||
foreach ($match in $regex.Matches($Message)) {
|
||||
# Add the text before the hyperlink, if any
|
||||
$textBefore = $Message.Substring($lastPos, $match.Index - $lastPos)
|
||||
if ($textBefore.Length -gt 0) {
|
||||
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($textBefore)))
|
||||
}
|
||||
|
||||
# Create and add the hyperlink
|
||||
$hyperlink = New-Object Windows.Documents.Hyperlink
|
||||
$hyperlink.NavigateUri = New-Object System.Uri($match.Groups[1].Value)
|
||||
$hyperlink.Inlines.Add($match.Groups[2].Value)
|
||||
$hyperlink.TextDecorations = [Windows.TextDecorations]::None # Remove underline
|
||||
$hyperlink.Foreground = $foregroundColor
|
||||
$hyperlink.Add_Click({
|
||||
param($sender, $args)
|
||||
Start-Process $sender.NavigateUri.AbsoluteUri
|
||||
})
|
||||
$hyperlink.Add_MouseEnter({
|
||||
param($sender, $args)
|
||||
$sender.Foreground = [Windows.Media.Brushes]::LightGray
|
||||
})
|
||||
$hyperlink.Add_MouseLeave({
|
||||
param($sender, $args)
|
||||
$sender.Foreground = $foregroundColor
|
||||
})
|
||||
|
||||
$messageTextBlock.Inlines.Add($hyperlink)
|
||||
|
||||
# Update the last position
|
||||
$lastPos = $match.Index + $match.Length
|
||||
}
|
||||
|
||||
# Add any remaining text after the last hyperlink
|
||||
if ($lastPos -lt $Message.Length) {
|
||||
$textAfter = $Message.Substring($lastPos)
|
||||
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($textAfter)))
|
||||
}
|
||||
|
||||
# If no matches, add the entire message as a run
|
||||
if ($regex.Matches($Message).Count -eq 0) {
|
||||
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($Message)))
|
||||
}
|
||||
|
||||
# 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
|
||||
$okButton.Content = "OK"
|
||||
$okButton.FontSize = $FontSize
|
||||
$okButton.Width = 80
|
||||
$okButton.Height = 30
|
||||
$okButton.HorizontalAlignment = [Windows.HorizontalAlignment]::Center
|
||||
|
@ -26,9 +26,9 @@ function Invoke-WPFButton {
|
||||
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
||||
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
||||
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||
"WPFOOSUbutton" {Invoke-WPFOOSU -action "customize"}
|
||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
||||
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
||||
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enable"}
|
||||
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disable"}
|
||||
"WPFundoall" {Invoke-WPFundoall}
|
||||
"WPFFeatureInstall" {Invoke-WPFFeatureInstall}
|
||||
"WPFPanelDISM" {Invoke-WPFPanelDISM}
|
||||
|
@ -171,13 +171,14 @@ public class PowerManagement {
|
||||
Remove-Features -keepDefender:$keepDefender
|
||||
Write-Host "Removing features complete!"
|
||||
|
||||
Write-Host "Removing Appx Bloat"
|
||||
if (!$keepPackages)
|
||||
{
|
||||
Write-Host "Removing OS packages"
|
||||
Remove-Packages
|
||||
}
|
||||
if (!$keepProvisionedPackages)
|
||||
{
|
||||
Write-Host "Removing Appx Bloat"
|
||||
Remove-ProvisionedPackages -keepSecurity:$keepDefender
|
||||
}
|
||||
|
||||
@ -310,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
|
||||
|
@ -1,43 +1,20 @@
|
||||
function Invoke-WPFOOSU {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Downloads and runs OO Shutup 10 with or without config files
|
||||
.PARAMETER action
|
||||
Specifies how OOSU should be started
|
||||
customize: Opens the OOSU GUI
|
||||
recommended: Loads and applies the recommended OOSU policies silently
|
||||
undo: Resets all policies to factory silently
|
||||
Downloads and runs OO Shutup 10
|
||||
#>
|
||||
|
||||
param (
|
||||
[ValidateSet("customize", "recommended", "undo")]
|
||||
[string]$action
|
||||
)
|
||||
|
||||
try {
|
||||
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
||||
|
||||
$Initial_ProgressPreference = $ProgressPreference
|
||||
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
||||
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
"customize"{
|
||||
Write-Host "Starting OO Shutup 10 ..."
|
||||
Start-Process $OOSU_filepath
|
||||
}
|
||||
"recommended"{
|
||||
$oosu_config = "$ENV:temp\ooshutup10_recommended.cfg"
|
||||
$sync.configs.ooshutup10_recommended | Out-File -FilePath $oosu_config -Force
|
||||
Write-Host "Applying recommended OO Shutup 10 Policies"
|
||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
||||
}
|
||||
"undo"{
|
||||
$oosu_config = "$ENV:temp\ooshutup10_factory.cfg"
|
||||
$sync.configs.ooshutup10_factory | Out-File -FilePath $oosu_config -Force
|
||||
Write-Host "Resetting all OO Shutup 10 Policies"
|
||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
||||
}
|
||||
catch {
|
||||
Write-Host "Error Downloading and Running OO Shutup 10" -ForegroundColor Red
|
||||
}
|
||||
finally {
|
||||
$ProgressPreference = $Initial_ProgressPreference
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ function Invoke-WPFPanelAutologin {
|
||||
Enables autologin using Sysinternals Autologon.exe
|
||||
|
||||
#>
|
||||
curl.exe -ss "https://live.sysinternals.com/Autologon.exe" -o $env:temp\autologin.exe # Official Microsoft recommendation https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
||||
cmd /c $env:temp\autologin.exe /accepteula
|
||||
|
||||
# Official Microsoft recommendation: https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
||||
Invoke-WebRequest -Uri "https://live.sysinternals.com/Autologon.exe" -OutFile "$env:temp\autologin.exe"
|
||||
cmd /c "$env:temp\autologin.exe" /accepteula
|
||||
}
|
@ -17,18 +17,26 @@ 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"
|
||||
|
||||
if (Test-Path -Path "$env:TEMP\cttlogo.png") {
|
||||
$iconPath = "$env:SystempRoot\cttlogo.ico"
|
||||
$iconPath = "$env:LOCALAPPDATA\winutil\cttlogo.ico"
|
||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
||||
}
|
||||
}
|
||||
@ -40,20 +48,23 @@ function Invoke-WPFShortcut {
|
||||
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
|
||||
$FileBrowser.FileName = $DestinationName
|
||||
|
||||
# Do an Early Return if The Save Shortcut operation was cancel by User's Input.
|
||||
# Do an Early Return if the Save Operation was canceled by User's Input.
|
||||
$FileBrowserResult = $FileBrowser.ShowDialog()
|
||||
$DialogResultEnum = New-Object System.Windows.Forms.DialogResult
|
||||
if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) {
|
||||
return
|
||||
}
|
||||
|
||||
# Prepare the Shortcut paramter
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
||||
$Shortcut.TargetPath = $SourceExe
|
||||
$Shortcut.Arguments = $ArgumentsToSourceExe
|
||||
$Shortcut.TargetPath = $shell
|
||||
$Shortcut.Arguments = $shellArgs
|
||||
if ($null -ne $iconPath) {
|
||||
$shortcut.IconLocation = $iconPath
|
||||
}
|
||||
|
||||
# Save the Shortcut to disk
|
||||
$Shortcut.Save()
|
||||
|
||||
if ($RunAsAdmin -eq $true) {
|
||||
|
@ -28,5 +28,9 @@ function Invoke-WPFToggle {
|
||||
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
|
||||
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
|
||||
"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,9 +25,18 @@ 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) {
|
||||
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 }
|
||||
@ -35,12 +44,10 @@ function Invoke-WPFTweakPS7{
|
||||
$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."
|
||||
Write-Host "Default profile updated to " -NoNewline
|
||||
Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline
|
||||
Write-Host "using the name attribute."
|
||||
} else {
|
||||
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
|
||||
}
|
||||
} else {
|
||||
Write-Host "Settings file not found at $settingsPath"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,69 +10,44 @@ Function Invoke-WPFUltimatePerformance {
|
||||
#>
|
||||
param($State)
|
||||
Try{
|
||||
|
||||
if($state -eq "Enabled"){
|
||||
# Define the name and GUID of the power scheme
|
||||
$powerSchemeName = "Ultimate Performance"
|
||||
$powerSchemeGuid = "e9a42b02-d5df-448d-aa00-03f14749eb61"
|
||||
|
||||
# Get all power schemes
|
||||
$schemes = powercfg /list | Out-String -Stream
|
||||
|
||||
# Check if the power scheme already exists
|
||||
$ultimateScheme = $schemes | Where-Object { $_ -match $powerSchemeName }
|
||||
|
||||
if ($null -eq $ultimateScheme) {
|
||||
Write-Host "Power scheme '$powerSchemeName' not found. Adding..."
|
||||
|
||||
# Add the power scheme
|
||||
powercfg /duplicatescheme $powerSchemeGuid
|
||||
powercfg -attributes SUB_SLEEP 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 -ATTRIB_HIDE
|
||||
powercfg -setactive $powerSchemeGuid
|
||||
powercfg -change -monitor-timeout-ac 0
|
||||
|
||||
|
||||
Write-Host "Power scheme added successfully."
|
||||
}
|
||||
else {
|
||||
Write-Host "Power scheme '$powerSchemeName' already exists."
|
||||
}
|
||||
}
|
||||
elseif($state -eq "Disabled"){
|
||||
# Define the name of the power scheme
|
||||
$powerSchemeName = "Ultimate Performance"
|
||||
|
||||
# Get all power schemes
|
||||
$schemes = powercfg /list | Out-String -Stream
|
||||
|
||||
# Find the scheme to be removed
|
||||
$ultimateScheme = $schemes | Where-Object { $_ -match $powerSchemeName }
|
||||
|
||||
# If the scheme exists, remove it
|
||||
if ($null -ne $ultimateScheme) {
|
||||
# Extract the GUID of the power scheme
|
||||
$guid = ($ultimateScheme -split '\s+')[3]
|
||||
|
||||
if($null -ne $guid){
|
||||
Write-Host "Found power scheme '$powerSchemeName' with GUID $guid. Removing..."
|
||||
|
||||
# Remove the power scheme
|
||||
powercfg /delete $guid
|
||||
|
||||
Write-Host "Power scheme removed successfully."
|
||||
}
|
||||
else {
|
||||
Write-Host "Could not find GUID for power scheme '$powerSchemeName'."
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "Power scheme '$powerSchemeName' not found."
|
||||
# Check if Ultimate Performance plan is installed
|
||||
$ultimatePlan = powercfg -list | Select-String -Pattern "Ultimate Performance"
|
||||
if($state -eq "Enable"){
|
||||
if ($ultimatePlan) {
|
||||
Write-Host "Ultimate Performance plan is already installed."
|
||||
} else {
|
||||
Write-Host "Installing Ultimate Performance plan..."
|
||||
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61
|
||||
Write-Host "> Ultimate Performance plan installed."
|
||||
}
|
||||
|
||||
}
|
||||
# Set the Ultimate Performance plan as active
|
||||
$ultimatePlanGUID = (powercfg -list | Select-String -Pattern "Ultimate Performance").Line.Split()[3]
|
||||
powercfg -setactive $ultimatePlanGUID
|
||||
|
||||
Write-Host "Ultimate Performance plan is now active."
|
||||
|
||||
|
||||
}
|
||||
Catch{
|
||||
elseif($state -eq "Disable"){
|
||||
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
|
||||
|
||||
# Delete the Ultimate Performance plan
|
||||
powercfg -delete $ultimatePlanGUID
|
||||
|
||||
Write-Host "Ultimate Performance plan has been uninstalled."
|
||||
Write-Host "> Balanced plan is now active."
|
||||
} else {
|
||||
Write-Host "Ultimate Performance plan is not installed."
|
||||
}
|
||||
}
|
||||
} Catch{
|
||||
Write-Warning $psitem.Exception.Message
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ function Invoke-WPFUnInstall {
|
||||
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||
|
||||
if ($PackagesToInstall.Count -eq 0) {
|
||||
$WarningMsg = "Please select the program(s) to install"
|
||||
$WarningMsg = "Please select the program(s) to uninstall"
|
||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||
return
|
||||
}
|
||||
|
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 %}
|
149
scripts/main.ps1
@ -10,7 +10,7 @@ $InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionSta
|
||||
$InitialSessionState.Variables.Add($hashVars)
|
||||
|
||||
# Get every private function and add them to the session state
|
||||
$functions = Get-ChildItem function:\ | Where-Object {$_.name -like "*winutil*" -or $_.name -like "*WPF*"}
|
||||
$functions = (Get-ChildItem function:\).where{$_.name -like "*winutil*" -or $_.name -like "*WPF*"}
|
||||
foreach ($function in $functions){
|
||||
$functionDefinition = Get-Content function:\$($function.name)
|
||||
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
||||
@ -70,15 +70,16 @@ $inputXML = Set-WinUtilUITheme -inputXML $inputXML -themeName $ctttheme
|
||||
|
||||
# Read the XAML file
|
||||
$reader = (New-Object System.Xml.XmlNodeReader $xaml)
|
||||
try { $sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader ) }
|
||||
catch [System.Management.Automation.MethodInvocationException] {
|
||||
try {
|
||||
$sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader )
|
||||
} catch [System.Management.Automation.MethodInvocationException] {
|
||||
Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..."
|
||||
Write-Host $error[0].Exception.Message -ForegroundColor Red
|
||||
|
||||
If ($error[0].Exception.Message -like "*button*") {
|
||||
write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed."
|
||||
}
|
||||
|
||||
@ -133,9 +134,17 @@ $sync.keys | ForEach-Object {
|
||||
|
||||
# Load computer information in the background
|
||||
Invoke-WPFRunspace -ScriptBlock {
|
||||
try{
|
||||
$oldProgressPreference = $ProgressPreference
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
$sync.ConfigLoaded = $False
|
||||
$sync.ComputerInfo = Get-ComputerInfo
|
||||
$sync.ConfigLoaded = $True
|
||||
}
|
||||
finally{
|
||||
$ProgressPreference = "Continue"
|
||||
}
|
||||
|
||||
} | Out-Null
|
||||
|
||||
#===========================================================================
|
||||
@ -145,9 +154,6 @@ Invoke-WPFRunspace -ScriptBlock {
|
||||
# Print the logo
|
||||
Invoke-WPFFormVariables
|
||||
|
||||
# Install Winget if not already present
|
||||
Install-WinUtilWinget
|
||||
|
||||
# Set the titlebar
|
||||
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
||||
# Set the commands that will run when the form is closed
|
||||
@ -158,9 +164,9 @@ $sync["Form"].Add_Closing({
|
||||
})
|
||||
|
||||
# Attach the event handler to the Click event
|
||||
$sync.CheckboxFilterClear.Add_Click({
|
||||
$sync.CheckboxFilter.Text = ""
|
||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||
$sync.SearchBarClearButton.Add_Click({
|
||||
$sync.SearchBar.Text = ""
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
})
|
||||
|
||||
# add some shortcuts for people that don't like clicking
|
||||
@ -171,9 +177,9 @@ $commonKeyEvents = {
|
||||
|
||||
if ($_.Key -eq "Escape")
|
||||
{
|
||||
$sync.CheckboxFilter.SelectAll()
|
||||
$sync.CheckboxFilter.Text = ""
|
||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||
$sync.SearchBar.SelectAll()
|
||||
$sync.SearchBar.Text = ""
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
return
|
||||
}
|
||||
|
||||
@ -204,11 +210,11 @@ $commonKeyEvents = {
|
||||
}
|
||||
# shortcut for the filter box
|
||||
if ($_.Key -eq "F" -and $_.KeyboardDevice.Modifiers -eq "Ctrl") {
|
||||
if ($sync.CheckboxFilter.Text -eq "Ctrl-F to filter") {
|
||||
$sync.CheckboxFilter.SelectAll()
|
||||
$sync.CheckboxFilter.Text = ""
|
||||
if ($sync.SearchBar.Text -eq "Ctrl-F to filter") {
|
||||
$sync.SearchBar.SelectAll()
|
||||
$sync.SearchBar.Text = ""
|
||||
}
|
||||
$sync.CheckboxFilter.Focus()
|
||||
$sync.SearchBar.Focus()
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,7 +277,7 @@ Add-Type @"
|
||||
"@
|
||||
}
|
||||
|
||||
foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) {
|
||||
foreach ($proc in (Get-Process).where{ $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" }) {
|
||||
# Check if the process's MainWindowHandle is valid
|
||||
if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) {
|
||||
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
||||
@ -282,19 +288,37 @@ Add-Type @"
|
||||
}
|
||||
}
|
||||
|
||||
# need to experiemnt more
|
||||
# setting icon for the windows is still not working
|
||||
# $pngUrl = "https://christitus.com/images/logo-full.png"
|
||||
# $pngPath = "$env:TEMP\cttlogo.png"
|
||||
# $iconPath = "$env:TEMP\cttlogo.ico"
|
||||
# # Download the PNG file
|
||||
# Invoke-WebRequest -Uri $pngUrl -OutFile $pngPath
|
||||
# if (Test-Path -Path $pngPath) {
|
||||
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $iconPath
|
||||
# }
|
||||
# $icon = [System.Drawing.Icon]::ExtractAssociatedIcon($iconPath)
|
||||
# Write-Host $icon.Handle
|
||||
# [Window]::SendMessage($windowHandle, 0x80, [IntPtr]::Zero, $icon.Handle)
|
||||
|
||||
# Using a TaskbarItem Overlay until someone figures out how to replace the icon correctly
|
||||
|
||||
# URL of the image
|
||||
$imageUrl = "https://christitus.com/images/logo-full.png"
|
||||
|
||||
# Download the image
|
||||
$imagePath = "$env:TEMP\logo-full.png"
|
||||
Invoke-WebRequest -Uri $imageUrl -OutFile $imagePath
|
||||
|
||||
# Read the image file as a byte array
|
||||
$imageBytes = [System.IO.File]::ReadAllBytes($imagePath)
|
||||
|
||||
# Convert the byte array to a Base64 string
|
||||
$base64String = [System.Convert]::ToBase64String($imageBytes)
|
||||
|
||||
# Create a streaming image by streaming the base64 string to a bitmap streamsource
|
||||
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
|
||||
$bitmap.BeginInit()
|
||||
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
|
||||
$bitmap.EndInit()
|
||||
$bitmap.Freeze()
|
||||
|
||||
# Ensure TaskbarItemInfo is created if not already
|
||||
if (-not $sync["Form"].TaskbarItemInfo) {
|
||||
$sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo
|
||||
}
|
||||
|
||||
# Set the overlay icon for the taskbar
|
||||
$sync["Form"].TaskbarItemInfo.Overlay = $bitmap
|
||||
|
||||
|
||||
$rect = New-Object RECT
|
||||
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
||||
@ -367,23 +391,23 @@ Add-Type @"
|
||||
|
||||
})
|
||||
|
||||
# Load Checkboxes and Labels outside of the Filter fuction only once on startup for performance reasons
|
||||
# Load Checkboxes and Labels outside of the Filter function only once on startup for performance reasons
|
||||
$filter = Get-WinUtilVariables -Type CheckBox
|
||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $psitem.Key -in $filter }
|
||||
$CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter }
|
||||
|
||||
$filter = Get-WinUtilVariables -Type Label
|
||||
$labels = @{}
|
||||
$sync.GetEnumerator() | Where-Object {$PSItem.Key -in $filter} | ForEach-Object {$labels[$_.Key] = $_.Value}
|
||||
($sync.GetEnumerator()).where{$PSItem.Key -in $filter} | ForEach-Object {$labels[$_.Key] = $_.Value}
|
||||
|
||||
$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category
|
||||
|
||||
$sync["CheckboxFilter"].Add_TextChanged({
|
||||
$sync["SearchBar"].Add_TextChanged({
|
||||
|
||||
if ($sync.CheckboxFilter.Text -ne "") {
|
||||
$sync.CheckboxFilterClear.Visibility = "Visible"
|
||||
if ($sync.SearchBar.Text -ne "") {
|
||||
$sync.SearchBarClearButton.Visibility = "Visible"
|
||||
}
|
||||
else {
|
||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
}
|
||||
|
||||
$activeApplications = @()
|
||||
@ -394,7 +418,7 @@ $sync["CheckboxFilter"].Add_TextChanged({
|
||||
continue
|
||||
}
|
||||
|
||||
$textToSearch = $sync.CheckboxFilter.Text.ToLower()
|
||||
$textToSearch = $sync.SearchBar.Text.ToLower()
|
||||
$checkBoxName = $CheckBox.Key
|
||||
$textBlockName = $checkBoxName + "Link"
|
||||
|
||||
@ -467,17 +491,46 @@ $sync["AboutMenuItem"].Add_Click({
|
||||
# Handle Export menu item click
|
||||
Write-Debug "About clicked"
|
||||
$sync["SettingsPopup"].IsOpen = $false
|
||||
# Example usage
|
||||
$authorInfo = @"
|
||||
Author : @christitustech
|
||||
Runspace : @DeveloperDurp
|
||||
GUI : @KonTy
|
||||
MicroWin : @KonTy
|
||||
GitHub : https://github.com/ChrisTitusTech/winutil
|
||||
Version : $($sync.version)
|
||||
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
||||
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>
|
||||
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
|
||||
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||
"@
|
||||
Show-CustomDialog -Message $authorInfo -Width 400
|
||||
$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
|
||||
})
|
||||
|
||||
$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.
|
42
windev.ps1
Normal file
@ -0,0 +1,42 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
This Script is used as a target for the https://christitus.com/windev alias.
|
||||
It queries the latest winget release (no matter if Pre-Release, Draft or Full Release) and invokes It
|
||||
.DESCRIPTION
|
||||
This Script provides a simple way to always start the bleeding edge release even if it's not yet a full release.
|
||||
This function should be run with administrative privileges.
|
||||
Because this way of recursively invoking scripts via Invoke-Expression it might very well happen that AV Programs flag this because it's a common way of mulitstage exploits to run
|
||||
.EXAMPLE
|
||||
irm https://christitus.com/windev | iex
|
||||
OR
|
||||
Run in Admin Powershell > ./windev.ps1
|
||||
#>
|
||||
|
||||
# Function to fetch the latest release tag from the GitHub API
|
||||
function Get-LatestRelease {
|
||||
try {
|
||||
$releases = Invoke-RestMethod -Uri 'https://api.github.com/repos/ChrisTitusTech/winutil/releases'
|
||||
$latestRelease = $releases | Where-Object {$_.prerelease -eq $true} | Select-Object -First 1
|
||||
return $latestRelease.tag_name
|
||||
} catch {
|
||||
Write-Host "Error fetching release data: $_" -ForegroundColor Red
|
||||
return $latestRelease.tag_name
|
||||
}
|
||||
}
|
||||
|
||||
# Function to redirect to the latest pre-release version
|
||||
function RedirectToLatestPreRelease {
|
||||
$latestRelease = Get-LatestRelease
|
||||
if ($latestRelease) {
|
||||
$url = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$latestRelease/winutil.ps1"
|
||||
} else {
|
||||
Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red
|
||||
Write-Host "Using latest Full Release"
|
||||
$url = "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1"
|
||||
}
|
||||
Invoke-RestMethod $url | Invoke-Expression
|
||||
}
|
||||
|
||||
# Call the redirect function
|
||||
|
||||
RedirectToLatestPreRelease
|
5219
winutil.ps1
@ -49,6 +49,8 @@
|
||||
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="FontSize" Value="{ButtonFontSize}" />
|
||||
<Setter Property="TextElement.FontFamily" Value="{ButtonFontFamily}"/>
|
||||
<Setter Property="Background" Value="{MainBackgroundColor}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
@ -175,6 +177,7 @@
|
||||
|
||||
<!-- TextBlock template -->
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{FontSize}"/>
|
||||
<Setter Property="Foreground" Value="{LabelboxForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{LabelBackgroundColor}"/>
|
||||
</Style>
|
||||
@ -197,7 +200,9 @@
|
||||
BorderBrush="{ButtonBackgroundColor}"
|
||||
BorderThickness="{ButtonBorderThickness}"
|
||||
CornerRadius="{ButtonCornerRadius}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="10,2,10,2"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
@ -237,7 +242,9 @@
|
||||
<Setter Property="Margin" Value="{ButtonMargin}"/>
|
||||
<Setter Property="Foreground" Value="{ButtonForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{ButtonBackgroundColor}"/>
|
||||
<Setter Property="Height" Value="{ToggleButtonHeight}"/>
|
||||
<Setter Property="Height" Value="{ButtonHeight}"/>
|
||||
<Setter Property="Width" Value="{ButtonWidth}"/>
|
||||
<Setter Property="FontSize" Value="{ButtonFontSize}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
@ -266,12 +273,12 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ClearButtonStyle" TargetType="Button">
|
||||
<Style x:Key="SearchBarClearButtonStyle" TargetType="Button">
|
||||
<Setter Property="FontFamily" Value="Arial"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontSize" Value="{SearchBarClearButtonFontSize}"/>
|
||||
<Setter Property="Content" Value="X"/>
|
||||
<Setter Property="Height" Value="14"/>
|
||||
<Setter Property="Width" Value="14"/>
|
||||
<Setter Property="Height" Value="{SearchBarClearButtonFontSize}"/>
|
||||
<Setter Property="Width" Value="{SearchBarClearButtonFontSize}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
@ -290,22 +297,22 @@
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{MainBackgroundColor}"/>
|
||||
<!-- <Setter Property="FontSize" Value="15" /> -->
|
||||
<!-- <Setter Property="TextElement.FontFamily" Value="Consolas, sans-serif"/> -->
|
||||
<Setter Property="FontSize" Value="{FontSize}" />
|
||||
<Setter Property="TextElement.FontFamily" Value="{FontFamily}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Grid Background="{TemplateBinding Background}" Margin="6,0,0,0">
|
||||
<Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Grid Width="16" Height="16">
|
||||
<Grid Width="{CheckBoxBulletDecoratorFontSize}" Height="{CheckBoxBulletDecoratorFontSize}">
|
||||
<Border x:Name="Border"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{ButtonBackgroundColor}"
|
||||
BorderThickness="1"
|
||||
Width="14"
|
||||
Height="14"
|
||||
Margin="1"
|
||||
Width="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}"
|
||||
Height="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}"
|
||||
Margin="2"
|
||||
SnapsToDevicePixels="True"/>
|
||||
<Path x:Name="CheckMark"
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
@ -414,19 +421,6 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" x:Name="txtToggle" VerticalAlignment="Center" FontWeight="DemiBold" Foreground="{MainForegroundColor}" FontSize="12">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Text" Value="Off"/>
|
||||
<Setter Property="Margin" Value="4,0,4,0"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked}" Value="True">
|
||||
<Setter Property="Text" Value="On"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
|
||||
<Border Grid.Column="1" x:Name="Border" CornerRadius="8"
|
||||
BorderThickness="1"
|
||||
@ -547,6 +541,7 @@
|
||||
<Setter Property="BorderBrush" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="FontSize" Value="{FontSize}"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@ -571,54 +566,66 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding Path=ComputedHorizontalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||
<Condition Binding="{Binding Path=ComputedVerticalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50px"/>
|
||||
<RowDefinition Height="{TabRowHeightInPixels}px"/>
|
||||
<RowDefinition Height=".9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DockPanel HorizontalAlignment="Stretch" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto">
|
||||
<Image Height="{ToggleButtonHeight}" Width="{ToggleButtonHeight}" Name="WPFIcon"
|
||||
<Image Height="{WinUtilIconSize}" Width="{WinUtilIconSize}" Name="WPFIcon"
|
||||
SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="10"/>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonInstallForegroundColor}" >
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonInstallForegroundColor}" >
|
||||
<Underline>I</Underline>nstall
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonTweaksBackgroundColor}" Foreground="{ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonTweaksForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonTweaksForegroundColor}">
|
||||
<Underline>T</Underline>weaks
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonConfigBackgroundColor}" Foreground="{ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonConfigForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonConfigForegroundColor}">
|
||||
<Underline>C</Underline>onfig
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<Underline>U</Underline>pdates
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab5BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<Underline>M</Underline>icroWin
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
@ -630,13 +637,23 @@
|
||||
<ColumnDefinition Width="50px"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--
|
||||
TODO:
|
||||
Make this SearchBar TextBox Position itself and still
|
||||
house the Magnifying Glass Character in place,
|
||||
even if that Magnifying Icon changed its Size,
|
||||
it should be positioned relative to the SearchBar.
|
||||
Consider using a Math Solver, will help in making
|
||||
development of these things much easier
|
||||
-->
|
||||
<TextBox
|
||||
Grid.Column="0"
|
||||
Width="200"
|
||||
FontSize="14"
|
||||
Width="{SearchBarWidth}"
|
||||
Height="{SearchBarHeight}"
|
||||
FontSize="{SearchBarTextBoxFontSize}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Height="25" Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
|
||||
Name="CheckboxFilter"
|
||||
Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
|
||||
Name="SearchBar"
|
||||
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
||||
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
|
||||
</TextBox>
|
||||
@ -644,11 +661,19 @@
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
||||
FontSize="{IconFontSize}"
|
||||
Margin="16,0,0,0"></TextBlock>
|
||||
<!--
|
||||
TODO:
|
||||
Make this ClearButton Positioning react to
|
||||
SearchBar Width Value changing, so it'll look correct.
|
||||
Consider using a Math Solver, will help in making
|
||||
development of these things much easier
|
||||
-->
|
||||
<Button Grid.Column="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Name="CheckboxFilterClear"
|
||||
Style="{StaticResource ClearButtonStyle}"
|
||||
Name="SearchBarClearButton"
|
||||
Style="{StaticResource SearchBarClearButtonStyle}"
|
||||
Margin="193,0,0,0" Visibility="Collapsed"/>
|
||||
|
||||
<Button Name="SettingsButton"
|
||||
@ -656,8 +681,8 @@
|
||||
Grid.Column="1" BorderBrush="Transparent"
|
||||
Background="{MainBackgroundColor}"
|
||||
Foreground="{MainForegroundColor}"
|
||||
FontSize="18"
|
||||
Width="35" Height="35"
|
||||
FontSize="{SettingsIconFontSize}"
|
||||
Width="{IconButtonSize}" Height="{IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,5,5,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
@ -668,10 +693,11 @@
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<MenuItem Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
@ -681,11 +707,11 @@
|
||||
Content="×" BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{MainBackgroundColor}"
|
||||
Width="35" Height="35"
|
||||
Width="{IconButtonSize}" Height="{IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,5,5,0"
|
||||
FontFamily="Arial"
|
||||
Foreground="{MainForegroundColor}" FontSize="18" Name="WPFCloseButton" />
|
||||
Foreground="{MainForegroundColor}" FontSize="{IconFontSize}" Name="WPFCloseButton" />
|
||||
</Grid>
|
||||
|
||||
</DockPanel>
|
||||
@ -701,35 +727,37 @@
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
||||
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
||||
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
||||
<Button Name="WPFuninstall" Content=" Uninstall Selection" Margin="2"/>
|
||||
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
{{InstallPanel_applications}}
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
<Rectangle Grid.Row="1" Grid.Column="0" Width="18" Height="18" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="55"/>
|
||||
<RowDefinition Height="45px"/>
|
||||
<RowDefinition Height=".70*"/>
|
||||
<RowDefinition Height=".10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
{{InstallPanel_tweaks}}
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
|
||||
<Label Content="Recommended Selections:" FontSize="14" VerticalAlignment="Center"/>
|
||||
<Button Name="WPFstandard" Content=" Standard " Margin="1"/>
|
||||
<Button Name="WPFminimal" Content=" Minimal " Margin="1"/>
|
||||
<Button Name="WPFclear" Content=" Clear " Margin="1"/>
|
||||
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="1"/>
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5">
|
||||
<Label Content="Recommended Selections:" FontSize="{FontSize}" VerticalAlignment="Center" Margin="2"/>
|
||||
<Button Name="WPFstandard" Content=" Standard " Margin="2"/>
|
||||
<Button Name="WPFminimal" Content=" Minimal " Margin="2"/>
|
||||
<Button Name="WPFclear" Content=" Clear " Margin="2"/>
|
||||
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="2"/>
|
||||
</StackPanel>
|
||||
<Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
@ -760,19 +788,19 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Row="0" Grid.Column="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<Button Name="WPFUpdatesdefault" FontSize="16" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<Button Name="WPFUpdatesdefault" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is the default settings that come with Windows. <LineBreak/><LineBreak/> No modifications are made and will remove any custom windows update settings.<LineBreak/><LineBreak/>Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="0" Grid.Column="1">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<Button Name="WPFUpdatessecurity" FontSize="16" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<Button Name="WPFUpdatessecurity" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is my recommended setting I use on all computers.<LineBreak/><LineBreak/> It will delay feature updates by 2 years and will install security updates 4 days after release.<LineBreak/><LineBreak/>Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.<LineBreak/><LineBreak/>Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="0" Grid.Column="2">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<Button Name="WPFUpdatesdisable" FontSize="16" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/>
|
||||
<Button Name="WPFUpdatesdisable" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/>
|
||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This completely disables ALL Windows Updates and is NOT RECOMMENDED.<LineBreak/><LineBreak/> However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. <LineBreak/><LineBreak/>Note: Your system will be easier to hack and infect without security updates.</TextBlock>
|
||||
<TextBlock Text=" " Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300"/>
|
||||
</StackPanel>
|
||||
@ -780,7 +808,7 @@
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5" Width="Auto" Height="Auto">
|
||||
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -795,12 +823,12 @@
|
||||
HorizontalAlignment="Stretch">
|
||||
<StackPanel Name="MicrowinMain" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
||||
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
||||
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="1" />
|
||||
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="-10,1,1,1" />
|
||||
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{ComboBoxForegroundColor}">
|
||||
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
||||
Check the status in the console
|
||||
</TextBlock>
|
||||
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
|
||||
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="-10,1,1,1"
|
||||
ToolTip="Use ISO directory for ScratchDir " />
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -817,6 +845,8 @@
|
||||
Foreground="{LabelboxForegroundColor}">
|
||||
</TextBox>
|
||||
<Button Name="MicrowinScratchDirBT"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
Grid.Column="1"
|
||||
Margin="2"
|
||||
Padding="1" VerticalAlignment="Center">
|
||||
@ -845,12 +875,12 @@
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock>
|
||||
<ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" />
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows features you want to remove from the ISO</TextBlock>
|
||||
<CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="5,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="5,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="5,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="5,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/>
|
||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="5,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
|
||||
<CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="-10,5,0,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
|
||||
<TextBox Name="MicrowinDriverLocation" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
|
||||
Margin="6"
|
||||
Text=""
|
||||
@ -859,9 +889,9 @@
|
||||
Foreground="{LabelboxForegroundColor}"
|
||||
ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"
|
||||
/>
|
||||
<CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="5,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/>
|
||||
<CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="-10,5,0,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/>
|
||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="5,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
|
||||
</StackPanel>
|
||||
@ -882,7 +912,7 @@
|
||||
<Grid Name = "BusyMessage" Visibility="Collapsed">
|
||||
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" />
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
||||
FontSize="{IconFontSize}" Margin="16,0,0,0"></TextBlock>
|
||||
</Grid>
|
||||
|
||||
<TextBlock x:Name = "asciiTextBlock"
|
||||
@ -892,7 +922,7 @@
|
||||
VerticalAlignment = "Top"
|
||||
Height = "Auto"
|
||||
Width = "Auto"
|
||||
FontSize = "10"
|
||||
FontSize = "{MicroWinLogoSize}"
|
||||
FontFamily = "Courier New"
|
||||
>
|
||||
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __
|
||||
|