Compare commits
402 Commits
832f08c18b
...
24.08.13
Author | SHA1 | Date | |
---|---|---|---|
8fd08f7ac5 | |||
6c3539edbe | |||
ed1cdf0233 | |||
a046bcd6a2 | |||
bf518522f8 | |||
35dfd847ab | |||
0e85f20680 | |||
bdfc4c076c | |||
8c4dc82d31 | |||
e90156adb9 | |||
5d7d121e1f | |||
0919e78693 | |||
41ac93d09a | |||
5994105fba | |||
0bce9e2647 | |||
723e1a132d | |||
5acbfbd253 | |||
1945fe288d | |||
6ff815eed3 | |||
138c5de5d3 | |||
c619d02724 | |||
a0d15f1584 | |||
c5f29df2b2 | |||
11333a1f17 | |||
ff4398e45c | |||
7841f4bbce | |||
5b993adba9 | |||
73d42dee20 | |||
ee0a2818b6 | |||
9a1fbd77a7 | |||
5e3c6ba452 | |||
478aa4ac7b | |||
123d78116b | |||
a2d9f47ea6 | |||
da824d58a7 | |||
f38f534850 | |||
04c84dce45 | |||
3903eaaa24 | |||
3b2af3fa2b | |||
c979dae926 | |||
a5a8f3ff6f | |||
31aedcf684 | |||
ab6898aebc | |||
68437c2406 | |||
7c214666b8 | |||
9284741cd3 | |||
97e517a9dd | |||
97f67fa4b2 | |||
a77ef020fe | |||
2b01fb739f | |||
f3df13a4ca | |||
33d5d55b15 | |||
0bea5f8ceb | |||
de8a79df22 | |||
1c9cef0079 | |||
49100e1dd6 | |||
547e433b0b | |||
4ee41cf198 | |||
c2addcfedf | |||
09575b0f8d | |||
5a89053534 | |||
1350013b3e | |||
80675b4c3f | |||
2a530d0c12 | |||
fb1a0b919c | |||
83bcf246f6 | |||
e2567bddc9 | |||
2508f28806 | |||
2d185e1919 | |||
5ac13f265e | |||
128593a950 | |||
e7328c2739 | |||
18f9f5e35d | |||
760fb3d30a | |||
a75c80057a | |||
514eddd0b6 | |||
3929459106 | |||
b4bf321e66 | |||
74f58e7957 | |||
875864060e | |||
e38615b4b4 | |||
9f33cb1b82 | |||
313c5f59de | |||
7de93ae208 | |||
140620e76c | |||
8ae328c4b5 | |||
1032d3d5aa | |||
84a84fd34d | |||
b23c685580 | |||
214eb1d332 | |||
5083b84233 | |||
4553f3e758 | |||
8baacc2966 | |||
a8c47e64d7 | |||
fcc48a2b22 | |||
f2a5574a8c | |||
363ed1c41b | |||
706328e674 | |||
2f43975735 | |||
d1a40217c1 | |||
790afac860 | |||
efee03b940 | |||
8beca950a8 | |||
9bc6adf191 | |||
fb34c7cbd8 | |||
ae1b22552a | |||
57f4eba692 | |||
22684da35b | |||
7acb213a77 | |||
b9e8b9f697 | |||
300439c851 | |||
0e7ac225af | |||
0bbbe67446 | |||
376cc1d745 | |||
499848d643 | |||
601e338929 | |||
8045a78c44 | |||
df2fe4a4c6 | |||
8a6116cea1 | |||
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 | |||
ad81bab274 | |||
3a83203298 | |||
09b1e56967 | |||
af94adbabe | |||
a609f771c8 | |||
2b80e14bf9 | |||
1325ef54b8 | |||
8a76641d20 | |||
3dca1ee43e | |||
7b6decb28a | |||
774b64b092 | |||
02ea93c80f | |||
5e10883547 | |||
a8af90a112 | |||
2354645b47 | |||
9ef050442d | |||
c8ae4a812e | |||
ad080f267e | |||
fec5b68b10 | |||
57ff8b0188 | |||
9eceae6751 | |||
88a622c368 | |||
4a7c8a35bf | |||
c3b12e89f8 | |||
f776717f67 | |||
54a575274d | |||
5cd75c0ed6 | |||
6e7c5336c2 | |||
ca9c764cd7 | |||
23af79852a | |||
7bfcd7cb25 | |||
4de1ac39ef | |||
4ac5b79fc8 | |||
420f37f205 | |||
c6c3f0cd03 | |||
dd2e4fb337 | |||
31c6622926 | |||
e745d798b1 | |||
a29364984b | |||
07eeed310b | |||
8e00077e50 | |||
fc505872d2 |
11
.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/* diff
|
||||||
config/applications.json diff
|
config/applications.json diff
|
||||||
*.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: ''
|
title: ''
|
||||||
labels: ''
|
labels: ''
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
## Describe the bug
|
||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
**To Reproduce**
|
## To Reproduce
|
||||||
Steps to reproduce the behavior:
|
Steps to reproduce the behavior:
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
3. Scroll down to '....'
|
3. Scroll down to '....'
|
||||||
4. See error
|
4. See error
|
||||||
|
|
||||||
**Expected behavior**
|
## Expected behavior
|
||||||
A clear and concise description of what you expected to happen.
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
**Screenshots**
|
## Screenshots
|
||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
**Additional context**
|
## Additional context
|
||||||
Add any other context about the problem here.
|
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'
|
48
.github/workflows/close-discussion-on-pr.yaml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: Close Discussion on PR Merge
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
closeDiscussion:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check if PR was merged
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
|
run: echo "PR was merged"
|
||||||
|
|
||||||
|
- name: Extract Discussion Number & Close If any Were Found
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
|
id: extract-discussion
|
||||||
|
run: |
|
||||||
|
pr_body="${{ github.event.pull_request.body }}"
|
||||||
|
discussion_ids=$(echo "$pr_body" | grep -oP '(?i)(resolve|fix|close)[s|d]? #\K[0-9]+')
|
||||||
|
|
||||||
|
if [ -z "$discussion_ids" ]; then
|
||||||
|
echo "No discussion IDs found."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
for discussion_id in $discussion_ids; do
|
||||||
|
echo "Attempting to close discussion #$discussion_id"
|
||||||
|
response=$(curl -s -X PATCH -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d '{"state": "closed"}' \
|
||||||
|
"https://api.github.com/repos/${{ github.repository }}/discussions/$discussion_id")
|
||||||
|
|
||||||
|
if echo "$response" | jq -e '.id' > /dev/null; then
|
||||||
|
echo "Successfully closed discussion #$discussion_id"
|
||||||
|
else
|
||||||
|
error_message=$(echo "$response" | jq -r '.message // "Unknown error"')
|
||||||
|
echo "Warning: Failed to close discussion #$discussion_id. Error: $error_message"
|
||||||
|
echo "Full response: $response"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
shell: bash
|
||||||
|
continue-on-error: true
|
45
.github/workflows/close-issue-command.yaml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Close issue on /close
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
closeIssueOnClose:
|
||||||
|
# Skip this job if the comment was created/edited on a PR
|
||||||
|
if: ${{ !github.event.issue.pull_request }}
|
||||||
|
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 }}
|
76
.github/workflows/close-old-issues.yaml
vendored
@ -4,62 +4,36 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # Run daily
|
- cron: '0 0 * * *' # Run daily
|
||||||
workflow_dispatch: # This line enables manual triggering
|
workflow_dispatch: # This line enables manual triggering
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
close-issues:
|
close-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write # Ensure necessary permissions for issues
|
issues: write # Ensure necessary permissions for issues
|
||||||
|
pull-requests: none
|
||||||
|
contents: none
|
||||||
steps:
|
steps:
|
||||||
- name: Close inactive issues
|
- name: Close inactive issues
|
||||||
uses: actions/github-script@v7
|
uses: actions/stale@v8
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
# A list of labels to reference when looking through issues,
|
||||||
script: |
|
# and only when one (or even more) of these labels are found..
|
||||||
const octokit = github;
|
# then skip this issue, and never try to stale and/or close it.
|
||||||
|
exempt-issue-labels: "Keep Issue Open"
|
||||||
// Get the repository owner and name
|
# Split it into two weeks, after one week the issue will be marked as stale,
|
||||||
const { owner, repo } = context.repo;
|
# after another week have pasted without any update.. the issue will then be closed.
|
||||||
|
days-before-issue-stale: 7
|
||||||
// Define the inactivity period (14 days)
|
days-before-issue-close: 7
|
||||||
const inactivityPeriod = new Date();
|
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
|
||||||
inactivityPeriod.setDate(inactivityPeriod.getDate() - 14);
|
days-before-pr-stale: -1
|
||||||
|
days-before-pr-close: -1
|
||||||
try {
|
# Sends a message for both the Stale and Close events of an issue.
|
||||||
// Get all open issues with pagination
|
stale-issue-message: "This issue was marked as stale because it has been inactive for 7 days"
|
||||||
for await (const response of octokit.paginate.iterator(octokit.rest.issues.listForRepo, {
|
close-issue-message: "This issue was closed because it has been inactive for 7 days since it was marked as stale"
|
||||||
owner,
|
# Increase this value if the project receives a lot of
|
||||||
repo,
|
# PRs (yes.. apparently they're processed no matter what) & Issues.
|
||||||
state: 'open',
|
# Default value for it (according to the docs) is 30
|
||||||
})) {
|
operations-per-run: 200
|
||||||
const issues = response.data;
|
# Make this field equal true if you want to test your configuration if it works correctly or not
|
||||||
|
debug-only: false
|
||||||
// Close issues inactive for more than the inactivity period
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
for (const issue of issues) {
|
|
||||||
const lastCommentDate = issue.updated_at;
|
|
||||||
if (new Date(lastCommentDate) < inactivityPeriod) {
|
|
||||||
try {
|
|
||||||
// Close the issue
|
|
||||||
await octokit.rest.issues.update({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issue.number,
|
|
||||||
state: 'closed',
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add a comment
|
|
||||||
await octokit.rest.issues.createComment({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issue.number,
|
|
||||||
body: 'Closed due to inactivity',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Error updating or commenting on issue #${issue.number}: ${error}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Error fetching issues: ${error}`);
|
|
||||||
}
|
|
||||||
|
22
.github/workflows/compile-check.yaml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Compile & Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
workflow_dispatch: # Manual trigger added
|
||||||
|
workflow_call: # Allow other Actions to call this workflow
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Compile-and-Check:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Compile and Syntaxcheck winutil.ps1
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1
|
||||||
|
continue-on-error: false # Directly fail the job on error, removing the need for a separate check
|
31
.github/workflows/github-pages.yaml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: GitHub Pages Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published, prereleased]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: '0' # Fetch all commit history for all branches as well as tags.
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x # Install latest Stable release of Python 3
|
||||||
|
cache: 'pip' # caching pip dependencies
|
||||||
|
|
||||||
|
- name: Install Necessary Dependencies using 'pip install -r requirements.txt'
|
||||||
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Build & Deploy using 'mkdocs'
|
||||||
|
run: mkdocs gh-deploy --force
|
89
.github/workflows/pre-release.yaml
vendored
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
name: Pre-Release WinUtil
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # Manual trigger added
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-runspace:
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Compile project
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1
|
||||||
|
continue-on-error: false # Directly fail the job on error, removing the need for a separate check
|
||||||
|
|
||||||
|
- name: Set Version to Todays Date
|
||||||
|
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
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "Failed to create tag $env:VERSION"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
git push origin $env:VERSION
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "Failed to push tag $env:VERSION"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "Tag $env:VERSION already exists, skipping tag creation"
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Create and import code signing certificate
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
[System.IO.File]::WriteAllBytes("$env:USERPROFILE\code-signing-cert.pfx", [System.Convert]::FromBase64String("$env:CERTIFICATE_BASE64"))
|
||||||
|
Import-PfxCertificate -FilePath "$env:USERPROFILE\code-signing-cert.pfx" -CertStoreLocation Cert:\CurrentUser\My
|
||||||
|
|
||||||
|
- name: Code sign winutil.ps1
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
|
||||||
|
if ($null -eq $cert) { throw "Code signing certificate not found" }
|
||||||
|
Set-AuthenticodeSignature -FilePath ./winutil.ps1 -Certificate $cert
|
||||||
|
|
||||||
|
- name: Verify code signature
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$signature = Get-AuthenticodeSignature -FilePath ./winutil.ps1
|
||||||
|
if ($signature.Status -ne 'Valid') { throw "Code signing failed" }
|
||||||
|
|
||||||
|
- name: Upload winutil.ps1 as artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: winutil
|
||||||
|
path: ./winutil.ps1
|
||||||
|
|
||||||
|
- 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 }}
|
21
.github/workflows/release.yaml
vendored
@ -1,21 +0,0 @@
|
|||||||
name: Update Branch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- test*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-runspace:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: ${{ github.head_ref }}
|
|
||||||
- name: Create local changes
|
|
||||||
run: |
|
|
||||||
powershell.exe -f Compile.ps1
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.16.0
|
|
||||||
with:
|
|
||||||
commit_message: Compile Winutil
|
|
34
.github/workflows/remove-winutil.yaml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Remove winutil.ps1 if included in a Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-and-delete-file:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check if winutil.ps1 exists
|
||||||
|
id: check_existence
|
||||||
|
run: |
|
||||||
|
if [ -f "winutil.ps1" ]; then
|
||||||
|
echo "winutil_exists=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "winutil_exists=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Delete winutil.ps1 if it exists
|
||||||
|
if: steps.check_existence.outputs.winutil_exists == 'true'
|
||||||
|
run: |
|
||||||
|
git config --global user.email "winutil-action@noreply.github.com"
|
||||||
|
git config --global user.name "winutil-action"
|
||||||
|
git rm winutil.ps1
|
||||||
|
git commit -m "Delete winutil.ps1 as it is not allowed"
|
||||||
|
git push origin HEAD:${{ github.ref }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
26
.github/workflows/sponsors.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Generate Sponsors README
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: 30 15 * * 0-6
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: (github.event_name == 'schedule' && github.repository == 'ChrisTitusTech/winutil') || (github.event_name != 'schedule')
|
||||||
|
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: '.'
|
14
.github/workflows/unittests.yaml
vendored
@ -1,14 +1,14 @@
|
|||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: PS Script Analyzer
|
name: PS Script Analyzer
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: lint
|
- name: lint
|
||||||
uses: devblackops/github-action-psscriptanalyzer@master
|
uses: devblackops/github-action-psscriptanalyzer@master
|
||||||
with:
|
with:
|
||||||
@ -22,19 +22,19 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Pester
|
- name: Install Pester
|
||||||
run: |
|
run: |
|
||||||
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
||||||
Install-Module -Name Pester -Force -AllowClobber
|
Install-Module -Name Pester -Force -SkipPublisherCheck -AllowClobber
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Run Pester tests
|
- name: Run Pester tests
|
||||||
run: |
|
run: |
|
||||||
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
||||||
Invoke-Pester -Path 'pester/*.Tests.ps1' -EnableExit
|
Invoke-Pester -Path 'pester/*.Tests.ps1' -Output Detailed
|
||||||
|
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
TEMP: ${{ runner.temp }}
|
TEMP: ${{ runner.temp }}
|
||||||
|
8
.gitignore
vendored
@ -15,6 +15,11 @@ winutil.pdb
|
|||||||
# Folder config file
|
# Folder config file
|
||||||
[Dd]esktop.ini
|
[Dd]esktop.ini
|
||||||
|
|
||||||
|
# Ignore Generated XAML Files
|
||||||
|
xaml/inputApp.xaml
|
||||||
|
xaml/inputFeatures.xaml
|
||||||
|
xaml/inputTweaks.xaml
|
||||||
|
|
||||||
# Executables and Configs
|
# Executables and Configs
|
||||||
winget.msixbundle
|
winget.msixbundle
|
||||||
pester.ps1
|
pester.ps1
|
||||||
@ -39,3 +44,6 @@ Microsoft.PowerShell.ConsoleHost.dll
|
|||||||
microwin.log
|
microwin.log
|
||||||
True
|
True
|
||||||
test.ps1
|
test.ps1
|
||||||
|
winutil.ps1
|
||||||
|
|
||||||
|
binary/
|
117
CONTRIBUTING.md
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
# How to Contribute?
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
* Test the latest changes to WinUtil by running the pre-release and reporting issues you are encountering to help us continually improve WinUtil!
|
||||||
|
|
||||||
|
#### **Run the latest pre-release**
|
||||||
|
```ps1
|
||||||
|
irm christitus.com/windev | iex
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! bug "Keep in mind"
|
||||||
|
|
||||||
|
This is a pre-release and should be treated as such. It exists for developers to test the utility and report or fix bugs before they get added to the stable release. Don't use it in production!
|
||||||
|
|
||||||
|
## 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 "Important"
|
||||||
|
|
||||||
|
Do not use a code formatter, make massive amounts of line changes, or 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 is 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 the 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
|
||||||
|
|
||||||
|
* This is a guide for beginners. If you are still having issues, look at the following official GitHub documentation:
|
||||||
|
* [Commit through WEB](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits)
|
||||||
|
* [Commit through GitHub Desktop](https://docs.github.com/en/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop#about-commits)
|
||||||
|
* [Create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
|
||||||
|
|
||||||
|
|
||||||
|
### Overview
|
||||||
|
|
||||||
|
``` mermaid
|
||||||
|
%%{init: {"flowchart": {"curve": "cardinal"}} }%%
|
||||||
|
graph TD
|
||||||
|
A[Fork Project] --> B[Clone Repository];
|
||||||
|
B --> C[Create New Branch];
|
||||||
|
C --> D[Make Changes];
|
||||||
|
D --> G[Test Changes];
|
||||||
|
G --> H{Tests Passed?};
|
||||||
|
H -->|Yes| E[Commit Changes];
|
||||||
|
H -->|No| J[Fix Issues];
|
||||||
|
J --> G;
|
||||||
|
E --> F[Push Branch];
|
||||||
|
F --> K[Create Pull Request];
|
||||||
|
K --> L[Fill out PR template];
|
||||||
|
classDef default stroke:#333,stroke-width:4px,font-size:12pt;
|
||||||
|
```
|
||||||
|
!!! info
|
||||||
|
|
||||||
|
This is a diagram to guide you through the process. It may vary depending on the type of change you're making.
|
||||||
|
|
||||||
|
### 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
|
||||||
|
!!! tip
|
||||||
|
|
||||||
|
While you can make your changes directly through the Web, we recommend cloning the repo to your device using the application GitHub Desktop (available in WinUtil) to test your fork easily.
|
||||||
|
|
||||||
|
* Install GitHub Desktop if it is not already installed.
|
||||||
|
* Log in using the same GitHub account you 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 preferred text editor.
|
||||||
|
|
||||||
|
|
||||||
|
### Testing your changes
|
||||||
|
|
||||||
|
* To test to see if your changes work as intended run following commands in a powershell teminal as admin:
|
||||||
|
|
||||||
|
* Change the directory where you are running the commands to the forked project.
|
||||||
|
* `cd {path to the folder with the compile.ps1}`
|
||||||
|
* Run the 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.
|
||||||
|
|
||||||
|
### Committing the changes
|
||||||
|
* Before committing your changes, please discard changes made to the `winutil.ps1` file, like the following:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* Now, commit your changes once you are happy 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 the 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 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. All new changes go into the /windev build to make sure everything is working OK before going fully public.
|
||||||
|
* Congratulations! You just submitted your first PR. Thank you so much for contributing to WinUtil.
|
161
Compile.ps1
@ -1,47 +1,164 @@
|
|||||||
|
param (
|
||||||
|
[switch]$Debug,
|
||||||
|
[switch]$Run,
|
||||||
|
[switch]$SkipPreprocessing
|
||||||
|
)
|
||||||
$OFS = "`r`n"
|
$OFS = "`r`n"
|
||||||
$scriptname = "winutil.ps1"
|
$scriptname = "winutil.ps1"
|
||||||
|
$workingdir = $PSScriptRoot
|
||||||
|
|
||||||
# Variable to sync between runspaces
|
# Variable to sync between runspaces
|
||||||
$sync = [Hashtable]::Synchronized(@{})
|
$sync = [Hashtable]::Synchronized(@{})
|
||||||
$sync.PSScriptRoot = $PSScriptRoot
|
$sync.PSScriptRoot = $workingdir
|
||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
|
|
||||||
if (Test-Path -Path "$($scriptname)")
|
function Update-Progress {
|
||||||
{
|
param (
|
||||||
Remove-Item -Force "$($scriptname)"
|
[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
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-output '
|
$header = @"
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
### ###
|
### ###
|
||||||
### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ###
|
### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ###
|
||||||
### ###
|
### ###
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
' | Out-File ./$scriptname -Append -Encoding ascii
|
"@
|
||||||
|
|
||||||
(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)") | Out-File ./$scriptname -Append -Encoding ascii
|
if (-NOT $SkipPreprocessing) {
|
||||||
|
Update-Progress "Pre-req: Running Preprocessor..." 0
|
||||||
|
|
||||||
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
# Dot source the 'Invoke-Preprocessing' Function from 'tools/Invoke-Preprocessing.ps1' Script
|
||||||
Get-Content $psitem.FullName | Out-File ./$scriptname -Append -Encoding ascii
|
$preprocessingFilePath = ".\tools\Invoke-Preprocessing.ps1"
|
||||||
|
. "$(($workingdir -replace ('\\$', '')) + '\' + ($preprocessingFilePath -replace ('\.\\', '')))"
|
||||||
|
|
||||||
|
$excludedFiles = @('.\.git\', '.\.gitignore', '.\.gitattributes', '.\.github\CODEOWNERS', '.\LICENSE', "$preprocessingFilePath", '*.png', '*.exe')
|
||||||
|
$msg = "Pre-req: Code Formatting"
|
||||||
|
Invoke-Preprocessing -WorkingDir "$workingdir" -ExcludedFiles $excludedFiles -ProgressStatusMessage $msg
|
||||||
}
|
}
|
||||||
|
|
||||||
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
# Create the script in memory.
|
||||||
Write-output "`$inputXML = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
|
Update-Progress "Pre-req: Allocating Memory" 0
|
||||||
|
$script_content = [System.Collections.Generic.List[string]]::new()
|
||||||
|
|
||||||
|
Update-Progress "Adding: Header" 5
|
||||||
|
$script_content.Add($header)
|
||||||
|
|
||||||
|
Update-Progress "Adding: Version" 10
|
||||||
|
$script_content.Add($(Get-Content "$workingdir\scripts\start.ps1").replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
||||||
|
|
||||||
|
Update-Progress "Adding: Functions" 20
|
||||||
|
Get-ChildItem "$workingdir\functions" -Recurse -File | ForEach-Object {
|
||||||
|
$script_content.Add($(Get-Content $psitem.FullName))
|
||||||
|
}
|
||||||
|
Update-Progress "Adding: Config *.json" 40
|
||||||
|
Get-ChildItem "$workingdir\config" | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
||||||
|
|
||||||
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
|
||||||
$json = (Get-Content $psitem.FullName).replace("'","''")
|
$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)
|
||||||
|
# Make an Array List containing every name at first level of Json File
|
||||||
|
$jsonAsObject = $json | convertfrom-json
|
||||||
|
$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]
|
||||||
|
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
||||||
|
$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('>','>').replace('—','—')
|
||||||
|
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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
|
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
||||||
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" ))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$xaml = (Get-Content "$workingdir\xaml\inputXML.xaml").replace("'","''")
|
||||||
|
|
||||||
# Dot-source the Get-TabXaml function
|
# Dot-source the Get-TabXaml function
|
||||||
. .\functions\private\Get-TabXaml.ps1
|
. "$workingdir\functions\private\Get-TabXaml.ps1"
|
||||||
|
|
||||||
## Xaml Manipulation
|
Update-Progress "Building: Xaml " 75
|
||||||
$tabColumns = Get-TabXaml "applications" 5
|
$appXamlContent = Get-TabXaml "applications" 5
|
||||||
$tabColumns | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii
|
$tweaksXamlContent = Get-TabXaml "tweaks"
|
||||||
$tabColumns = Get-TabXaml "tweaks"
|
$featuresXamlContent = Get-TabXaml "feature"
|
||||||
$tabColumns | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii
|
|
||||||
$tabColumns = Get-TabXaml "feature"
|
|
||||||
$tabColumns | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii
|
|
||||||
|
|
||||||
Get-Content .\scripts\main.ps1 | Out-File ./$scriptname -Append -Encoding ascii
|
|
||||||
|
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
|
||||||
|
$xaml = $xaml -replace "{{InstallPanel_features}}", $featuresXamlContent
|
||||||
|
|
||||||
|
$script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
||||||
|
|
||||||
|
$script_content.Add($(Get-Content "$workingdir\scripts\main.ps1"))
|
||||||
|
|
||||||
|
if ($Debug) {
|
||||||
|
Update-Progress "Writing debug files" 95
|
||||||
|
$appXamlContent | Out-File -FilePath "$workingdir\xaml\inputApp.xaml" -Encoding ascii
|
||||||
|
$tweaksXamlContent | Out-File -FilePath "$workingdir\xaml\inputTweaks.xaml" -Encoding ascii
|
||||||
|
$featuresXamlContent | Out-File -FilePath "$workingdir\xaml\inputFeatures.xaml" -Encoding ascii
|
||||||
|
} else {
|
||||||
|
Update-Progress "Removing temporary files" 99
|
||||||
|
Remove-Item "$workingdir\xaml\inputApp.xaml" -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item "$workingdir\xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item "$workingdir\xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-Content -Path "$workingdir\$scriptname" -Value ($script_content -join "`r`n") -Encoding ascii
|
||||||
|
Write-Progress -Activity "Compiling" -Completed
|
||||||
|
|
||||||
|
Update-Progress -Activity "Validating" -StatusMessage "Checking winutil.ps1 Syntax" -Percent 0
|
||||||
|
try {
|
||||||
|
$null = Get-Command -Syntax .\winutil.ps1
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Warning "Syntax Validation for 'winutil.ps1' has failed"
|
||||||
|
Write-Host "$($Error[0])" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
Write-Progress -Activity "Validating" -Completed
|
||||||
|
|
||||||
|
if ($run) {
|
||||||
|
try {
|
||||||
|
Start-Process -FilePath "pwsh" -ArgumentList "$workingdir\$scriptname"
|
||||||
|
} catch {
|
||||||
|
Start-Process -FilePath "powershell" -ArgumentList "$workingdir\$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
|
|
||||||
```
|
|
135
README.md
@ -1,143 +1,64 @@
|
|||||||
# Chris Titus Tech's Windows Utility
|
# Chris Titus Tech's Windows Utility
|
||||||
|
|
||||||
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.
|
[](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
|

|
||||||
|
|
||||||
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:
|
## 💡 Usage
|
||||||
|
|
||||||
1. **Right-Click Method:**
|
Winutil must be run in Admin mode because it performs system-wide tweaks. To achieve this, run PowerShell as an administrator. Here are a few ways to do it:
|
||||||
|
|
||||||
|
1. **Start menu Method:**
|
||||||
- Right-click on the start menu.
|
- Right-click on the start menu.
|
||||||
- Choose "PowerShell As Admin" (for Windows 10) or "Windows Terminal As Admin" (for Windows 11).
|
- Choose "Windows PowerShell (Admin)" (for Windows 10) or "Terminal (Admin)" (for Windows 11).
|
||||||
|
|
||||||
2. **Search and Launch Method:**
|
2. **Search and Launch Method:**
|
||||||
- Press the Windows key.
|
- Press the Windows key.
|
||||||
- Type "PowerShell" or "Terminal" (for Windows 11).
|
- Type "PowerShell" or "Terminal" (for Windows 11).
|
||||||
- Press `Ctrl + Shift + Enter` to launch it with administrator privileges.
|
- Press `Ctrl + Shift + Enter` or Right-click and choose "Run as administrator" to launch it with administrator privileges.
|
||||||
|
|
||||||
|
|
||||||
### Launch Command
|
### Launch Command
|
||||||
|
|
||||||
#### Simple way
|
#### Stable Branch (Recommended)
|
||||||
|
|
||||||
|
```ps1
|
||||||
|
irm "https://christitus.com/win" | iex
|
||||||
```
|
```
|
||||||
iwr -useb https://christitus.com/win | iex
|
#### Dev Branch
|
||||||
```
|
|
||||||
or by executing:
|
|
||||||
```
|
|
||||||
irm https://christitus.com/win | iex
|
|
||||||
```
|
|
||||||
Courtesy of the issue raised at: [#144](/../../issues/144)
|
|
||||||
|
|
||||||
if for some reason this site is not reachable from your country please try running it directly from github
|
```ps1
|
||||||
|
irm "https://christitus.com/windev" | iex
|
||||||
```
|
|
||||||
irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winutil.ps1 | iex
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Automation
|
If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/)
|
||||||
|
|
||||||
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
|
## 🎓 Documentation
|
||||||
|
|
||||||
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
### [WinUtil Official Documentation](https://christitustech.github.io/winutil/)
|
||||||

|
|
||||||
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.
|
|
||||||
```
|
|
||||||
irm https://christitus.com/win -Config [path-to-your-config] -Run | iex
|
|
||||||
```
|
|
||||||
7. Have a cup of coffee! Come back when it's done.
|
|
||||||
|
|
||||||
|
### [YouTube Tutorial](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
|
||||||
|
|
||||||
## Issues:
|
### [ChrisTitus.com Article](https://christitus.com/windows-tool/)
|
||||||
|
|
||||||
- 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.
|
## 💖 Support
|
||||||
|
|
||||||
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
|
|
||||||
- To morally and mentally support the project, make sure to leave a ⭐️!
|
- To morally and mentally support the project, make sure to leave a ⭐️!
|
||||||
- EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox
|
- 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/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="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><!-- sponsors -->
|
||||||
|
|
||||||
- Install
|
## 🏅 Thanks to all Contributors
|
||||||
- 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.
|
|
||||||
|
|
||||||
- Misc. Tweaks: Encompasses a range of various tweaks to further optimize the system. These tweaks include enabling/disabling power throttling, enabling num lock on startup, removing Cortana and Edge, disabling User Account Control (UAC), notification panel, and configuring TPM during updates, 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
|
|
||||||
|
|
||||||
To contribute new code, please ensure that it is submitted to the **TEST BRANCH**. Please note that merges will not be performed directly on the MAIN branch.
|
|
||||||
|
|
||||||
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 a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||||
|
|
||||||
[](https://github.com/ChrisTitusTech/winutil/graphs/contributors)
|
[](https://github.com/ChrisTitusTech/winutil/graphs/contributors)
|
||||||
|
|
||||||
## GitHub Stats
|
## 📊 GitHub Stats
|
||||||
|
|
||||||

|

|
||||||
|
442
autounattend.xml
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||||
|
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Random&TimeZoneMode=Implicit&PartitionMode=Interactive&WindowsEditionMode=Unattended&WindowsEdition=pro&UserAccountMode=Unattended&AccountName0=User&AccountPassword0=&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&DisableWidgets=true&ClassicContextMenu=true&DisableFastStartup=true&EnableLongPaths=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&WifiMode=Skip&ExpressSettings=DisableAll&Remove3DViewer=true&RemoveBingSearch=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveZuneVideo=true&RemoveNews=true&RemoveNotepad=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePowerAutomate=true&RemoveQuickAssist=true&RemoveSkype=true&RemoveSolitaire=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWeather=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&WdacMode=Skip-->
|
||||||
|
<settings pass="offlineServicing"></settings>
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SetupUILanguage>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
</SetupUILanguage>
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserData>
|
||||||
|
<ProductKey>
|
||||||
|
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
|
||||||
|
</ProductKey>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
</UserData>
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize"></settings>
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "UninstallCopilot" /t REG_SZ /d "powershell.exe -NoProfile -Command \"Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;\"" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>5</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>6</Order>
|
||||||
|
<Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>7</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>8</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>9</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>10</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>11</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>12</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>13</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>14</Order>
|
||||||
|
<Path>reg.exe delete "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>15</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>16</Order>
|
||||||
|
<Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>17</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>18</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>19</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-packages.ps1' -Raw | Invoke-Expression;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>20</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-caps.ps1' -Raw | Invoke-Expression;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>21</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>22</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>23</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>24</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>25</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>net.exe accounts /maxpwage:UNLIMITED</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>27</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>28</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>29</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>30</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>31</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>32</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>33</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>34</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>35</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>36</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>37</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>38</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>39</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>40</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>41</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>42</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>43</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>44</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>45</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>46</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>47</Order>
|
||||||
|
<Path>reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>48</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>49</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>50</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "ClassicContextMenu" /t REG_SZ /d "reg.exe add \"HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32\" /ve /f" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>51</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="auditSystem"></settings>
|
||||||
|
<settings pass="auditUser"></settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Name>User</Name>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Password>
|
||||||
|
<Value></Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Username>User</Username>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Password>
|
||||||
|
<Value></Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
|
<OOBE>
|
||||||
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
</OOBE>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<Extensions xmlns="https://schneegans.de/windows/unattend-generator/">
|
||||||
|
<ExtractScript>
|
||||||
|
param(
|
||||||
|
[xml] $Document
|
||||||
|
);
|
||||||
|
|
||||||
|
$scriptsDir = 'C:\Windows\Setup\Scripts\';
|
||||||
|
foreach( $file in $Document.unattend.Extensions.File ) {
|
||||||
|
$path = [System.Environment]::ExpandEnvironmentVariables(
|
||||||
|
$file.GetAttribute( 'path' )
|
||||||
|
);
|
||||||
|
if( $path.StartsWith( $scriptsDir ) ) {
|
||||||
|
mkdir -Path $scriptsDir -ErrorAction 'SilentlyContinue';
|
||||||
|
}
|
||||||
|
$encoding = switch( [System.IO.Path]::GetExtension( $path ) ) {
|
||||||
|
{ $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; }
|
||||||
|
{ $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); }
|
||||||
|
default { [System.Text.Encoding]::Default; }
|
||||||
|
};
|
||||||
|
[System.IO.File]::WriteAllBytes( $path, ( $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ) ) );
|
||||||
|
}
|
||||||
|
</ExtractScript>
|
||||||
|
<File path="C:\Windows\Temp\remove-packages.ps1">
|
||||||
|
$selectors = @(
|
||||||
|
'Microsoft.Microsoft3DViewer';
|
||||||
|
'Microsoft.BingSearch';
|
||||||
|
'Microsoft.WindowsCamera';
|
||||||
|
'Clipchamp.Clipchamp';
|
||||||
|
'Microsoft.WindowsAlarms';
|
||||||
|
'Microsoft.549981C3F5F10';
|
||||||
|
'Microsoft.Windows.DevHome';
|
||||||
|
'MicrosoftCorporationII.MicrosoftFamily';
|
||||||
|
'Microsoft.WindowsFeedbackHub';
|
||||||
|
'Microsoft.GetHelp';
|
||||||
|
'Microsoft.Getstarted';
|
||||||
|
'microsoft.windowscommunicationsapps';
|
||||||
|
'Microsoft.WindowsMaps';
|
||||||
|
'Microsoft.BingNews';
|
||||||
|
'Microsoft.WindowsNotepad';
|
||||||
|
'Microsoft.MicrosoftOfficeHub';
|
||||||
|
'Microsoft.Office.OneNote';
|
||||||
|
'Microsoft.OutlookForWindows';
|
||||||
|
'Microsoft.MSPaint';
|
||||||
|
'Microsoft.People';
|
||||||
|
'Microsoft.PowerAutomateDesktop';
|
||||||
|
'MicrosoftCorporationII.QuickAssist';
|
||||||
|
'Microsoft.SkypeApp';
|
||||||
|
'Microsoft.MicrosoftSolitaireCollection';
|
||||||
|
'Microsoft.MicrosoftStickyNotes';
|
||||||
|
'MSTeams';
|
||||||
|
'Microsoft.Todos';
|
||||||
|
'Microsoft.WindowsSoundRecorder';
|
||||||
|
'Microsoft.BingWeather';
|
||||||
|
'Microsoft.ZuneMusic';
|
||||||
|
'Microsoft.ZuneVideo';
|
||||||
|
);
|
||||||
|
$getCommand = { Get-AppxProvisionedPackage -Online; };
|
||||||
|
$filterCommand = { $_.DisplayName -eq $selector; };
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Package';
|
||||||
|
$logfile = 'C:\Windows\Temp\remove-packages.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Temp\remove-caps.ps1">
|
||||||
|
$selectors = @(
|
||||||
|
'Browser.InternetExplorer';
|
||||||
|
'MathRecognizer';
|
||||||
|
'OpenSSH.Client';
|
||||||
|
'App.Support.QuickAssist';
|
||||||
|
'App.StepsRecorder';
|
||||||
|
'Media.WindowsMediaPlayer';
|
||||||
|
'Microsoft.Windows.WordPad';
|
||||||
|
);
|
||||||
|
$getCommand = { Get-WindowsCapability -Online; };
|
||||||
|
$filterCommand = { ($_.Name -split '~')[0] -eq $selector; };
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Capability';
|
||||||
|
$logfile = 'C:\Windows\Temp\remove-caps.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml"><![CDATA[
|
||||||
|
<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
|
||||||
|
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||||
|
<DefaultLayoutOverride>
|
||||||
|
<StartLayoutCollection>
|
||||||
|
<StartLayout GroupCellWidth="6" xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" />
|
||||||
|
</StartLayoutCollection>
|
||||||
|
</DefaultLayoutOverride>
|
||||||
|
</LayoutModificationTemplate>
|
||||||
|
]]></File>
|
||||||
|
</Extensions>
|
||||||
|
</unattend>
|
5224
config/applications.json
Executable file → Normal file
@ -1,30 +1,50 @@
|
|||||||
{
|
{
|
||||||
"Google":{
|
"Google":{
|
||||||
"Primary": "8.8.8.8",
|
"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":{
|
"Cloudflare":{
|
||||||
"Primary": "1.1.1.1",
|
"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":{
|
"Cloudflare_Malware":{
|
||||||
"Primary": "1.1.1.2",
|
"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":{
|
"Cloudflare_Malware_Adult":{
|
||||||
"Primary": "1.1.1.3",
|
"Primary": "1.1.1.3",
|
||||||
"Secondary": "1.0.0.3"
|
"Secondary": "1.0.0.3",
|
||||||
},
|
"Primary6": "2606:4700:4700::1113",
|
||||||
"Level3":{
|
"Secondary6": "2606:4700:4700::1003"
|
||||||
"Primary": "4.2.2.2",
|
|
||||||
"Secondary": "4.2.2.1"
|
|
||||||
},
|
},
|
||||||
"Open_DNS":{
|
"Open_DNS":{
|
||||||
"Primary": "208.67.222.222",
|
"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":{
|
"Quad9":{
|
||||||
"Primary": "9.9.9.9",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
"NetFx4-AdvSrvs",
|
"NetFx4-AdvSrvs",
|
||||||
"NetFx3"
|
"NetFx3"
|
||||||
],
|
],
|
||||||
"InvokeScript": [
|
"InvokeScript": [],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/dotnet"
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WPFFeatureshyperv": {
|
"WPFFeatureshyperv": {
|
||||||
"Content": "HyperV Virtualization",
|
"Content": "HyperV Virtualization",
|
||||||
@ -31,7 +30,8 @@
|
|||||||
],
|
],
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait"
|
"Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/hyperv"
|
||||||
},
|
},
|
||||||
"WPFFeatureslegacymedia": {
|
"WPFFeatureslegacymedia": {
|
||||||
"Content": "Legacy Media (WMP, DirectPlay)",
|
"Content": "Legacy Media (WMP, DirectPlay)",
|
||||||
@ -45,9 +45,8 @@
|
|||||||
"DirectPlay",
|
"DirectPlay",
|
||||||
"LegacyComponents"
|
"LegacyComponents"
|
||||||
],
|
],
|
||||||
"InvokeScript": [
|
"InvokeScript": [],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/legacymedia"
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WPFFeaturewsl": {
|
"WPFFeaturewsl": {
|
||||||
"Content": "Windows Subsystem for Linux",
|
"Content": "Windows Subsystem for Linux",
|
||||||
@ -59,9 +58,8 @@
|
|||||||
"VirtualMachinePlatform",
|
"VirtualMachinePlatform",
|
||||||
"Microsoft-Windows-Subsystem-Linux"
|
"Microsoft-Windows-Subsystem-Linux"
|
||||||
],
|
],
|
||||||
"InvokeScript": [
|
"InvokeScript": [],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/wsl"
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WPFFeaturenfs": {
|
"WPFFeaturenfs": {
|
||||||
"Content": "NFS - Network File System",
|
"Content": "NFS - Network File System",
|
||||||
@ -80,7 +78,8 @@
|
|||||||
"Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0",
|
"Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0",
|
||||||
"nfsadmin client start",
|
"nfsadmin client start",
|
||||||
"nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i"
|
"nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/nfs"
|
||||||
},
|
},
|
||||||
"WPFFeatureEnableSearchSuggestions": {
|
"WPFFeatureEnableSearchSuggestions": {
|
||||||
"Content": "Enable Search Box Web Suggestions in Registry(explorer restart)",
|
"Content": "Enable Search Box Web Suggestions in Registry(explorer restart)",
|
||||||
@ -88,8 +87,7 @@
|
|||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a015_",
|
"Order": "a015_",
|
||||||
"feature": [
|
"feature": [],
|
||||||
],
|
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) {
|
If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) {
|
||||||
@ -98,7 +96,8 @@
|
|||||||
New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force
|
New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force
|
||||||
Stop-Process -name explorer -force
|
Stop-Process -name explorer -force
|
||||||
"
|
"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/EnableSearchSuggestions"
|
||||||
},
|
},
|
||||||
"WPFFeatureDisableSearchSuggestions": {
|
"WPFFeatureDisableSearchSuggestions": {
|
||||||
"Content": "Disable Search Box Web Suggestions in Registry(explorer restart)",
|
"Content": "Disable Search Box Web Suggestions in Registry(explorer restart)",
|
||||||
@ -106,8 +105,7 @@
|
|||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a016_",
|
"Order": "a016_",
|
||||||
"feature": [
|
"feature": [],
|
||||||
],
|
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) {
|
If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) {
|
||||||
@ -116,7 +114,8 @@
|
|||||||
New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force
|
New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force
|
||||||
Stop-Process -name explorer -force
|
Stop-Process -name explorer -force
|
||||||
"
|
"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/DisableSearchSuggestions"
|
||||||
},
|
},
|
||||||
"WPFFeatureRegBackup": {
|
"WPFFeatureRegBackup": {
|
||||||
"Content": "Enable Daily Registry Backup Task 12.30am",
|
"Content": "Enable Daily Registry Backup Task 12.30am",
|
||||||
@ -124,8 +123,7 @@
|
|||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a017_",
|
"Order": "a017_",
|
||||||
"feature": [
|
"feature": [],
|
||||||
],
|
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force
|
||||||
@ -134,7 +132,8 @@
|
|||||||
$trigger = New-ScheduledTaskTrigger -Daily -At 00:30
|
$trigger = New-ScheduledTaskTrigger -Daily -At 00:30
|
||||||
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System'
|
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System'
|
||||||
"
|
"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/RegBackup"
|
||||||
},
|
},
|
||||||
"WPFFeatureEnableLegacyRecovery": {
|
"WPFFeatureEnableLegacyRecovery": {
|
||||||
"Content": "Enable Legacy F8 Boot Recovery",
|
"Content": "Enable Legacy F8 Boot Recovery",
|
||||||
@ -142,8 +141,7 @@
|
|||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a018_",
|
"Order": "a018_",
|
||||||
"feature": [
|
"feature": [],
|
||||||
],
|
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) {
|
If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) {
|
||||||
@ -152,7 +150,8 @@
|
|||||||
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force
|
||||||
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait
|
||||||
"
|
"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/EnableLegacyRecovery"
|
||||||
},
|
},
|
||||||
"WPFFeatureDisableLegacyRecovery": {
|
"WPFFeatureDisableLegacyRecovery": {
|
||||||
"Content": "Disable Legacy F8 Boot Recovery",
|
"Content": "Disable Legacy F8 Boot Recovery",
|
||||||
@ -160,8 +159,7 @@
|
|||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a019_",
|
"Order": "a019_",
|
||||||
"feature": [
|
"feature": [],
|
||||||
],
|
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) {
|
If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) {
|
||||||
@ -170,104 +168,134 @@
|
|||||||
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force
|
||||||
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait
|
||||||
"
|
"
|
||||||
]
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/DisableLegacyRecovery"
|
||||||
},
|
},
|
||||||
"WPFFeaturesandbox": {
|
"WPFFeaturesSandbox": {
|
||||||
"Content": "Windows Sandbox",
|
"Content": "Windows Sandbox",
|
||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a021_",
|
"Order": "a021_",
|
||||||
"Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation."
|
"Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/Sandbox"
|
||||||
},
|
},
|
||||||
"WPFFeatureInstall": {
|
"WPFFeatureInstall": {
|
||||||
"Content": "Install Features",
|
"Content": "Install Features",
|
||||||
"category": "Features",
|
"category": "Features",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a060_",
|
"Order": "a060_",
|
||||||
"Type": "150"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/Install"
|
||||||
},
|
},
|
||||||
"WPFPanelAutologin": {
|
"WPFPanelAutologin": {
|
||||||
"Content": "Set Up Autologin",
|
"Content": "Set Up Autologin",
|
||||||
"category": "Fixes",
|
"category": "Fixes",
|
||||||
"Order": "a040_",
|
"Order": "a040_",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Type": "300"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Autologin"
|
||||||
},
|
},
|
||||||
"WPFFixesUpdate": {
|
"WPFFixesUpdate": {
|
||||||
"Content": "Reset Windows Update",
|
"Content": "Reset Windows Update",
|
||||||
"category": "Fixes",
|
"category": "Fixes",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a041_",
|
"Order": "a041_",
|
||||||
"Type": "300"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Update"
|
||||||
},
|
},
|
||||||
"WPFFixesNetwork": {
|
"WPFFixesNetwork": {
|
||||||
"Content": "Reset Network",
|
"Content": "Reset Network",
|
||||||
"category": "Fixes",
|
"category": "Fixes",
|
||||||
"Order": "a042_",
|
"Order": "a042_",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Type": "300"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Network"
|
||||||
},
|
},
|
||||||
"WPFPanelDISM": {
|
"WPFPanelDISM": {
|
||||||
"Content": "System Corruption Scan",
|
"Content": "System Corruption Scan",
|
||||||
"category": "Fixes",
|
"category": "Fixes",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a043_",
|
"Order": "a043_",
|
||||||
"Type": "300"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/DISM"
|
||||||
},
|
},
|
||||||
"WPFFixesWinget": {
|
"WPFFixesWinget": {
|
||||||
"Content": "WinGet Reinstall",
|
"Content": "WinGet Reinstall",
|
||||||
"category": "Fixes",
|
"category": "Fixes",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a044_",
|
"Order": "a044_",
|
||||||
"Type": "300"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Winget"
|
||||||
},
|
},
|
||||||
"WPFRunAdobeCCCleanerTool": {
|
"WPFRunAdobeCCCleanerTool": {
|
||||||
"Content": "Remove Adobe Creative Cloud",
|
"Content": "Remove Adobe Creative Cloud",
|
||||||
"category": "Fixes",
|
"category": "Fixes",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a045_",
|
"Order": "a045_",
|
||||||
"Type": "300"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/RunAdobeCCCleanerTool"
|
||||||
},
|
},
|
||||||
"WPFPanelnetwork": {
|
"WPFPanelnetwork": {
|
||||||
"Content": "Network Connections",
|
"Content": "Network Connections",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/network"
|
||||||
},
|
},
|
||||||
"WPFPanelcontrol": {
|
"WPFPanelcontrol": {
|
||||||
"Content": "Control Panel",
|
"Content": "Control Panel",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/control"
|
||||||
},
|
},
|
||||||
"WPFPanelpower": {
|
"WPFPanelpower": {
|
||||||
"Content": "Power Panel",
|
"Content": "Power Panel",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/power"
|
||||||
},
|
},
|
||||||
"WPFPanelregion": {
|
"WPFPanelregion": {
|
||||||
"Content": "Region",
|
"Content": "Region",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/region"
|
||||||
},
|
},
|
||||||
"WPFPanelsound": {
|
"WPFPanelsound": {
|
||||||
"Content": "Sound Settings",
|
"Content": "Sound Settings",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/sound"
|
||||||
},
|
},
|
||||||
"WPFPanelsystem": {
|
"WPFPanelsystem": {
|
||||||
"Content": "System Properties",
|
"Content": "System Properties",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/system"
|
||||||
},
|
},
|
||||||
"WPFPaneluser": {
|
"WPFPaneluser": {
|
||||||
"Content": "User Accounts",
|
"Content": "User Accounts",
|
||||||
"category": "Legacy Windows Panels",
|
"category": "Legacy Windows Panels",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Type": "200"
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/user"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,32 +1,25 @@
|
|||||||
{
|
{
|
||||||
"desktop": [
|
"Standard": [
|
||||||
"WPFTweaksAH",
|
"WPFTweaksAH",
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksDVR",
|
"WPFTweaksDVR",
|
||||||
"WPFTweaksHiber",
|
"WPFTweaksHiber",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"WPFTweaksLoc",
|
"WPFTweaksLoc",
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
"WPFTweaksServices",
|
||||||
"WPFTweaksStorage",
|
"WPFTweaksStorage",
|
||||||
"WPFTweaksTele",
|
"WPFTweaksTele",
|
||||||
"WPFTweaksWifi",
|
"WPFTweaksWifi",
|
||||||
"WPFMiscTweaksPower"
|
"WPFTweaksDiskCleanup",
|
||||||
|
"WPFTweaksDeleteTempFiles",
|
||||||
|
"WPFTweaksEndTaskOnTaskbar",
|
||||||
|
"WPFTweaksRestorePoint",
|
||||||
|
"WPFTweaksTeredo",
|
||||||
|
"WPFTweaksPowershell7Tele"
|
||||||
],
|
],
|
||||||
"laptop": [
|
"Minimal": [
|
||||||
"WPFTweaksAH",
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksDVR",
|
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"WPFTweaksLoc",
|
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
|
||||||
"WPFTweaksStorage",
|
|
||||||
"WPFTweaksTele",
|
|
||||||
"WPFTweaksWifi",
|
|
||||||
"WPFMiscTweaksLapPower"
|
|
||||||
],
|
|
||||||
"minimal": [
|
|
||||||
"WPFTweaksHome",
|
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
"WPFTweaksServices",
|
||||||
"WPFTweaksTele"
|
"WPFTweaksTele"
|
||||||
]
|
]
|
||||||
|
@ -1,14 +1,55 @@
|
|||||||
{
|
{
|
||||||
"Classic": {
|
"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",
|
||||||
|
|
||||||
|
"ProgressBarForegroundColor": "#FFAC1C",
|
||||||
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
|
"ProgressBarTextColor": "#000000",
|
||||||
|
|
||||||
"ComboBoxBackgroundColor": "#FFFFFF",
|
"ComboBoxBackgroundColor": "#FFFFFF",
|
||||||
"LabelboxForegroundColor": "#000000",
|
"LabelboxForegroundColor": "#000000",
|
||||||
"MainForegroundColor": "#000000",
|
"MainForegroundColor": "#000000",
|
||||||
"MainBackgroundColor": "#FFFFFF",
|
"MainBackgroundColor": "#FFFFFF",
|
||||||
"LabelBackgroundColor": "#FAFAFA",
|
"LabelBackgroundColor": "#FAFAFA",
|
||||||
"LinkForegroundColor": "#000000",
|
"LinkForegroundColor": "#000000",
|
||||||
"LinkHoverForegroundColor": "#000000",
|
"LinkHoverForegroundColor": "#000000",
|
||||||
"GroupBorderBackgroundColor": "#000000",
|
"GroupBorderBackgroundColor": "#000000",
|
||||||
"ComboBoxForegroundColor": "#000000",
|
"ComboBoxForegroundColor": "#000000",
|
||||||
|
|
||||||
|
"ButtonFontSize": "12",
|
||||||
|
"ButtonFontFamily": "Arial",
|
||||||
|
"ButtonWidth": "200",
|
||||||
|
"ButtonHeight": "25",
|
||||||
|
"ConfigTabButtonFontSize": "16",
|
||||||
|
|
||||||
|
"SearchBarWidth": "200",
|
||||||
|
"SearchBarHeight": "25",
|
||||||
|
"SearchBarTextBoxFontSize": "16",
|
||||||
|
"SearchBarClearButtonFontSize": "14",
|
||||||
|
|
||||||
"ButtonInstallBackgroundColor": "#FFFFFF",
|
"ButtonInstallBackgroundColor": "#FFFFFF",
|
||||||
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
||||||
"ButtonConfigBackgroundColor": "#FFFFFF",
|
"ButtonConfigBackgroundColor": "#FFFFFF",
|
||||||
@ -23,42 +64,157 @@
|
|||||||
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
||||||
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
||||||
"ButtonForegroundColor": "#000000",
|
"ButtonForegroundColor": "#000000",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
|
|
||||||
"ButtonBorderThickness": "1",
|
"ButtonBorderThickness": "1",
|
||||||
"ButtonMargin": "1",
|
"ButtonMargin": "1",
|
||||||
"ButtonCornerRadius": "2",
|
"ButtonCornerRadius": "2",
|
||||||
"ToggleButtonHeight": "25",
|
|
||||||
"BorderColor": "#000000",
|
"BorderColor": "#000000",
|
||||||
"BorderOpacity": "0.2",
|
"BorderOpacity": "0.2",
|
||||||
"ShadowPulse": "Forever"
|
"ShadowPulse": "Forever"
|
||||||
},
|
},
|
||||||
"Matrix": {
|
"Matrix": {
|
||||||
"ComboBoxBackgroundColor": "#000000",
|
"CustomDialogFontSize": "12",
|
||||||
"LabelboxForegroundColor": "#FFEE58",
|
"CustomDialogFontSizeHeader": "14",
|
||||||
"MainForegroundColor": "#9CCC65",
|
"CustomDialogIconSize": "25",
|
||||||
"MainBackgroundColor": "#000000",
|
"CustomDialogWidth": "400",
|
||||||
"LabelBackgroundColor": "#000000",
|
"CustomDialogHeight": "200",
|
||||||
"LinkForegroundColor": "#add8e6",
|
|
||||||
"LinkHoverForegroundColor": "#FFFFFF",
|
"FontSize": "12",
|
||||||
"ComboBoxForegroundColor": "#FFEE58",
|
"FontFamily": "Arial",
|
||||||
"ButtonInstallBackgroundColor": "#222222",
|
"FontSizeHeading": "14",
|
||||||
"ButtonTweaksBackgroundColor": "#333333",
|
"HeaderFontFamily": "Consolas, Monaco",
|
||||||
"ButtonConfigBackgroundColor": "#444444",
|
|
||||||
"ButtonUpdatesBackgroundColor": "#555555",
|
"CheckBoxBulletDecoratorFontSize": "14",
|
||||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
"CheckBoxMargin": "15,0,0,2",
|
||||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
"TabButtonFontSize": "14",
|
||||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
"TabButtonWidth": "100",
|
||||||
"ButtonBackgroundColor": "#000019",
|
"TabButtonHeight": "25",
|
||||||
"ButtonBackgroundPressedColor": "#FFFFFF",
|
"TabRowHeightInPixels": "50",
|
||||||
"ButtonBackgroundMouseoverColor": "#A55A64",
|
"IconFontSize": "14",
|
||||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
"IconButtonSize": "35",
|
||||||
"ButtonForegroundColor": "#9CCC65",
|
"WinUtilIconSize": "Auto",
|
||||||
"ButtonBorderThickness": "1",
|
"SettingsIconFontSize": "18",
|
||||||
"ButtonMargin": "1",
|
|
||||||
"ButtonCornerRadius": "2",
|
"MicroWinLogoSize": "10",
|
||||||
"ToggleButtonHeight": "25",
|
|
||||||
"BorderColor": "#FFAC1C",
|
"ProgressBarForegroundColor": "#222222",
|
||||||
"BorderOpacity": "0.8",
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
"ShadowPulse": "0:0:3"
|
"ProgressBarTextColor": "#cccccc",
|
||||||
|
|
||||||
|
"ComboBoxBackgroundColor": "#000000",
|
||||||
|
"LabelboxForegroundColor": "#FFEE58",
|
||||||
|
"MainForegroundColor": "#9CCC65",
|
||||||
|
"MainBackgroundColor": "#000000",
|
||||||
|
"LabelBackgroundColor": "#000000",
|
||||||
|
"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",
|
||||||
|
"ButtonUpdatesBackgroundColor": "#555555",
|
||||||
|
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonBackgroundColor": "#000019",
|
||||||
|
"ButtonBackgroundPressedColor": "#FFFFFF",
|
||||||
|
"ButtonBackgroundMouseoverColor": "#A55A64",
|
||||||
|
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||||
|
"ButtonForegroundColor": "#9CCC65",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
|
|
||||||
|
"ButtonBorderThickness": "1",
|
||||||
|
"ButtonMargin": "1",
|
||||||
|
"ButtonCornerRadius": "2",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
"ProgressBarForegroundColor": "#222222",
|
||||||
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
|
"ProgressBarTextColor": "#FFFFFF",
|
||||||
|
|
||||||
|
"ComboBoxBackgroundColor": "#000000",
|
||||||
|
"LabelboxForegroundColor": "#FFEE58",
|
||||||
|
"MainForegroundColor": "#9CCC65",
|
||||||
|
"MainBackgroundColor": "#000000",
|
||||||
|
"LabelBackgroundColor": "#000000",
|
||||||
|
"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",
|
||||||
|
"ButtonUpdatesBackgroundColor": "#555555",
|
||||||
|
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonBackgroundColor": "#000019",
|
||||||
|
"ButtonBackgroundPressedColor": "#9CCC65",
|
||||||
|
"ButtonBackgroundMouseoverColor": "#FF5733",
|
||||||
|
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||||
|
"ButtonForegroundColor": "#9CCC65",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
|
|
||||||
|
"ButtonBorderThickness": "1",
|
||||||
|
"ButtonMargin": "1",
|
||||||
|
"ButtonCornerRadius": "2",
|
||||||
|
"BorderColor": "#FFAC1C",
|
||||||
|
"BorderOpacity": "0.2",
|
||||||
|
"ShadowPulse": "Forever"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1220
config/tweaks.json
644
devdocs-generator.ps1
Normal file
@ -0,0 +1,644 @@
|
|||||||
|
<#
|
||||||
|
.DESCRIPTION
|
||||||
|
This script generates markdown files for the development documentation based on the existing JSON files.
|
||||||
|
Create table of content and archive any files in the dev folder not modified by this script.
|
||||||
|
This script is not meant to be used manually, it is called by the github action workflow.
|
||||||
|
#>
|
||||||
|
|
||||||
|
function Process-MultilineStrings {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$str
|
||||||
|
)
|
||||||
|
|
||||||
|
$lines = $str.Split("`r`n")
|
||||||
|
$count = $lines.Count
|
||||||
|
|
||||||
|
# Loop through every line, expect last line in the string
|
||||||
|
# We'll add it after the for loop
|
||||||
|
for ($i = 0; $i -lt ($count - 1); $i++) {
|
||||||
|
$line = $lines[$i]
|
||||||
|
$processedStr += $line -replace ('^\s*\\\\', '')
|
||||||
|
# Add the previously removed NewLine character by 'Split' Method
|
||||||
|
$processedStr += "`r`n"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add last line *without* a NewLine character.
|
||||||
|
$processedStr += $lines[$($count - 1)] -replace ('^\s*\\\\', '')
|
||||||
|
|
||||||
|
return $processedStr
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
function Load-Functions {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$dir
|
||||||
|
)
|
||||||
|
|
||||||
|
Get-ChildItem -Path $dir -Filter *.ps1 | ForEach-Object {
|
||||||
|
$functionName = $_.BaseName
|
||||||
|
$functionContent = Get-Content -Path $_.FullName -Raw
|
||||||
|
$functions[$functionName] = $functionContent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-CalledFunctions {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
$scriptContent,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=1)]
|
||||||
|
[hashtable]$functionList,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=2)]
|
||||||
|
[ref]$processedFunctions
|
||||||
|
)
|
||||||
|
|
||||||
|
$calledFunctions = @()
|
||||||
|
foreach ($functionName in $functionList.Keys) {
|
||||||
|
if ($scriptContent -match "\b$functionName\b" -and -not $processedFunctions.Value.Contains($functionName)) {
|
||||||
|
$calledFunctions += $functionName
|
||||||
|
$processedFunctions.Value.Add($functionName)
|
||||||
|
if ($functionList[$functionName]) {
|
||||||
|
$nestedFunctions = Get-CalledFunctions -scriptContent $functionList[$functionName] -functionList $functionList -processedFunctions $processedFunctions
|
||||||
|
$calledFunctions += $nestedFunctions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $calledFunctions
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-AdditionalFunctionsFromToggle {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$buttonName
|
||||||
|
)
|
||||||
|
|
||||||
|
$invokeWpfToggleContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFToggle.ps1" -Raw
|
||||||
|
$lines = $invokeWpfToggleContent -split "`r`n"
|
||||||
|
foreach ($line in $lines) {
|
||||||
|
if ($line -match "`"$buttonName`" \{Invoke-(WinUtil[a-zA-Z]+)") {
|
||||||
|
return $matches[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-AdditionalFunctionsFromButton {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$buttonName
|
||||||
|
)
|
||||||
|
|
||||||
|
$invokeWpfButtonContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFButton.ps1" -Raw
|
||||||
|
$lines = $invokeWpfButtonContent -split "`r`n"
|
||||||
|
foreach ($line in $lines) {
|
||||||
|
if ($line -match "`"$buttonName`" \{Invoke-(WPF[a-zA-Z]+)") {
|
||||||
|
return $matches[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Add-LinkAttribute {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[PSCustomObject]$jsonObject
|
||||||
|
)
|
||||||
|
|
||||||
|
$totalProperties = ($jsonObject.PSObject.Properties | Measure-Object).Count
|
||||||
|
$progressIncrement = 50 / $totalProperties
|
||||||
|
$currentProgress = 50
|
||||||
|
|
||||||
|
foreach ($property in $jsonObject.PSObject.Properties) {
|
||||||
|
if ($property.Value -is [PSCustomObject]) {
|
||||||
|
Add-LinkAttribute -jsonObject $property.Value
|
||||||
|
} elseif ($property.Value -is [System.Collections.ArrayList]) {
|
||||||
|
foreach ($item in $property.Value) {
|
||||||
|
if ($item -is [PSCustomObject]) {
|
||||||
|
Add-LinkAttribute -jsonObject $item
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$currentProgress += $progressIncrement
|
||||||
|
$roundedProgress = [math]::Round($currentProgress)
|
||||||
|
Update-Progress -StatusMessage "Adding documentation links" -Percent $roundedProgress
|
||||||
|
}
|
||||||
|
if ($jsonObject -ne $global:rootObject) {
|
||||||
|
$jsonObject | Add-Member -NotePropertyName "link" -NotePropertyValue "" -Force
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Generate-MarkdownFiles {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[PSCustomObject]$data,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=1)]
|
||||||
|
[string]$outputDir,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=2)]
|
||||||
|
[string]$jsonFilePath,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=3)]
|
||||||
|
[string]$lastModified,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=4)]
|
||||||
|
[string]$type,
|
||||||
|
|
||||||
|
[Parameter(position=5)]
|
||||||
|
[int]$initialProgress
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO: Make the function reference generation better by making a Graph, so it highlights
|
||||||
|
# Which function "depends" on which, and makes it clearer on a high-level for the reader
|
||||||
|
# to understand the general structure.
|
||||||
|
|
||||||
|
$totalItems = ($data.PSObject.Properties | Measure-Object).Count
|
||||||
|
$progressIncrement = 10 / $totalItems
|
||||||
|
$currentProgress = [int]$initialProgress
|
||||||
|
|
||||||
|
$tocEntries = @()
|
||||||
|
$processedFiles = @()
|
||||||
|
foreach ($itemName in $data.PSObject.Properties.Name) {
|
||||||
|
# Create Category Directory if needed.
|
||||||
|
$itemDetails = $data.$itemName
|
||||||
|
$category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-'
|
||||||
|
$categoryDir = "$outputDir/$category"
|
||||||
|
if (-Not (Test-Path -Path $categoryDir)) {
|
||||||
|
New-Item -ItemType Directory -Path $categoryDir | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create empty files with correct path
|
||||||
|
$fullItemName = $itemName
|
||||||
|
$displayName = $itemName -replace $itemnametocut, ''
|
||||||
|
$filename = "$categoryDir/$displayName.md"
|
||||||
|
$relativePath = "$outputDir/$category/$displayName.md" -replace '^docs/', ''
|
||||||
|
if (-Not (Test-Path -Path $filename)) {
|
||||||
|
Set-Content -Path $filename -Value "" -Encoding utf8
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add the entry to 'tocEntries' so we can generate Table Of Content easily
|
||||||
|
# And add the Full FileName of entry
|
||||||
|
$tocEntries += @{
|
||||||
|
Category = $category
|
||||||
|
Path = $relativePath
|
||||||
|
Name = $itemDetails.Content
|
||||||
|
Type = $type
|
||||||
|
}
|
||||||
|
$processedFiles += (Get-Item $filename).FullName
|
||||||
|
|
||||||
|
$header = "# $([string]$itemDetails.Content)" + "`r`n"
|
||||||
|
$lastUpdatedNotice = "Last Updated: $lastModified" + "`r`n"
|
||||||
|
$autoupdatenotice = Process-MultilineStrings @"
|
||||||
|
\\!!! info
|
||||||
|
\\ The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
"@
|
||||||
|
|
||||||
|
$description = Process-MultilineStrings @"
|
||||||
|
\\## Description
|
||||||
|
\\
|
||||||
|
\\$([string]$itemDetails.Description)
|
||||||
|
"@
|
||||||
|
|
||||||
|
$jsonContent = ($itemDetails | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r")
|
||||||
|
$codeBlock = Process-MultilineStrings @"
|
||||||
|
\\<details>
|
||||||
|
\\<summary>Preview Code</summary>
|
||||||
|
\\
|
||||||
|
\\``````json
|
||||||
|
\\$jsonContent
|
||||||
|
\\``````
|
||||||
|
\\
|
||||||
|
\\</details>
|
||||||
|
"@
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$FeaturesDocs = ""
|
||||||
|
if ($itemDetails.feature) {
|
||||||
|
$FeaturesDocs += Process-MultilineStrings @"
|
||||||
|
\\## Features
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
\\Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
\\You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
if (($itemDetails.feature).Count -gt 1) {
|
||||||
|
$FeaturesDocs += "### Features to install" + "`r`n"
|
||||||
|
} else {
|
||||||
|
$FeaturesDocs += "### Feature to install" + "`r`n"
|
||||||
|
}
|
||||||
|
foreach ($feature in $itemDetails.feature) {
|
||||||
|
$FeaturesDocs += "- $($feature)" + "`r`n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$InvokeScript = ""
|
||||||
|
if ($itemDetails.InvokeScript) {
|
||||||
|
$InvokeScriptContent = $itemDetails.InvokeScript | Out-String
|
||||||
|
$InvokeScript = Process-MultilineStrings @"
|
||||||
|
\\## Invoke Script
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$InvokeScriptContent
|
||||||
|
\\``````
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$UndoScript = ""
|
||||||
|
if ($itemDetails.UndoScript) {
|
||||||
|
$UndoScriptContent = $itemDetails.UndoScript | Out-String
|
||||||
|
$UndoScript = Process-MultilineStrings @"
|
||||||
|
\\## Undo Script
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$UndoScriptContent
|
||||||
|
\\``````
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$ToggleScript = ""
|
||||||
|
if ($itemDetails.ToggleScript) {
|
||||||
|
$ToggleScriptContent = $itemDetails.ToggleScript | Out-String
|
||||||
|
$ToggleScript = Process-MultilineStrings @"
|
||||||
|
\\## Toggle Script
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$ToggleScriptContent
|
||||||
|
\\``````
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$ButtonScript = ""
|
||||||
|
if ($itemDetails.ButtonScript) {
|
||||||
|
$ButtonScriptContent = $itemDetails.ButtonScript | Out-String
|
||||||
|
$ButtonScript = Process-MultilineStrings @"
|
||||||
|
\\## Button Script
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$ButtonScriptContent
|
||||||
|
\\``````
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$FunctionDetails = ""
|
||||||
|
$processedFunctions = New-Object 'System.Collections.Generic.HashSet[System.String]'
|
||||||
|
$allScripts = @($itemDetails.InvokeScript, $itemDetails.UndoScript, $itemDetails.ToggleScript, $itemDetails.ButtonScript)
|
||||||
|
foreach ($script in $allScripts) {
|
||||||
|
if ($script) {
|
||||||
|
$calledFunctions = Get-CalledFunctions -scriptContent $script -functionList $functions -processedFunctions ([ref]$processedFunctions)
|
||||||
|
foreach ($functionName in $calledFunctions) {
|
||||||
|
if ($functions.ContainsKey($functionName)) {
|
||||||
|
$FunctionDetails += Process-MultilineStrings @"
|
||||||
|
\\## Function: $functionName
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$($functions[$functionName])
|
||||||
|
\\``````
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$additionalFunctionToggle = Get-AdditionalFunctionsFromToggle -buttonName $fullItemName
|
||||||
|
if ($additionalFunctionToggle) {
|
||||||
|
$additionalFunctionNameToggle = "Invoke-$additionalFunctionToggle"
|
||||||
|
if ($functions.ContainsKey($additionalFunctionNameToggle) -and -not $processedFunctions.Contains($additionalFunctionNameToggle)) {
|
||||||
|
$FunctionDetails += Process-MultilineStrings @"
|
||||||
|
\\## Function: $additionalFunctionNameToggle
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$($functions[$additionalFunctionNameToggle])
|
||||||
|
\\``````
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
$processedFunctions.Add($additionalFunctionNameToggle)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$additionalFunctionButton = Get-AdditionalFunctionsFromButton -buttonName $fullItemName
|
||||||
|
if ($additionalFunctionButton) {
|
||||||
|
$additionalFunctionNameButton = "Invoke-$additionalFunctionButton"
|
||||||
|
if ($functions.ContainsKey($additionalFunctionNameButton) -and -not $processedFunctions.Contains($additionalFunctionNameButton)) {
|
||||||
|
$FunctionDetails += Process-MultilineStrings @"
|
||||||
|
\\## Function: $additionalFunctionNameButton
|
||||||
|
\\
|
||||||
|
\\``````powershell
|
||||||
|
\\$($functions[$additionalFunctionNameButton])
|
||||||
|
\\``````
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
$processedFunctions.Add($additionalFunctionNameButton)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$registryDocs = ""
|
||||||
|
if ($itemDetails.registry) {
|
||||||
|
$registryDocs += Process-MultilineStrings @"
|
||||||
|
\\## Registry Changes
|
||||||
|
\\Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
\\You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
foreach ($regEntry in $itemDetails.registry) {
|
||||||
|
$registryDocs += Process-MultilineStrings @"
|
||||||
|
\\### Registry Key: $($regEntry.Name)
|
||||||
|
\\
|
||||||
|
\\**Type:** $($regEntry.Type)
|
||||||
|
\\
|
||||||
|
\\**Original Value:** $($regEntry.OriginalValue)
|
||||||
|
\\
|
||||||
|
\\**New Value:** $($regEntry.Value)
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$serviceDocs = ""
|
||||||
|
if ($itemDetails.service) {
|
||||||
|
$serviceDocs = Process-MultilineStrings @"
|
||||||
|
\\## Service Changes
|
||||||
|
\\
|
||||||
|
\\Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed.
|
||||||
|
\\
|
||||||
|
\\You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications).
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
foreach ($service in $itemDetails.service) {
|
||||||
|
$serviceDocs += Process-MultilineStrings @"
|
||||||
|
\\### Service Name: $($service.Name)
|
||||||
|
\\
|
||||||
|
\\**Startup Type:** $($service.StartupType)
|
||||||
|
\\
|
||||||
|
\\**Original Type:** $($service.OriginalType)
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear the variable before continuing, will cause problems otherwise
|
||||||
|
$scheduledTaskDocs = ""
|
||||||
|
if ($itemDetails.ScheduledTask) {
|
||||||
|
$scheduledTaskDocs = Process-MultilineStrings @"
|
||||||
|
\\## Scheduled Task Changes
|
||||||
|
\\
|
||||||
|
\\Windows scheduled tasks are used to run scripts or programs at specific times or events. Disabling unnecessary tasks can improve system performance and reduce unwanted background activity.
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
\\You can find information about scheduled tasks on [Wikipedia](https://www.wikiwand.com/en/Windows_Task_Scheduler) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/desktop/taskschd/about-the-task-scheduler).
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
foreach ($task in $itemDetails.ScheduledTask) {
|
||||||
|
$scheduledTaskDocs += Process-MultilineStrings @"
|
||||||
|
\\### Task Name: $($task.Name)
|
||||||
|
\\
|
||||||
|
\\**State:** $($task.State)
|
||||||
|
\\
|
||||||
|
\\**Original State:** $($task.OriginalState)
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$jsonLink = "[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/$jsonFilePath)"
|
||||||
|
$customContentStartTag = "<!-- BEGIN CUSTOM CONTENT -->"
|
||||||
|
$customContentEndTag = "<!-- END CUSTOM CONTENT -->"
|
||||||
|
$secondCustomContentStartTag = "<!-- BEGIN SECOND CUSTOM CONTENT -->"
|
||||||
|
$secondCustomContentEndTag = "<!-- END SECOND CUSTOM CONTENT -->"
|
||||||
|
|
||||||
|
if (Test-Path -Path "$filename") {
|
||||||
|
$existingContent = Get-Content -Path "$filename" -Raw
|
||||||
|
$customContentPattern = "(?s)$customContentStartTag(.*?)$customContentEndTag"
|
||||||
|
$secondCustomContentPattern = "(?s)$secondCustomContentStartTag(.*?)$secondCustomContentEndTag"
|
||||||
|
if ($existingContent -match $customContentPattern) {
|
||||||
|
$customContent = $matches[1].Trim()
|
||||||
|
}
|
||||||
|
if ($existingContent -match $secondCustomContentPattern) {
|
||||||
|
$secondCustomContent = $matches[1].Trim()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$fileContent = Process-MultilineStrings @"
|
||||||
|
\\$header
|
||||||
|
\\$lastUpdatedNotice
|
||||||
|
\\
|
||||||
|
\\$autoupdatenotice
|
||||||
|
\\$( if ($itemDetails.Description) { $description } )
|
||||||
|
\\
|
||||||
|
\\$customContentStartTag
|
||||||
|
\\$customContent
|
||||||
|
\\$customContentEndTag
|
||||||
|
\\
|
||||||
|
\\$codeBlock
|
||||||
|
\\
|
||||||
|
\\$(
|
||||||
|
if ($FeaturesDocs) { $FeaturesDocs + "`r`n" }
|
||||||
|
if ($itemDetails.InvokeScript) { $InvokeScript + "`r`n" }
|
||||||
|
if ($itemDetails.UndoScript) { $UndoScript + "`r`n" }
|
||||||
|
if ($itemDetails.ToggleScript) { $ToggleScript + "`r`n" }
|
||||||
|
if ($itemDetails.ButtonScript) { $ButtonScript + "`r`n" }
|
||||||
|
if ($FunctionDetails) { $FunctionDetails + "`r`n" }
|
||||||
|
if ($itemDetails.registry) { $registryDocs + "`r`n" }
|
||||||
|
if ($itemDetails.service) { $serviceDocs + "`r`n" }
|
||||||
|
if ($itemDetails.ScheduledTask) { $scheduledTaskDocs + "`r`n" }
|
||||||
|
)
|
||||||
|
\\$secondCustomContentStartTag
|
||||||
|
\\$secondCustomContent
|
||||||
|
\\$secondCustomContentEndTag
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
\\$jsonLink
|
||||||
|
"@
|
||||||
|
|
||||||
|
Set-Content -Path "$filename" -Value "$fileContent" -Encoding utf8
|
||||||
|
|
||||||
|
# TODO: For whatever reason, some headers have a space before them,
|
||||||
|
# so as a temporary fix.. we'll remove these it so mkdocs can render properly
|
||||||
|
(Get-Content -Raw -Path "$filename").Replace(' ##', '##') | Set-Content "$filename"
|
||||||
|
$currentProgress += $progressIncrement
|
||||||
|
$roundedProgress = [math]::Round($currentProgress)
|
||||||
|
Update-Progress -StatusMessage "Generating content for documentation" -Percent $roundedProgress
|
||||||
|
}
|
||||||
|
|
||||||
|
return [PSCustomObject]@{
|
||||||
|
TocEntries = $tocEntries
|
||||||
|
ProcessedFiles = $processedFiles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Generate-TypeSectionContent {
|
||||||
|
param (
|
||||||
|
[array]$entries
|
||||||
|
)
|
||||||
|
|
||||||
|
$totalEntries = $entries.Count
|
||||||
|
$progressIncrement = 10 / $totalEntries
|
||||||
|
$currentProgress = 90
|
||||||
|
|
||||||
|
$sectionContent = ""
|
||||||
|
$categories = @{}
|
||||||
|
foreach ($entry in $entries) {
|
||||||
|
if (-Not $categories.ContainsKey($entry.Category)) {
|
||||||
|
$categories[$entry.Category] = @()
|
||||||
|
}
|
||||||
|
$categories[$entry.Category] += $entry
|
||||||
|
|
||||||
|
$currentProgress += $progressIncrement
|
||||||
|
$roundedProgress = [math]::Round($currentProgress)
|
||||||
|
Update-Progress -StatusMessage "Generating table of contents" -Percent $roundedProgress
|
||||||
|
}
|
||||||
|
foreach ($category in $categories.Keys) {
|
||||||
|
$sectionContent += "### $category`r`n`r`n"
|
||||||
|
foreach ($entry in $categories[$category]) {
|
||||||
|
$sectionContent += "- [$($entry.Name)]($($entry.Path))`r`n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $sectionContent
|
||||||
|
}
|
||||||
|
|
||||||
|
function Add-LinkAttributeToJson {
|
||||||
|
param (
|
||||||
|
[string]$jsonFilePath,
|
||||||
|
[string]$outputDir
|
||||||
|
)
|
||||||
|
|
||||||
|
$jsonText = Get-Content -Path $jsonFilePath -Raw
|
||||||
|
$jsonData = $jsonText | ConvertFrom-Json
|
||||||
|
|
||||||
|
$totalItems = ($jsonData.PSObject.Properties | Measure-Object).Count
|
||||||
|
$progressIncrement = 20 / $totalItems
|
||||||
|
$currentProgress = 70
|
||||||
|
|
||||||
|
foreach ($item in $jsonData.PSObject.Properties) {
|
||||||
|
$itemName = $item.Name
|
||||||
|
$itemDetails = $item.Value
|
||||||
|
$category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-'
|
||||||
|
$displayName = $itemName -replace "$itemnametocut", ''
|
||||||
|
$relativePath = "$outputDir/$category/$displayName" -replace '^docs/', ''
|
||||||
|
$docLink = "https://christitustech.github.io/winutil/$relativePath"
|
||||||
|
$jsonData.$itemName.link = $docLink
|
||||||
|
|
||||||
|
$currentProgress += $progressIncrement
|
||||||
|
$roundedProgress = [math]::Round($currentProgress)
|
||||||
|
Update-Progress -StatusMessage "Adding documentation links to JSON" -Percent $roundedProgress
|
||||||
|
}
|
||||||
|
|
||||||
|
$jsonText = ($jsonData | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r")
|
||||||
|
Set-Content -Path $jsonFilePath -Value ($jsonText) -Encoding utf8
|
||||||
|
}
|
||||||
|
|
||||||
|
Update-Progress "Loading JSON files" 10
|
||||||
|
$tweaks = Get-Content -Path "config/tweaks.json" | ConvertFrom-Json
|
||||||
|
$features = Get-Content -Path "config/feature.json" | ConvertFrom-Json
|
||||||
|
|
||||||
|
Update-Progress "Getting last modified dates of the JSON files" 20
|
||||||
|
$tweaksLastModified = (Get-Item "config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||||
|
$featuresLastModified = (Get-Item "config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||||
|
|
||||||
|
$tweaksOutputDir = "docs/dev/tweaks"
|
||||||
|
$featuresOutputDir = "docs/dev/features"
|
||||||
|
$privateFunctionsDir = "functions/private"
|
||||||
|
$publicFunctionsDir = "functions/public"
|
||||||
|
$functions = @{}
|
||||||
|
$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?"
|
||||||
|
|
||||||
|
Update-Progress "Creating Directories" 30
|
||||||
|
if (-Not (Test-Path -Path $tweaksOutputDir)) {
|
||||||
|
New-Item -ItemType Directory -Path $tweaksOutputDir | Out-Null
|
||||||
|
}
|
||||||
|
if (-Not (Test-Path -Path $featuresOutputDir)) {
|
||||||
|
New-Item -ItemType Directory -Path $featuresOutputDir | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
Update-Progress "Loading existing Functions" 40
|
||||||
|
Load-Functions -dir $privateFunctionsDir
|
||||||
|
Load-Functions -dir $publicFunctionsDir
|
||||||
|
|
||||||
|
Update-Progress "Adding documentation links to JSON files" 50
|
||||||
|
|
||||||
|
# Define the JSON file paths
|
||||||
|
$jsonPaths = @(".\config\feature.json", ".\config\tweaks.json")
|
||||||
|
|
||||||
|
# Loop through each JSON file path
|
||||||
|
foreach ($jsonPath in $jsonPaths) {
|
||||||
|
# Load the JSON content
|
||||||
|
$json = Get-Content -Raw -Path $jsonPath | ConvertFrom-Json
|
||||||
|
|
||||||
|
# Set the global root object to the current json object
|
||||||
|
$global:rootObject = $json
|
||||||
|
|
||||||
|
# Add the "link" attribute to the JSON
|
||||||
|
Add-LinkAttribute -jsonObject $json
|
||||||
|
|
||||||
|
# Convert back to JSON with the original formatting
|
||||||
|
$jsonString = ($json | ConvertTo-Json -Depth 100).replace('\n',"`n").replace('\r', "`r")
|
||||||
|
|
||||||
|
# Save the JSON back to the file
|
||||||
|
Set-Content -Path $jsonPath -Value $jsonString
|
||||||
|
}
|
||||||
|
|
||||||
|
Add-LinkAttributeToJson -jsonFilePath "config/tweaks.json" -outputDir "dev/tweaks"
|
||||||
|
Add-LinkAttributeToJson -jsonFilePath "config/feature.json" -outputDir "dev/features"
|
||||||
|
|
||||||
|
Update-Progress "Generating content for documentation" 60
|
||||||
|
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
|
||||||
|
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
|
||||||
|
|
||||||
|
Update-Progress "Generating table of contents" 80
|
||||||
|
$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries
|
||||||
|
$tweakEntries = ($allTocEntries).where{ $_.Type -eq 'tweak' } | Sort-Object Category, Name
|
||||||
|
$featureEntries = ($allTocEntries).where{ $_.Type -eq 'feature' } | Sort-Object Category, Name
|
||||||
|
|
||||||
|
$indexContent += Process-MultilineStrings @"
|
||||||
|
\\# Table of Contents
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
\\## Tweaks
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
$indexContent += $(Generate-TypeSectionContent $tweakEntries) + "`r`n"
|
||||||
|
$indexContent += Process-MultilineStrings @"
|
||||||
|
\\## Features
|
||||||
|
\\
|
||||||
|
\\
|
||||||
|
"@
|
||||||
|
$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n"
|
||||||
|
Set-Content -Path "docs/devdocs.md" -Value $indexContent -Encoding utf8
|
||||||
|
|
||||||
|
Update-Progress "Process Completed" 100
|
179
docs/KnownIssues.md
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
### 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 one of following two providers:
|
||||||
|
|
||||||
|
| Provider | Primary DNS | Secondary DNS |
|
||||||
|
|:------------:|:------------:|:-------------:|
|
||||||
|
| Cloudflare | `1.1.1.1` | `1.0.0.1` |
|
||||||
|
| Google | `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/Commit-GHD.png
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
docs/assets/Compile.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
docs/assets/Create-Branch.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
docs/assets/Discard-GHD.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
docs/assets/Fork-Button-Dark.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/assets/Fork-Button-Light.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
docs/assets/Get-Installed-Dark.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
docs/assets/Get-Installed-Light.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
docs/assets/Install-Tab-Dark.png
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
docs/assets/Install-Tab-Light.png
Normal file
After Width: | Height: | Size: 137 KiB |
BIN
docs/assets/MicroWinScreen.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
docs/assets/Microwin-Dark.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
docs/assets/Microwin-Light.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
docs/assets/Push-Commit.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
docs/assets/Screen.png
Normal file
After Width: | Height: | Size: 264 KiB |
BIN
docs/assets/Settings-Export-Dark.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
docs/assets/Settings-Export-Light.png
Normal file
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 339 KiB |
BIN
docs/assets/Tweaks-Tab-Dark.png
Normal file
After Width: | Height: | Size: 150 KiB |
BIN
docs/assets/Tweaks-Tab-Light.png
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
docs/assets/favicon.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
3
docs/contribute.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
--8<-- "CONTRIBUTING.md"
|
||||||
|
|
||||||
|
<!-- The content is sourced from "CONTRIBUTING.md," located in the root directory of the project. -->
|
61
docs/dev/features/Features/DisableLegacyRecovery.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Disable Legacy F8 Boot Recovery
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Disable Legacy F8 Boot Recovery",
|
||||||
|
"Description": "Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a019_",
|
||||||
|
"feature": [],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) {
|
||||||
|
New-Item -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force
|
||||||
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/DisableLegacyRecovery"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
If (!(Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood')) {
|
||||||
|
New-Item -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force
|
||||||
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
61
docs/dev/features/Features/DisableSearchSuggestions.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Disable Search Box Web Suggestions in Registry(explorer restart)
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Disables web suggestions when searching using Windows Search.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Disable Search Box Web Suggestions in Registry(explorer restart)",
|
||||||
|
"Description": "Disables web suggestions when searching using Windows Search.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a016_",
|
||||||
|
"feature": [],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) {
|
||||||
|
New-Item -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force
|
||||||
|
Stop-Process -name explorer -force
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/DisableSearchSuggestions"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
If (!(Test-Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer')) {
|
||||||
|
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force
|
||||||
|
Stop-Process -name explorer -force
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
61
docs/dev/features/Features/EnableLegacyRecovery.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Enable Legacy F8 Boot Recovery
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Enable Legacy F8 Boot Recovery",
|
||||||
|
"Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a018_",
|
||||||
|
"feature": [],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) {
|
||||||
|
New-Item -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force
|
||||||
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/EnableLegacyRecovery"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
If (!(Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood')) {
|
||||||
|
New-Item -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force
|
||||||
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
61
docs/dev/features/Features/EnableSearchSuggestions.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Enable Search Box Web Suggestions in Registry(explorer restart)
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Enables web suggestions when searching using Windows Search.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Enable Search Box Web Suggestions in Registry(explorer restart)",
|
||||||
|
"Description": "Enables web suggestions when searching using Windows Search.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a015_",
|
||||||
|
"feature": [],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) {
|
||||||
|
New-Item -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force
|
||||||
|
Stop-Process -name explorer -force
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/EnableSearchSuggestions"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
If (!(Test-Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer')) {
|
||||||
|
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Force | Out-Null
|
||||||
|
}
|
||||||
|
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force
|
||||||
|
Stop-Process -name explorer -force
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
80
docs/dev/features/Features/Install.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# Install Features
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Install Features",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a060_",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/Install"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFFeatureInstall
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFFeatureInstall {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Installs selected Windows Features
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
if($sync.ProcessRunning) {
|
||||||
|
$msg = "[Invoke-WPFFeatureInstall] Install process is currently running."
|
||||||
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
$Features = (Get-WinUtilCheckBoxes)["WPFFeature"]
|
||||||
|
|
||||||
|
Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
|
param($Features, $DebugPreference)
|
||||||
|
$sync.ProcessRunning = $true
|
||||||
|
if ($Features.count -eq 1) {
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
||||||
|
} else {
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
||||||
|
}
|
||||||
|
|
||||||
|
Invoke-WinUtilFeatureInstall $Features
|
||||||
|
|
||||||
|
$sync.ProcessRunning = $false
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
|
||||||
|
|
||||||
|
Write-Host "==================================="
|
||||||
|
Write-Host "--- Features are Installed ---"
|
||||||
|
Write-Host "--- A Reboot may be required ---"
|
||||||
|
Write-Host "==================================="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
61
docs/dev/features/Features/RegBackup.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Enable Daily Registry Backup Task 12.30am
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Enable Daily Registry Backup Task 12.30am",
|
||||||
|
"Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a017_",
|
||||||
|
"feature": [],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force
|
||||||
|
New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force
|
||||||
|
$action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn \"\\Microsoft\\Windows\\Registry\\RegIdleBackup\"'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Daily -At 00:30
|
||||||
|
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System'
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/RegBackup"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force
|
||||||
|
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force
|
||||||
|
$action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn "\Microsoft\Windows\Registry\RegIdleBackup"'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Daily -At 00:30
|
||||||
|
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System'
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
39
docs/dev/features/Features/Sandbox.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Windows Sandbox
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Windows Sandbox",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a021_",
|
||||||
|
"Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/Sandbox"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
56
docs/dev/features/Features/dotnet.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# All .Net Framework (2,3,4)
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
.NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "All .Net Framework (2,3,4)",
|
||||||
|
"Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a010_",
|
||||||
|
"feature": [
|
||||||
|
"NetFx4-AdvSrvs",
|
||||||
|
"NetFx3"
|
||||||
|
],
|
||||||
|
"InvokeScript": [],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/dotnet"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
|
||||||
|
Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
|
||||||
|
|
||||||
|
### Features to install
|
||||||
|
- NetFx4-AdvSrvs
|
||||||
|
- NetFx3
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
76
docs/dev/features/Features/hyperv.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# HyperV Virtualization
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "HyperV Virtualization",
|
||||||
|
"Description": "Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a011_",
|
||||||
|
"feature": [
|
||||||
|
"HypervisorPlatform",
|
||||||
|
"Microsoft-Hyper-V-All",
|
||||||
|
"Microsoft-Hyper-V",
|
||||||
|
"Microsoft-Hyper-V-Tools-All",
|
||||||
|
"Microsoft-Hyper-V-Management-PowerShell",
|
||||||
|
"Microsoft-Hyper-V-Hypervisor",
|
||||||
|
"Microsoft-Hyper-V-Services",
|
||||||
|
"Microsoft-Hyper-V-Management-Clients"
|
||||||
|
],
|
||||||
|
"InvokeScript": [
|
||||||
|
"Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/hyperv"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
|
||||||
|
Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
|
||||||
|
|
||||||
|
### Features to install
|
||||||
|
- HypervisorPlatform
|
||||||
|
- Microsoft-Hyper-V-All
|
||||||
|
- Microsoft-Hyper-V
|
||||||
|
- Microsoft-Hyper-V-Tools-All
|
||||||
|
- Microsoft-Hyper-V-Management-PowerShell
|
||||||
|
- Microsoft-Hyper-V-Hypervisor
|
||||||
|
- Microsoft-Hyper-V-Services
|
||||||
|
- Microsoft-Hyper-V-Management-Clients
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
60
docs/dev/features/Features/legacymedia.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# Legacy Media (WMP, DirectPlay)
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Enables legacy programs from previous versions of windows
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Legacy Media (WMP, DirectPlay)",
|
||||||
|
"Description": "Enables legacy programs from previous versions of windows",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a012_",
|
||||||
|
"feature": [
|
||||||
|
"WindowsMediaPlayer",
|
||||||
|
"MediaPlayback",
|
||||||
|
"DirectPlay",
|
||||||
|
"LegacyComponents"
|
||||||
|
],
|
||||||
|
"InvokeScript": [],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/legacymedia"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
|
||||||
|
Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
|
||||||
|
|
||||||
|
### Features to install
|
||||||
|
- WindowsMediaPlayer
|
||||||
|
- MediaPlayback
|
||||||
|
- DirectPlay
|
||||||
|
- LegacyComponents
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
74
docs/dev/features/Features/nfs.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# NFS - Network File System
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Network File System (NFS) is a mechanism for storing files on a network.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "NFS - Network File System",
|
||||||
|
"Description": "Network File System (NFS) is a mechanism for storing files on a network.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a014_",
|
||||||
|
"feature": [
|
||||||
|
"ServicesForNFS-ClientOnly",
|
||||||
|
"ClientForNFS-Infrastructure",
|
||||||
|
"NFS-Administration"
|
||||||
|
],
|
||||||
|
"InvokeScript": [
|
||||||
|
"nfsadmin client stop",
|
||||||
|
"Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousUID' -Type DWord -Value 0",
|
||||||
|
"Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0",
|
||||||
|
"nfsadmin client start",
|
||||||
|
"nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/nfs"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
|
||||||
|
Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
|
||||||
|
|
||||||
|
### Features to install
|
||||||
|
- ServicesForNFS-ClientOnly
|
||||||
|
- ClientForNFS-Infrastructure
|
||||||
|
- NFS-Administration
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
nfsadmin client stop
|
||||||
|
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default' -Name 'AnonymousUID' -Type DWord -Value 0
|
||||||
|
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default' -Name 'AnonymousGID' -Type DWord -Value 0
|
||||||
|
nfsadmin client start
|
||||||
|
nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
56
docs/dev/features/Features/wsl.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Windows Subsystem for Linux
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Windows Subsystem for Linux",
|
||||||
|
"Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.",
|
||||||
|
"category": "Features",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a020_",
|
||||||
|
"feature": [
|
||||||
|
"VirtualMachinePlatform",
|
||||||
|
"Microsoft-Windows-Subsystem-Linux"
|
||||||
|
],
|
||||||
|
"InvokeScript": [],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Features/wsl"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
|
||||||
|
Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11).
|
||||||
|
|
||||||
|
### Features to install
|
||||||
|
- VirtualMachinePlatform
|
||||||
|
- Microsoft-Windows-Subsystem-Linux
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
56
docs/dev/features/Fixes/Autologin.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Set Up Autologin
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Set Up Autologin",
|
||||||
|
"category": "Fixes",
|
||||||
|
"Order": "a040_",
|
||||||
|
"panel": "1",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Autologin"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFPanelAutologin
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFPanelAutologin {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enables autologin using Sysinternals Autologon.exe
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
74
docs/dev/features/Fixes/DISM.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# System Corruption Scan
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "System Corruption Scan",
|
||||||
|
"category": "Fixes",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a043_",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/DISM"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFPanelDISM
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFPanelDISM {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Checks for system corruption using Chkdsk, SFC, and DISM
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
1. Chkdsk - Fixes disk and filesystem corruption
|
||||||
|
2. SFC Run 1 - Fixes system file corruption, and fixes DISM if it was corrupted
|
||||||
|
3. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted
|
||||||
|
4. SFC Run 2 - Fixes system file corruption, this time with an almost guaranteed uncorrupted system image
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
Command Arguments:
|
||||||
|
1. Chkdsk
|
||||||
|
/Scan - Runs an online scan on the system drive, attempts to fix any corruption, and queues other corruption for fixing on reboot
|
||||||
|
2. SFC
|
||||||
|
/ScanNow - Performs a scan of the system files and fixes any corruption
|
||||||
|
3. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted
|
||||||
|
/Online - Fixes the currently running system image
|
||||||
|
/Cleanup-Image - Performs cleanup operations on the image, could remove some unneeded temporary files
|
||||||
|
/Restorehealth - Performs a scan of the image and fixes any corruption
|
||||||
|
|
||||||
|
#>
|
||||||
|
Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan;
|
||||||
|
Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow;
|
||||||
|
Write-Host '`n(3/4) DISM' -ForegroundColor Green; DISM /Online /Cleanup-Image /Restorehealth;
|
||||||
|
Write-Host '`n(4/4) SFC - 2nd scan' -ForegroundColor Green; sfc /scannow;
|
||||||
|
Read-Host '`nPress Enter to Continue'" -verb runas
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
73
docs/dev/features/Fixes/Network.md
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Reset Network
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Reset Network",
|
||||||
|
"category": "Fixes",
|
||||||
|
"Order": "a042_",
|
||||||
|
"panel": "1",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Network"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFFixesNetwork
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFFixesNetwork {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Resets various network configurations
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
Write-Host "Resetting Network with netsh"
|
||||||
|
|
||||||
|
# Reset WinSock catalog to a clean state
|
||||||
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset"
|
||||||
|
# Resets WinHTTP proxy setting to DIRECT
|
||||||
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy"
|
||||||
|
# Removes all user configured IP settings
|
||||||
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset"
|
||||||
|
|
||||||
|
Write-Host "Process complete. Please reboot your computer."
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Network Reset "
|
||||||
|
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
Write-Host "=========================================="
|
||||||
|
Write-Host "-- Network Configuration has been Reset --"
|
||||||
|
Write-Host "=========================================="
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
76
docs/dev/features/Fixes/RunAdobeCCCleanerTool.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Remove Adobe Creative Cloud
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Remove Adobe Creative Cloud",
|
||||||
|
"category": "Fixes",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a045_",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/RunAdobeCCCleanerTool"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFRunAdobeCCCleanerTool
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFRunAdobeCCCleanerTool {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
It removes or fixes problem files and resolves permission issues in registry keys.
|
||||||
|
.DESCRIPTION
|
||||||
|
The Creative Cloud Cleaner tool is a utility for experienced users to clean up corrupted installations.
|
||||||
|
#>
|
||||||
|
|
||||||
|
[string]$url="https://swupmf.adobe.com/webfeed/CleanerTool/win/AdobeCreativeCloudCleanerTool.exe"
|
||||||
|
|
||||||
|
Write-Host "The Adobe Creative Cloud Cleaner tool is hosted at"
|
||||||
|
Write-Host "$url"
|
||||||
|
|
||||||
|
try {
|
||||||
|
# Don't show the progress because it will slow down the download speed
|
||||||
|
$ProgressPreference='SilentlyContinue'
|
||||||
|
|
||||||
|
Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -UseBasicParsing -ErrorAction SilentlyContinue -Verbose
|
||||||
|
|
||||||
|
# Revert back the ProgressPreference variable to the default value since we got the file desired
|
||||||
|
$ProgressPreference='Continue'
|
||||||
|
|
||||||
|
Start-Process -FilePath "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Wait -ErrorAction SilentlyContinue -Verbose
|
||||||
|
} catch {
|
||||||
|
Write-Error $_.Exception.Message
|
||||||
|
} finally {
|
||||||
|
if (Test-Path -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe") {
|
||||||
|
Write-Host "Cleaning up..."
|
||||||
|
Remove-Item -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Verbose
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
336
docs/dev/features/Fixes/Update.md
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
# Reset Windows Update
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Reset Windows Update",
|
||||||
|
"category": "Fixes",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a041_",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Update"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFFixesUpdate
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFFixesUpdate {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Performs various tasks in an attempt to repair Windows Update
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
1. (Aggressive Only) Scans the system for corruption using chkdsk, SFC, and DISM
|
||||||
|
Steps:
|
||||||
|
1. Runs chkdsk /scan /perf
|
||||||
|
/scan - Runs an online scan on the volume
|
||||||
|
/perf - Uses more system resources to complete a scan as fast as possible
|
||||||
|
2. Runs SFC /scannow
|
||||||
|
/scannow - Scans integrity of all protected system files and repairs files with problems when possible
|
||||||
|
3. Runs DISM /Online /Cleanup-Image /RestoreHealth
|
||||||
|
/Online - Targets the running operating system
|
||||||
|
/Cleanup-Image - Performs cleanup and recovery operations on the image
|
||||||
|
/RestoreHealth - Scans the image for component store corruption and attempts to repair the corruption using Windows Update
|
||||||
|
4. Runs SFC /scannow
|
||||||
|
Ran twice in case DISM repaired SFC
|
||||||
|
2. Stops Windows Update Services
|
||||||
|
3. Remove the QMGR Data file, which stores BITS jobs
|
||||||
|
4. (Aggressive Only) Renames the DataStore and CatRoot2 folders
|
||||||
|
DataStore - Contains the Windows Update History and Log Files
|
||||||
|
CatRoot2 - Contains the Signatures for Windows Update Packages
|
||||||
|
5. Renames the Windows Update Download Folder
|
||||||
|
6. Deletes the Windows Update Log
|
||||||
|
7. (Aggressive Only) Resets the Security Descriptors on the Windows Update Services
|
||||||
|
8. Reregisters the BITS and Windows Update DLLs
|
||||||
|
9. Removes the WSUS client settings
|
||||||
|
10. Resets WinSock
|
||||||
|
11. Gets and deletes all BITS jobs
|
||||||
|
12. Sets the startup type of the Windows Update Services then starts them
|
||||||
|
13. Forces Windows Update to check for updates
|
||||||
|
|
||||||
|
.PARAMETER Aggressive
|
||||||
|
If specified, the script will take additional steps to repair Windows Update that are more dangerous, take a significant amount of time, or are generally unnecessary
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
param($Aggressive = $false)
|
||||||
|
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -PercentComplete 0
|
||||||
|
# Wait for the first progress bar to show, otherwise the second one won't show
|
||||||
|
Start-Sleep -Milliseconds 200
|
||||||
|
|
||||||
|
if ($Aggressive) {
|
||||||
|
# Scan system for corruption
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Scanning for corruption..." -PercentComplete 0
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running chkdsk..." -PercentComplete 0
|
||||||
|
# 2>&1 redirects stdout, alowing iteration over the output
|
||||||
|
chkdsk.exe /scan /perf 2>&1 | ForEach-Object {
|
||||||
|
# Write stdout to the Verbose stream
|
||||||
|
Write-Verbose $_
|
||||||
|
|
||||||
|
# Get the index of the total percentage
|
||||||
|
$index = $_.IndexOf("Total:")
|
||||||
|
if (
|
||||||
|
# If the percent is found
|
||||||
|
($percent = try {(
|
||||||
|
$_.Substring(
|
||||||
|
$index + 6,
|
||||||
|
$_.IndexOf("%", $index) - $index - 6
|
||||||
|
)
|
||||||
|
).Trim()} catch {0}) `
|
||||||
|
<# And the current percentage is greater than the previous one #>`
|
||||||
|
-and $percent -gt $oldpercent
|
||||||
|
) {
|
||||||
|
# Update the progress bar
|
||||||
|
$oldpercent = $percent
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running chkdsk... ($percent%)" -PercentComplete $percent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC..." -PercentComplete 0
|
||||||
|
$oldpercent = 0
|
||||||
|
# SFC has a bug when redirected which causes it to output only when the stdout buffer is full, causing the progress bar to move in chunks
|
||||||
|
sfc /scannow 2>&1 | ForEach-Object {
|
||||||
|
# Write stdout to the Verbose stream
|
||||||
|
Write-Verbose $_
|
||||||
|
|
||||||
|
# Filter for lines that contain a percentage that is greater than the previous one
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
# Use a different method to get the percentage that accounts for SFC's Unicode output
|
||||||
|
[int]$percent = try {(
|
||||||
|
(
|
||||||
|
$_.Substring(
|
||||||
|
$_.IndexOf("n") + 2,
|
||||||
|
$_.IndexOf("%") - $_.IndexOf("n") - 2
|
||||||
|
).ToCharArray() | Where-Object {$_}
|
||||||
|
) -join ''
|
||||||
|
).TrimStart()} catch {0}
|
||||||
|
) -and $percent -gt $oldpercent
|
||||||
|
) {
|
||||||
|
# Update the progress bar
|
||||||
|
$oldpercent = $percent
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC... ($percent%)" -PercentComplete $percent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running DISM..." -PercentComplete 0
|
||||||
|
$oldpercent = 0
|
||||||
|
DISM /Online /Cleanup-Image /RestoreHealth | ForEach-Object {
|
||||||
|
# Write stdout to the Verbose stream
|
||||||
|
Write-Verbose $_
|
||||||
|
|
||||||
|
# Filter for lines that contain a percentage that is greater than the previous one
|
||||||
|
if (
|
||||||
|
($percent = try {
|
||||||
|
[int]($_ -replace "\[" -replace "=" -replace " " -replace "%" -replace "\]")
|
||||||
|
} catch {0}) `
|
||||||
|
-and $percent -gt $oldpercent
|
||||||
|
) {
|
||||||
|
# Update the progress bar
|
||||||
|
$oldpercent = $percent
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running DISM... ($percent%)" -PercentComplete $percent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC again..." -PercentComplete 0
|
||||||
|
$oldpercent = 0
|
||||||
|
sfc /scannow 2>&1 | ForEach-Object {
|
||||||
|
# Write stdout to the Verbose stream
|
||||||
|
Write-Verbose $_
|
||||||
|
|
||||||
|
# Filter for lines that contain a percentage that is greater than the previous one
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
[int]$percent = try {(
|
||||||
|
(
|
||||||
|
$_.Substring(
|
||||||
|
$_.IndexOf("n") + 2,
|
||||||
|
$_.IndexOf("%") - $_.IndexOf("n") - 2
|
||||||
|
).ToCharArray() | Where-Object {$_}
|
||||||
|
) -join ''
|
||||||
|
).TrimStart()} catch {0}
|
||||||
|
) -and $percent -gt $oldpercent
|
||||||
|
) {
|
||||||
|
# Update the progress bar
|
||||||
|
$oldpercent = $percent
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC... ($percent%)" -PercentComplete $percent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Completed" -PercentComplete 100
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Stopping Windows Update Services..." -PercentComplete 10
|
||||||
|
# Stop the Windows Update Services
|
||||||
|
Write-Progress -Id 2 -ParentId 0 -Activity "Stopping Services" -Status "Stopping BITS..." -PercentComplete 0
|
||||||
|
Stop-Service -Name BITS -Force
|
||||||
|
Write-Progress -Id 2 -ParentId 0 -Activity "Stopping Services" -Status "Stopping wuauserv..." -PercentComplete 20
|
||||||
|
Stop-Service -Name wuauserv -Force
|
||||||
|
Write-Progress -Id 2 -ParentId 0 -Activity "Stopping Services" -Status "Stopping appidsvc..." -PercentComplete 40
|
||||||
|
Stop-Service -Name appidsvc -Force
|
||||||
|
Write-Progress -Id 2 -ParentId 0 -Activity "Stopping Services" -Status "Stopping cryptsvc..." -PercentComplete 60
|
||||||
|
Stop-Service -Name cryptsvc -Force
|
||||||
|
Write-Progress -Id 2 -ParentId 0 -Activity "Stopping Services" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
|
# Remove the QMGR Data file
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Renaming/Removing Files..." -PercentComplete 20
|
||||||
|
Write-Progress -Id 3 -ParentId 0 -Activity "Renaming/Removing Files" -Status "Removing QMGR Data files..." -PercentComplete 0
|
||||||
|
Remove-Item "$env:allusersprofile\Application Data\Microsoft\Network\Downloader\qmgr*.dat" -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
|
||||||
|
if ($Aggressive) {
|
||||||
|
# Rename the Windows Update Log and Signature Folders
|
||||||
|
Write-Progress -Id 3 -ParentId 0 -Activity "Renaming/Removing Files" -Status "Renaming the Windows Update Log, Download, and Signature Folder..." -PercentComplete 20
|
||||||
|
Rename-Item $env:systemroot\SoftwareDistribution\DataStore DataStore.bak -ErrorAction SilentlyContinue
|
||||||
|
Rename-Item $env:systemroot\System32\Catroot2 catroot2.bak -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
# Rename the Windows Update Download Folder
|
||||||
|
Write-Progress -Id 3 -ParentId 0 -Activity "Renaming/Removing Files" -Status "Renaming the Windows Update Download Folder..." -PercentComplete 20
|
||||||
|
Rename-Item $env:systemroot\SoftwareDistribution\Download Download.bak -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
# Delete the legacy Windows Update Log
|
||||||
|
Write-Progress -Id 3 -ParentId 0 -Activity "Renaming/Removing Files" -Status "Removing the old Windows Update log..." -PercentComplete 80
|
||||||
|
Remove-Item $env:systemroot\WindowsUpdate.log -ErrorAction SilentlyContinue
|
||||||
|
Write-Progress -Id 3 -ParentId 0 -Activity "Renaming/Removing Files" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
|
if ($Aggressive) {
|
||||||
|
# Reset the Security Descriptors on the Windows Update Services
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting the WU Service Security Descriptors..." -PercentComplete 25
|
||||||
|
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the BITS Security Descriptor..." -PercentComplete 0
|
||||||
|
Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "bits", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
|
||||||
|
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the wuauserv Security Descriptor..." -PercentComplete 50
|
||||||
|
Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "wuauserv", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
|
||||||
|
Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Completed" -PercentComplete 100
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Reregister the BITS and Windows Update DLLs
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Reregistering DLLs..." -PercentComplete 40
|
||||||
|
$oldLocation = Get-Location
|
||||||
|
Set-Location $env:systemroot\system32
|
||||||
|
$i = 0
|
||||||
|
$DLLs = @(
|
||||||
|
"atl.dll", "urlmon.dll", "mshtml.dll", "shdocvw.dll", "browseui.dll",
|
||||||
|
"jscript.dll", "vbscript.dll", "scrrun.dll", "msxml.dll", "msxml3.dll",
|
||||||
|
"msxml6.dll", "actxprxy.dll", "softpub.dll", "wintrust.dll", "dssenh.dll",
|
||||||
|
"rsaenh.dll", "gpkcsp.dll", "sccbase.dll", "slbcsp.dll", "cryptdlg.dll",
|
||||||
|
"oleaut32.dll", "ole32.dll", "shell32.dll", "initpki.dll", "wuapi.dll",
|
||||||
|
"wuaueng.dll", "wuaueng1.dll", "wucltui.dll", "wups.dll", "wups2.dll",
|
||||||
|
"wuweb.dll", "qmgr.dll", "qmgrprxy.dll", "wucltux.dll", "muweb.dll", "wuwebv.dll"
|
||||||
|
)
|
||||||
|
foreach ($dll in $DLLs) {
|
||||||
|
Write-Progress -Id 5 -ParentId 0 -Activity "Reregistering DLLs" -Status "Registering $dll..." -PercentComplete ($i / $DLLs.Count * 100)
|
||||||
|
$i++
|
||||||
|
Start-Process -NoNewWindow -FilePath "regsvr32.exe" -ArgumentList "/s", $dll
|
||||||
|
}
|
||||||
|
Set-Location $oldLocation
|
||||||
|
Write-Progress -Id 5 -ParentId 0 -Activity "Reregistering DLLs" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
|
# Remove the WSUS client settings
|
||||||
|
if (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate") {
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Removing WSUS client settings..." -PercentComplete 60
|
||||||
|
Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -PercentComplete 0
|
||||||
|
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "AccountDomainSid", "/f" -RedirectStandardError $true
|
||||||
|
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "PingID", "/f" -RedirectStandardError $true
|
||||||
|
Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "SusClientId", "/f" -RedirectStandardError $true
|
||||||
|
Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -Status "Completed" -PercentComplete 100
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Reset WinSock
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting WinSock..." -PercentComplete 65
|
||||||
|
Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Resetting WinSock..." -PercentComplete 0
|
||||||
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" -RedirectStandardOutput $true
|
||||||
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" -RedirectStandardOutput $true
|
||||||
|
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" -RedirectStandardOutput $true
|
||||||
|
Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
|
# Get and delete all BITS jobs
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Deleting BITS jobs..." -PercentComplete 75
|
||||||
|
Write-Progress -Id 8 -ParentId 0 -Activity "Deleting BITS jobs" -Status "Deleting BITS jobs..." -PercentComplete 0
|
||||||
|
Get-BitsTransfer | Remove-BitsTransfer
|
||||||
|
Write-Progress -Id 8 -ParentId 0 -Activity "Deleting BITS jobs" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
|
# Change the startup type of the Windows Update Services and start them
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Starting Windows Update Services..." -PercentComplete 90
|
||||||
|
Write-Progress -Id 9 -ParentId 0 -Activity "Starting Windows Update Services" -Status "Starting BITS..." -PercentComplete 0
|
||||||
|
Get-Service BITS | Set-Service -StartupType Manual -PassThru | Start-Service
|
||||||
|
Write-Progress -Id 9 -ParentId 0 -Activity "Starting Windows Update Services" -Status "Starting wuauserv..." -PercentComplete 25
|
||||||
|
Get-Service wuauserv | Set-Service -StartupType Manual -PassThru | Start-Service
|
||||||
|
Write-Progress -Id 9 -ParentId 0 -Activity "Starting Windows Update Services" -Status "Starting AppIDSvc..." -PercentComplete 50
|
||||||
|
# The AppIDSvc service is protected, so the startup type has to be changed in the registry
|
||||||
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\AppIDSvc" -Name "Start" -Value "3" # Manual
|
||||||
|
Start-Service AppIDSvc
|
||||||
|
Write-Progress -Id 9 -ParentId 0 -Activity "Starting Windows Update Services" -Status "Starting CryptSvc..." -PercentComplete 75
|
||||||
|
Get-Service CryptSvc | Set-Service -StartupType Manual -PassThru | Start-Service
|
||||||
|
Write-Progress -Id 9 -ParentId 0 -Activity "Starting Windows Update Services" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
|
||||||
|
# Force Windows Update to check for updates
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Forcing discovery..." -PercentComplete 95
|
||||||
|
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Forcing discovery..." -PercentComplete 0
|
||||||
|
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
|
||||||
|
Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow"
|
||||||
|
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100
|
||||||
|
|
||||||
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
|
$MessageboxTitle = "Reset Windows Update "
|
||||||
|
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
||||||
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
Write-Host "==============================================="
|
||||||
|
Write-Host "-- Reset All Windows Update Settings to Stock -"
|
||||||
|
Write-Host "==============================================="
|
||||||
|
|
||||||
|
# Remove the progress bars
|
||||||
|
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Completed
|
||||||
|
Write-Progress -Id 1 -Activity "Scanning for corruption" -Completed
|
||||||
|
Write-Progress -Id 2 -Activity "Stopping Services" -Completed
|
||||||
|
Write-Progress -Id 3 -Activity "Renaming/Removing Files" -Completed
|
||||||
|
Write-Progress -Id 4 -Activity "Resetting the WU Service Security Descriptors" -Completed
|
||||||
|
Write-Progress -Id 5 -Activity "Reregistering DLLs" -Completed
|
||||||
|
Write-Progress -Id 6 -Activity "Removing WSUS client settings" -Completed
|
||||||
|
Write-Progress -Id 7 -Activity "Resetting WinSock" -Completed
|
||||||
|
Write-Progress -Id 8 -Activity "Deleting BITS jobs" -Completed
|
||||||
|
Write-Progress -Id 9 -Activity "Starting Windows Update Services" -Completed
|
||||||
|
Write-Progress -Id 10 -Activity "Forcing discovery" -Completed
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
58
docs/dev/features/Fixes/Winget.md
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# WinGet Reinstall
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "WinGet Reinstall",
|
||||||
|
"category": "Fixes",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a044_",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Fixes/Winget"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFFixesWinget
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFFixesWinget {
|
||||||
|
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Fixes Winget by running choco install winget
|
||||||
|
.DESCRIPTION
|
||||||
|
BravoNorris for the fantastic idea of a button to reinstall winget
|
||||||
|
#>
|
||||||
|
# Install Choco if not already present
|
||||||
|
Install-WinUtilChoco
|
||||||
|
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/control.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Control Panel
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Control Panel",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/control"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/network.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Network Connections
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Network Connections",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/network"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/power.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Power Panel
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Power Panel",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/power"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/region.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Region
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Region",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/region"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/sound.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Sound Settings
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Sound Settings",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/sound"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/system.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# System Properties
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "System Properties",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/system"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
65
docs/dev/features/Legacy-Windows-Panels/user.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# User Accounts
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "User Accounts",
|
||||||
|
"category": "Legacy Windows Panels",
|
||||||
|
"panel": "2",
|
||||||
|
"Type": "Button",
|
||||||
|
"ButtonWidth": "300",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/user"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WPFControlPanel
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WPFControlPanel {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Opens the requested legacy panel
|
||||||
|
|
||||||
|
.PARAMETER Panel
|
||||||
|
The panel to open
|
||||||
|
|
||||||
|
#>
|
||||||
|
param($Panel)
|
||||||
|
|
||||||
|
switch ($Panel) {
|
||||||
|
"WPFPanelcontrol" {cmd /c control}
|
||||||
|
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||||
|
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||||
|
"WPFPanelregion" {cmd /c intl.cpl}
|
||||||
|
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||||
|
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||||
|
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/BingSearch.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Bing Search in Start Menu
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If enable then includes web search results from Bing in your Start Menu search.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "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": "a101_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/BingSearch"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilBingSearch
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilBingSearch {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Bing Search
|
||||||
|
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Bing Search
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Bing Search"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Bing Search"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search"
|
||||||
|
Set-ItemProperty -Path $Path -Name BingSearchEnabled -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
78
docs/dev/tweaks/Customize-Preferences/DarkMode.md
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
# Dark Theme for Windows
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Enable/Disable Dark Mode.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Dark Theme for Windows",
|
||||||
|
"Description": "Enable/Disable Dark Mode.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a100_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DarkMode"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilDarkMode
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Function Invoke-WinUtilDarkMode {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enables/Disables Dark Mode
|
||||||
|
|
||||||
|
.PARAMETER DarkMoveEnabled
|
||||||
|
Indicates the current dark mode state
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($DarkMoveEnabled)
|
||||||
|
try {
|
||||||
|
if ($DarkMoveEnabled -eq $false) {
|
||||||
|
Write-Host "Enabling Dark Mode"
|
||||||
|
$DarkMoveValue = 0
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Dark Mode"
|
||||||
|
$DarkMoveValue = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||||
|
Set-ItemProperty -Path $Path -Name AppsUseLightTheme -Value $DarkMoveValue
|
||||||
|
Set-ItemProperty -Path $Path -Name SystemUsesLightTheme -Value $DarkMoveValue
|
||||||
|
} 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/DetailedBSoD.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Detailed BSoD
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Detailed BSoD",
|
||||||
|
"Description": "If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a205_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DetailedBSoD"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilDetailedBSoD
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Function Invoke-WinUtilDetailedBSoD {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enables/Disables Detailed BSoD
|
||||||
|
(Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'DisplayParameters').DisplayParameters
|
||||||
|
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Detailed BSoD"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Detailed BSoD"
|
||||||
|
$value =0
|
||||||
|
}
|
||||||
|
|
||||||
|
$Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
|
||||||
|
Set-ItemProperty -Path $Path -Name DisplayParameters -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/HiddenFiles.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Show Hidden Files
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If Enabled then Hidden Files will be shown.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Show Hidden Files",
|
||||||
|
"Description": "If Enabled then Hidden Files will be shown.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a200_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/HiddenFiles"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilHiddenFiles
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
84
docs/dev/tweaks/Customize-Preferences/MouseAcceleration.md
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
# Mouse Acceleration
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If Enabled then Cursor movement is affected by the speed of your physical mouse movements.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "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",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/MouseAcceleration"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilMouseAcceleration
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Function Invoke-WinUtilMouseAcceleration {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enables/Disables Mouse Acceleration
|
||||||
|
|
||||||
|
.PARAMETER DarkMoveEnabled
|
||||||
|
Indicates the current Mouse Acceleration State
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($MouseAccelerationEnabled)
|
||||||
|
try {
|
||||||
|
if ($MouseAccelerationEnabled -eq $false) {
|
||||||
|
Write-Host "Enabling Mouse Acceleration"
|
||||||
|
$MouseSpeed = 1
|
||||||
|
$MouseThreshold1 = 6
|
||||||
|
$MouseThreshold2 = 10
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Mouse Acceleration"
|
||||||
|
$MouseSpeed = 0
|
||||||
|
$MouseThreshold1 = 0
|
||||||
|
$MouseThreshold2 = 0
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$Path = "HKCU:\Control Panel\Mouse"
|
||||||
|
Set-ItemProperty -Path $Path -Name MouseSpeed -Value $MouseSpeed
|
||||||
|
Set-ItemProperty -Path $Path -Name MouseThreshold1 -Value $MouseThreshold1
|
||||||
|
Set-ItemProperty -Path $Path -Name MouseThreshold2 -Value $MouseThreshold2
|
||||||
|
} 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
77
docs/dev/tweaks/Customize-Preferences/NumLock.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# NumLock on Startup
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Toggle the Num Lock key state when your computer starts.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "NumLock on Startup",
|
||||||
|
"Description": "Toggle the Num Lock key state when your computer starts.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a102_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/NumLock"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilNumLock
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilNumLock {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables NumLock on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Numlock on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Numlock on startup"
|
||||||
|
$value = 2
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Numlock on startup"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
||||||
|
$HKUPath = "HKU:\.Default\Control Panel\Keyboard"
|
||||||
|
$HKCUPath = "HKCU:\Control Panel\Keyboard"
|
||||||
|
Set-ItemProperty -Path $HKUPath -Name InitialKeyboardIndicators -Value $value
|
||||||
|
Set-ItemProperty -Path $HKCUPath -Name InitialKeyboardIndicators -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
73
docs/dev/tweaks/Customize-Preferences/ShowExt.md
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Show File Extensions
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If enabled then File extensions (e.g., .txt, .jpg) are visible.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Show File Extensions",
|
||||||
|
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a201_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/ShowExt"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilShowExt
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilShowExt {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Show file Extentions
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Show file extentions
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Showing file extentions"
|
||||||
|
$value = 0
|
||||||
|
} else {
|
||||||
|
Write-Host "hiding file extensions"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
Set-ItemProperty -Path $Path -Name HideFileExt -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/SnapFlyout.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Snap Assist Flyout
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If enabled then Snap preview is disabled when maximize button is hovered.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "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",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapFlyout"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilSnapFlyout
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilSnapFlyout {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Snap Assist Flyout on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Snap Assist Flyout on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Snap Assist Flyout On startup"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Snap Assist Flyout On startup"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
# taskkill.exe /F /IM "explorer.exe"
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
taskkill.exe /F /IM "explorer.exe"
|
||||||
|
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
|
||||||
|
Start-Process "explorer.exe"
|
||||||
|
} 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/SnapSuggestion.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Snap Assist Suggestion
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If enabled then you will get suggestions to snap other applications in the left over spaces.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "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",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapSuggestion"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilSnapSuggestion
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilSnapSuggestion {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Snap Assist Suggestions on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Snap Assist Suggestions on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Snap Assist Suggestion On startup"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Snap Assist Suggestion On startup"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
# taskkill.exe /F /IM "explorer.exe"
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
taskkill.exe /F /IM "explorer.exe"
|
||||||
|
Set-ItemProperty -Path $Path -Name SnapAssist -Value $value
|
||||||
|
Start-Process "explorer.exe"
|
||||||
|
} 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
73
docs/dev/tweaks/Customize-Preferences/SnapWindow.md
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Snap Window
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If enabled you can align windows by dragging them. | Relogin Required
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Snap Window",
|
||||||
|
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a104_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapWindow"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilSnapWindow
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilSnapWindow {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Snapping Windows on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Snapping Windows on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Snap Windows On startup | Relogin Required"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Snap Windows On startup | Relogin Required"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Control Panel\Desktop"
|
||||||
|
Set-ItemProperty -Path $Path -Name WindowArrangementActive -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
73
docs/dev/tweaks/Customize-Preferences/StickyKeys.md
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Sticky Keys
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"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": "a108_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/StickyKeys"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilStickyKeys
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Function Invoke-WinUtilStickyKeys {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Sticky Keyss on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Sticky Keys on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Sticky Keys On startup"
|
||||||
|
$value = 510
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Sticky Keys On startup"
|
||||||
|
$value = 58
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Control Panel\Accessibility\StickyKeys"
|
||||||
|
Set-ItemProperty -Path $Path -Name Flags -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/TaskView.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Task View Button in Taskbar
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If Enabled then Task View Button in Taskbar will be shown.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Task View Button in Taskbar",
|
||||||
|
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a203_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskView"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilTaskView
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/TaskbarAlignment.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Center Taskbar Items
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Center Taskbar Items",
|
||||||
|
"Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a204_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarAlignment"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilTaskbarAlignment
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/TaskbarSearch.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Search Button in Taskbar
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If Enabled Search Button will be on the taskbar.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Search Button in Taskbar",
|
||||||
|
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a202_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarSearch"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilTaskbarSearch
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
76
docs/dev/tweaks/Customize-Preferences/TaskbarWidgets.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Widgets Button in Taskbar
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
If Enabled then Widgets Button in Taskbar will be shown.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Widgets Button in Taskbar",
|
||||||
|
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a204_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarWidgets"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilTaskbarWidgets
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilTaskbarWidgets {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enable/Disable Taskbar Widgets
|
||||||
|
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Taskbar Widgets
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Taskbar Widgets"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Taskbar Widgets"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
Set-ItemProperty -Path $Path -Name TaskbarDa -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
73
docs/dev/tweaks/Customize-Preferences/VerboseLogon.md
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Verbose Messages During Logon
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Show detailed messages during the login process for troubleshooting and diagnostics.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Verbose Messages During Logon",
|
||||||
|
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a103_",
|
||||||
|
"Type": "Toggle",
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Function: Invoke-WinUtilVerboseLogon
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
function Invoke-WinUtilVerboseLogon {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables VerboseLogon Messages
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable VerboseLogon messages
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
try {
|
||||||
|
if ($Enabled -eq $false) {
|
||||||
|
Write-Host "Enabling Verbose Logon Messages"
|
||||||
|
$value = 1
|
||||||
|
} else {
|
||||||
|
Write-Host "Disabling Verbose Logon Messages"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
|
||||||
|
Set-ItemProperty -Path $Path -Name VerboseStatus -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
93
docs/dev/tweaks/Essential-Tweaks/AH.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
# Disable Activity History
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This erases recent docs, clipboard, and run history.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Disable Activity History",
|
||||||
|
"Description": "This erases recent docs, clipboard, and run history.",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a005_",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||||
|
"Name": "UploadUserActivities",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/AH"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Registry Changes
|
||||||
|
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
|
||||||
|
### Registry Key: EnableActivityFeed
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: PublishUserActivities
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: UploadUserActivities
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
63
docs/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Disable ConsumerFeatures
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/ConsumerFeatures"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Registry Changes
|
||||||
|
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
|
||||||
|
### Registry Key: DisableWindowsConsumerFeatures
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 0
|
||||||
|
|
||||||
|
**New Value:** 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
123
docs/dev/tweaks/Essential-Tweaks/DVR.md
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
# Disable GameDVR
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Disable GameDVR",
|
||||||
|
"Description": "GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd.",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a005_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_FSEBehavior",
|
||||||
|
"Value": "2",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_Enabled",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_HonorUserFSEBehaviorMode",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
|
"Name": "GameDVR_EFSEFeatureFlags",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR",
|
||||||
|
"Name": "AllowGameDVR",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DVR"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Registry Changes
|
||||||
|
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
|
||||||
|
### Registry Key: GameDVR_FSEBehavior
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 2
|
||||||
|
|
||||||
|
### Registry Key: GameDVR_Enabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: GameDVR_HonorUserFSEBehaviorMode
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 0
|
||||||
|
|
||||||
|
**New Value:** 1
|
||||||
|
|
||||||
|
### Registry Key: GameDVR_EFSEFeatureFlags
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: AllowGameDVR
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
50
docs/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Delete Temporary Files
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Erases TEMP Folders
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Delete Temporary Files",
|
||||||
|
"Description": "Erases TEMP Folders",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a002_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse
|
||||||
|
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DeleteTempFiles"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Get-ChildItem -Path "C:\Windows\Temp" *.* -Recurse | Remove-Item -Force -Recurse
|
||||||
|
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
54
docs/dev/tweaks/Essential-Tweaks/DiskCleanup.md
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# Run Disk Cleanup
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Runs Disk Cleanup on Drive C: and removes old Windows Updates.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Run Disk Cleanup",
|
||||||
|
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a009_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
cleanmgr.exe /d C: /VERYLOWDISK
|
||||||
|
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DiskCleanup"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
cleanmgr.exe /d C: /VERYLOWDISK
|
||||||
|
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
363
docs/dev/tweaks/Essential-Tweaks/EdgeDebloat.md
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
# Debloat Edge
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Disables various telemetry options, popups, and other annoyances in Edge.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Debloat Edge",
|
||||||
|
"Description": "Disables various telemetry options, popups, and other annoyances in Edge.",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a016_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate",
|
||||||
|
"Name": "CreateDesktopShortcutDefault",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "EdgeEnhanceImagesEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "PersonalizationReportingEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "ShowRecommendationsEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "HideFirstRunExperience",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "UserFeedbackAllowed",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "ConfigureDoNotTrack",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "AlternateErrorPagesEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "EdgeCollectionsEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "EdgeFollowEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "EdgeShoppingAssistantEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "MicrosoftEdgeInsiderPromotionEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "PersonalizationReportingEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "ShowMicrosoftRewards",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "WebWidgetAllowed",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "DiagnosticData",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "EdgeAssetDeliveryServiceEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "EdgeCollectionsEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "CryptoWalletEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "ConfigureDoNotTrack",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "WalletDonationEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/EdgeDebloat"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Registry Changes
|
||||||
|
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
|
||||||
|
### Registry Key: CreateDesktopShortcutDefault
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: EdgeEnhanceImagesEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: PersonalizationReportingEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: ShowRecommendationsEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: HideFirstRunExperience
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 0
|
||||||
|
|
||||||
|
**New Value:** 1
|
||||||
|
|
||||||
|
### Registry Key: UserFeedbackAllowed
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: ConfigureDoNotTrack
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 0
|
||||||
|
|
||||||
|
**New Value:** 1
|
||||||
|
|
||||||
|
### Registry Key: AlternateErrorPagesEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: EdgeCollectionsEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: EdgeFollowEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: EdgeShoppingAssistantEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: MicrosoftEdgeInsiderPromotionEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: PersonalizationReportingEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: ShowMicrosoftRewards
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: WebWidgetAllowed
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: DiagnosticData
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: EdgeAssetDeliveryServiceEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: EdgeCollectionsEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: CryptoWalletEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: ConfigureDoNotTrack
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 0
|
||||||
|
|
||||||
|
**New Value:** 1
|
||||||
|
|
||||||
|
### Registry Key: WalletDonationEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
97
docs/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
# Enable End Task With Right Click
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Enables option to end task when right clicking a program in the taskbar
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Enable End Task With Right Click",
|
||||||
|
"Description": "Enables option to end task when right clicking a program in the taskbar",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a006_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"$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": [
|
||||||
|
"$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"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$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
|
||||||
|
|
||||||
|
```
|
||||||
|
## Undo Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$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
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
96
docs/dev/tweaks/Essential-Tweaks/Hiber.md
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# Disable Hibernation
|
||||||
|
|
||||||
|
Last Updated: 2024-08-07
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Disable Hibernation",
|
||||||
|
"Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a005_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power",
|
||||||
|
"Name": "HibernateEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings",
|
||||||
|
"Name": "ShowHibernateOption",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"InvokeScript": [
|
||||||
|
"powercfg.exe /hibernate off"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"powercfg.exe /hibernate on"
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Hiber"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Invoke Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
powercfg.exe /hibernate off
|
||||||
|
|
||||||
|
```
|
||||||
|
## Undo Script
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
powercfg.exe /hibernate on
|
||||||
|
|
||||||
|
```
|
||||||
|
## Registry Changes
|
||||||
|
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
|
||||||
|
### Registry Key: HibernateEnabled
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
### Registry Key: ShowHibernateOption
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 1
|
||||||
|
|
||||||
|
**New Value:** 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|