Compare commits

...

20 Commits

Author SHA1 Message Date
Gabi a0887783f8 fix allowing everyone to close issues (#4454)
* Update issue-slash-commands.yaml

* Update issue-slash-commands.yaml

* Update issue-slash-commands.yaml
2026-05-07 16:23:43 -05:00
Ivan Lepekha f3880b66bb feat: Update GH issue template for known issues (#4455)
* Add checkbox for known issues acknowledgment

Some people do not check the link

* typo fix

Updated checkbox type to checkboxes in bug report template.

* :zombie_sound:

* :zombie_sound_2:

* AAAAAAAAAAAAAAA

* I'm tired of testing commits

* :zombie_sound_1337:

Added a description to the read issues checkbox.

* my bad
2026-05-07 15:56:01 -05:00
Chris Titus aa636926fa chore: Update generated dev docs (#4457) 2026-05-07 15:53:01 -05:00
Gabi ec3166bdc6 Update Invoke-WinUtilInstallPSProfile.ps1 (#4456)
* Update Invoke-WinUtilInstallPSProfile.ps1

* Update Invoke-WinUtilUninstallPSProfile.ps1

* Update Invoke-WinUtilInstallPSProfile.ps1

* Update Invoke-WinUtilUninstallPSProfile.ps1
2026-05-07 15:52:20 -05:00
Gabi a3f57532b6 Cleanup winget upgrade (#4410)
* Update Update-WinUtilProgramWinget.ps1

* Delete functions/private/Update-WinUtilProgramWinget.ps1

* Delete functions/private/Get-WinUtilInstallerProcess.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1
2026-05-05 15:16:39 -05:00
github-actions[bot] 3a7851b0f4 Update sponsors in README (#4387)
Co-authored-by: ChrisTitusTech <7896101+ChrisTitusTech@users.noreply.github.com>
2026-04-30 15:19:09 -05:00
Gabi 6fa73db245 Removed anythingllm from applications.json (#4428) 2026-04-30 15:18:07 -05:00
Chris Titus 184fe22a35 Cleanup: Delete all Scheduled Tasks related things (#4435)
* Delete functions/private/Set-WinUtilScheduledTask.ps1

* Update Invoke-WinUtilTweaks.ps1

* Update Invoke-WinUtilCurrentSystem.ps1

* waste of time

---------

Co-authored-by: Gabi <218829269+GabiNun2@users.noreply.github.com>
2026-04-30 15:16:27 -05:00
Gabi 9d4613d838 Strip unneccary surpassion from win11 creator (#4422)
* Update Invoke-WinUtilISO.ps1

* Update Invoke-WinUtilISOScript.ps1

* Update Invoke-WinUtilISOUSB.ps1

* Merge branch 'ChrisTitusTech:main' into patch-8
2026-04-30 14:58:07 -05:00
Gabi 10d83c5b20 Added tweaks_applied to issue temeplate (#4416)
* Update bug_report.yaml

* Merge branch 'ChrisTitusTech:main' into patch-5
2026-04-30 14:37:34 -05:00
Chris Titus 4065759ca0 chore: Update generated dev docs (#4434) 2026-04-30 12:46:57 -05:00
Chris Titus 97d5f7b850 feat: Add Brave debloat settings to tweaks.json (#4427)
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 12:46:12 -05:00
Gabi bf542af426 Fix TranslucentTB not installing (#4424) 2026-04-29 12:26:07 -05:00
Gabi ea9c7de722 Add a reminder that docs are auto-generated (#4421)
* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md
2026-04-29 12:24:24 -05:00
Gabi d2e5886b02 Update docs images (#4419)
* Delete docs/assets/images/Install/Install-apps.png

* Add files via upload

* Delete docs/assets/images/Tweaks-Tab-Light.png

* Delete docs/assets/images/Tweaks-Tab-Dark.png

* Delete docs/assets/images/Settings-Export-Light.png

* Delete docs/assets/images/Settings-Export-Dark.png

* Delete docs/assets/images/Install-Tab-Light.png

* Delete docs/assets/images/Install-Tab-Dark.png

* Delete docs/assets/images/Get-Installed-Light.png

* Delete docs/assets/images/Get-Installed-Dark.png

* Add files via upload
2026-04-29 12:22:26 -05:00
Chris Titus d43c26e314 chore: Update generated dev docs (#4433) 2026-04-29 12:18:13 -05:00
Gabi 4297d69f2c Added WPFToggleBatteryPercentage to tweaks.json (#4412)
* Added `WPFTweaksBatteryPercentage` to tweaks.json

* Update tweaks.json

* Update tweaks.json

* Update tweaks.json

* Update tweaks.json
2026-04-29 12:17:16 -05:00
Gabi 36e4b27872 Update autounattend.xml (#4409) 2026-04-29 12:00:54 -05:00
Chris Titus ec5c7a4639 chore: Update generated dev docs (#4432) 2026-04-29 11:59:52 -05:00
Gabi f2ca10e8c9 Changed Some names (#4406)
* Changed Some names in tweaks.json

* Update feature.json

* Update tweaks.json

* Update tweaks.json
2026-04-29 11:59:03 -05:00
98 changed files with 369 additions and 342 deletions
+18 -2
View File
@@ -8,7 +8,16 @@ body:
value: | value: |
- Remember, we only support Windows 11. If you encounter problems on Windows 10, please consider upgrading to Windows 11. - Remember, we only support Windows 11. If you encounter problems on Windows 10, please consider upgrading to Windows 11.
- For general questions, join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ). - For general questions, join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ).
- type: checkboxes
id: read_issues
attributes:
label: "I have read the known issues"
description: "You [better do](https://winutil.christitus.com/knownissues/), cause your issue can be already there"
options:
- label: Yes, I did
required: true
- type: dropdown - type: dropdown
id: affected_part id: affected_part
attributes: attributes:
@@ -29,8 +38,15 @@ body:
validations: validations:
required: true required: true
- type: textarea
id: tweaks_applied
attributes:
label: List the tweaks you applied before the issue occurred.
validations:
required: false
- type: textarea - type: textarea
id: error_output id: error_output
attributes: attributes:
label: Paste the full error output (if available) or Screenshot. label: Paste the full error output (if available) or Screenshot or Video.
placeholder: "Include any relevant logs or error messages." placeholder: "Include any relevant logs or error messages."
+1
View File
@@ -1,4 +1,5 @@
<!--Before you make this PR have you followed the docs here? - https://winutil.christitus.com/contributing/ --> <!--Before you make this PR have you followed the docs here? - https://winutil.christitus.com/contributing/ -->
<!--Documentation is auto-generated from configs - no manual documentation updates needed -->
## Type of Change ## Type of Change
- [ ] New feature - [ ] New feature
+5 -5
View File
@@ -67,7 +67,7 @@ jobs:
id: check_user id: check_user
if: env.command == 'true' if: env.command == 'true'
run: | run: |
ALLOWED_USERS=("ChrisTitusTech" "og-mrk" "Marterich" "MyDrift-user" "Real-MullaC" "CodingWonders" "GabiNun") ALLOWED_USERS=("ChrisTitusTech" "og-mrk" "Marterich" "MyDrift-user" "Real-MullaC" "CodingWonders" "GabiNun2" "FluffyPunk")
if [[ " ${ALLOWED_USERS[@]} " =~ " ${{ github.event.comment.user.login }} " ]]; then if [[ " ${ALLOWED_USERS[@]} " =~ " ${{ github.event.comment.user.login }} " ]]; then
echo "user=true" >> $GITHUB_ENV echo "user=true" >> $GITHUB_ENV
else else
@@ -75,7 +75,7 @@ jobs:
fi fi
- name: Close issue - name: Close issue
if: env.close_command == 'true' if: env.user == 'true' && env.close_command == 'true'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_NUMBER: ${{ github.event.issue.number }}
@@ -88,7 +88,7 @@ jobs:
fi fi
- name: Reopen issue - name: Reopen issue
if: env.reopen_command == 'true' if: env.user == 'true' && env.reopen_command == 'true'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_NUMBER: ${{ github.event.issue.number }}
@@ -97,7 +97,7 @@ jobs:
gh issue reopen $ISSUE_NUMBER --repo ${{ github.repository }} gh issue reopen $ISSUE_NUMBER --repo ${{ github.repository }}
- name: Label issue - name: Label issue
if: env.label_command == 'true' if: env.user == 'true' && env.label_command == 'true'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_NUMBER: ${{ github.event.issue.number }}
@@ -106,7 +106,7 @@ jobs:
gh issue edit $ISSUE_NUMBER --repo ${{ github.repository }} --add-label "${{ env.label_name }}" gh issue edit $ISSUE_NUMBER --repo ${{ github.repository }} --add-label "${{ env.label_name }}"
- name: Remove labels - name: Remove labels
if: env.unlabel_command == 'true' if: env.user == 'true' && env.unlabel_command == 'true'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_NUMBER: ${{ github.event.issue.number }}
+1 -1
View File
@@ -76,7 +76,7 @@ You'll see a new file named `winutil.ps1`, which was created by `Compile.ps1` sc
These are the sponsors that help keep this project alive with monthly contributions. These are the sponsors that help keep this project alive with monthly contributions.
<!-- sponsors --><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/partybrasil"><img src="https:&#x2F;&#x2F;github.com&#x2F;partybrasil.png" width="60px" alt="User avatar: Miguel Diaz" /></a><a href="https://github.com/andrewpayne68"><img src="https:&#x2F;&#x2F;github.com&#x2F;andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/Di3Z1E"><img src="https:&#x2F;&#x2F;github.com&#x2F;Di3Z1E.png" width="60px" alt="User avatar: Di3Z1E" /></a><a href="https://github.com/AbdulVakeel"><img src="https:&#x2F;&#x2F;github.com&#x2F;AbdulVakeel.png" width="60px" alt="User avatar: Abdul Vakeel Software Engineer" /></a><!-- sponsors --> <!-- sponsors --><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/andrewpayne68"><img src="https:&#x2F;&#x2F;github.com&#x2F;andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/Di3Z1E"><img src="https:&#x2F;&#x2F;github.com&#x2F;Di3Z1E.png" width="60px" alt="User avatar: Di3Z1E" /></a><a href="https://github.com/AbdulVakeel"><img src="https:&#x2F;&#x2F;github.com&#x2F;AbdulVakeel.png" width="60px" alt="User avatar: Abdul Vakeel Software Engineer" /></a><!-- sponsors -->
## 🏅 Thanks to all Contributors ## 🏅 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 🍻.
+1 -10
View File
@@ -107,15 +107,6 @@
"winget": "AnyDesk.AnyDesk", "winget": "AnyDesk.AnyDesk",
"foss": false "foss": false
}, },
"anythingllm": {
"category": "AI-Automation",
"choco": "na",
"content": "AnythingLLM",
"description": "Desktop AI application for chat with documents (RAG) and agent workflows; offers a Windows installer and an open-source codebase.",
"link": "https://anythingllm.com/",
"winget": "na",
"foss": true
},
"audacity": { "audacity": {
"category": "Multimedia Tools", "category": "Multimedia Tools",
"choco": "audacity", "choco": "audacity",
@@ -2929,7 +2920,7 @@
"content": "TranslucentTB", "content": "TranslucentTB",
"description": "TranslucentTB is a tool that allows you to customize the transparency of the Windows Taskbar.", "description": "TranslucentTB is a tool that allows you to customize the transparency of the Windows Taskbar.",
"link": "https://github.com/TranslucentTB/TranslucentTB", "link": "https://github.com/TranslucentTB/TranslucentTB",
"winget": "9PF4KZ2VN4W9", "winget": "CharlesMilette.TranslucentTB",
"foss": true "foss": true
}, },
"twinkletray": { "twinkletray": {
+1 -1
View File
@@ -138,7 +138,7 @@
"link": "https://winutil.christitus.com/dev/features/features/install" "link": "https://winutil.christitus.com/dev/features/features/install"
}, },
"WPFPanelAutologin": { "WPFPanelAutologin": {
"Content": "Autologin - Enable", "Content": "AutoLogon - Run",
"category": "Fixes", "category": "Fixes",
"panel": "1", "panel": "1",
"Type": "Button", "Type": "Button",
+72 -5
View File
@@ -282,12 +282,61 @@
"Value": "0", "Value": "0",
"Type": "DWord", "Type": "DWord",
"OriginalValue": "<RemoveEntry>" "OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveNewsDisabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveTalkDisabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "TorDisabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveP3AEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "UrlKeyedAnonymizedDataCollectionEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "SafeBrowsingExtendedReportingEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "MetricsReportingEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
} }
], ],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat" "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat"
}, },
"WPFTweaksDisableWarningForUnsignedRdp": { "WPFTweaksDisableWarningForUnsignedRdp": {
"Content": "Disable warnings for unsigned RDP files", "Content": "RDP Unsigned File Warnings - Disable",
"Description": "Disables warnings shown when launching unsigned RDP files introduced with the latest Windows 10 and 11 updates.", "Description": "Disables warnings shown when launching unsigned RDP files introduced with the latest Windows 10 and 11 updates.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
@@ -997,7 +1046,7 @@
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/razerblock" "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/razerblock"
}, },
"WPFTweaksDisableNotifications": { "WPFTweaksDisableNotifications": {
"Content": "Notification Tray & Calendar - Disable", "Content": "System Tray Notifications & Calendar - Disable",
"Description": "Disables all Notifications INCLUDING Calendar.", "Description": "Disables all Notifications INCLUDING Calendar.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
@@ -1233,6 +1282,24 @@
], ],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/detailedbsod" "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/detailedbsod"
}, },
"WPFToggleBatteryPercentage": {
"Content": "System Tray Battery Percentage",
"Description": "If enabled, Shows numeric battery percentage next to the battery icon in the system tray.",
"category": "Customize Preferences",
"panel": "2",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "IsBatteryPercentageEnabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "false"
}
],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/batterypercentage"
},
"WPFToggleDarkMode": { "WPFToggleDarkMode": {
"Content": "Dark Theme for Windows", "Content": "Dark Theme for Windows",
"Description": "Enable/Disable Dark Mode.", "Description": "Enable/Disable Dark Mode.",
@@ -1392,7 +1459,7 @@
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook" "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook"
}, },
"WPFToggleScrollbars": { "WPFToggleScrollbars": {
"Content": "Always Show Scrollbars", "Content": "Scrollbars Always Visible",
"Description": "If enabled, scrollbars will always be visible. If disabled, Windows will automatically hide scrollbars when not in use.", "Description": "If enabled, scrollbars will always be visible. If disabled, Windows will automatically hide scrollbars when not in use.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
@@ -1561,7 +1628,7 @@
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/bingsearch" "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/bingsearch"
}, },
"WPFToggleLoginBlur": { "WPFToggleLoginBlur": {
"Content": "Acrylic Blur on Login Screen", "Content": "Logon Screen Acrylic Blur",
"Description": "If disabled, the acrylic blur effect will be removed on the Windows 10/11 login screen background.", "Description": "If disabled, the acrylic blur effect will be removed on the Windows 10/11 login screen background.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
@@ -1705,7 +1772,7 @@
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskview" "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskview"
}, },
"WPFOOSUbutton": { "WPFOOSUbutton": {
"Content": "OO Shutup 10 - Run", "Content": "O&O ShutUp10++ - Run",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Type": "Button", "Type": "Button",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

-8
View File
@@ -380,13 +380,6 @@ Update UI
"Value": "0", "Value": "0",
"OriginalValue": "1" "OriginalValue": "1"
} }
],
"ScheduledTask": [
{
"Name": "Microsoft\\Windows\\Autochk\\Proxy",
"State": "Disabled",
"OriginalState": "Enabled"
}
] ]
} }
} }
@@ -397,7 +390,6 @@ Update UI
- `Description`: What it does - `Description`: What it does
- `category`: Essential/Advanced/Customize - `category`: Essential/Advanced/Customize
- `registry`: Registry changes to make - `registry`: Registry changes to make
- `ScheduledTask`: Scheduled tasks to modify
- `service`: Services to change - `service`: Services to change
- `OriginalValue/State`: For undo functionality - `OriginalValue/State`: For undo functionality
+1 -1
View File
@@ -1,5 +1,5 @@
--- ---
title: "Autologin - Enable" title: "AutoLogon - Run"
description: "" description: ""
--- ---
@@ -5,11 +5,18 @@ description: ""
```powershell {filename="functions/private/Invoke-WinUtilInstallPSProfile.ps1",linenos=inline,linenostart=1} ```powershell {filename="functions/private/Invoke-WinUtilInstallPSProfile.ps1",linenos=inline,linenostart=1}
function Invoke-WinUtilInstallPSProfile { function Invoke-WinUtilInstallPSProfile {
if (-not (Get-Command wt)) {
if (Test-Path $Profile) { Write-Host "Windows Terminal not found installing..."
Rename-Item $Profile -NewName ($Profile + '.bak') Install-WinUtilWinget
winget install Microsoft.WindowsTerminal --source winget --silent
} }
Start-Process pwsh -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"' if (-not (Get-Command pwsh)) {
Write-Host "Powershell 7 not found installing..."
Install-WinUtilWinget
winget install Microsoft.PowerShell --source winget --silent
}
wt new-tab pwsh -NoExit -Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"
} }
``` ```
@@ -5,12 +5,11 @@ description: ""
```powershell {filename="functions/private/Invoke-WinUtilUninstallPSProfile.ps1",linenos=inline,linenostart=1} ```powershell {filename="functions/private/Invoke-WinUtilUninstallPSProfile.ps1",linenos=inline,linenostart=1}
function Invoke-WinUtilUninstallPSProfile { function Invoke-WinUtilUninstallPSProfile {
if (Test-Path ($Profile + '.bak')) {
Remove-Item $Profile if (Test-Path ($Profile + ".bak")) {
Rename-Item ($Profile + '.bak') -NewName $Profile Move-Item -Path ($Profile + ".bak") -Destination $Profile
} } else {
else { Remove-Item -Path $Profile
Remove-Item $Profile
} }
Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green
@@ -0,0 +1,29 @@
---
title: "System Tray Battery Percentage"
description: ""
---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1285}
"WPFToggleBatteryPercentage": {
"Content": "System Tray Battery Percentage",
"Description": "If enabled, Shows numeric battery percentage next to the battery icon in the system tray.",
"category": "Customize Preferences",
"panel": "2",
"Type": "Toggle",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
"Name": "IsBatteryPercentageEnabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>",
"DefaultState": "false"
}
],
```
## 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).
@@ -3,7 +3,7 @@ title: "Start Menu Bing Search"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1545} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1612}
"WPFToggleBingSearch": { "WPFToggleBingSearch": {
"Content": "Start Menu Bing Search", "Content": "Start Menu Bing Search",
"Description": "If enabled, Bing web search results will be included in your Start Menu search.", "Description": "If enabled, Bing web search results will be included in your Start Menu search.",
@@ -3,7 +3,7 @@ title: "Dark Theme for Windows"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1236} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1303}
"WPFToggleDarkMode": { "WPFToggleDarkMode": {
"Content": "Dark Theme for Windows", "Content": "Dark Theme for Windows",
"Description": "Enable/Disable Dark Mode.", "Description": "Enable/Disable Dark Mode.",
@@ -3,7 +3,7 @@ title: "BSoD Verbose Mode"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1210} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1259}
"WPFToggleDetailedBSoD": { "WPFToggleDetailedBSoD": {
"Content": "BSoD Verbose Mode", "Content": "BSoD Verbose Mode",
"Description": "If enabled, you will see a detailed Blue Screen of Death (BSOD) with more information.", "Description": "If enabled, you will see a detailed Blue Screen of Death (BSOD) with more information.",
@@ -3,7 +3,7 @@ title: "Cross-Device Resume"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1192} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1241}
"WPFToggleDisableCrossDeviceResume": { "WPFToggleDisableCrossDeviceResume": {
"Content": "Cross-Device Resume", "Content": "Cross-Device Resume",
"Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.", "Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.",
@@ -3,7 +3,7 @@ title: "File Explorer Hidden Files"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1306} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1373}
"WPFToggleHiddenFiles": { "WPFToggleHiddenFiles": {
"Content": "File Explorer Hidden Files", "Content": "File Explorer Hidden Files",
"Description": "If enabled, Hidden Files will be shown.", "Description": "If enabled, Hidden Files will be shown.",
@@ -3,7 +3,7 @@ title: "Settings Home Page"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1527} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1594}
"WPFToggleHideSettingsHome": { "WPFToggleHideSettingsHome": {
"Content": "Settings Home Page", "Content": "Settings Home Page",
"Description": "Enable or disable the Home Page in the Windows Settings app.", "Description": "Enable or disable the Home Page in the Windows Settings app.",
@@ -1,11 +1,11 @@
--- ---
title: "Acrylic Blur on Login Screen" title: "Logon Screen Acrylic Blur"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1563} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1630}
"WPFToggleLoginBlur": { "WPFToggleLoginBlur": {
"Content": "Acrylic Blur on Login Screen", "Content": "Logon Screen Acrylic Blur",
"Description": "If disabled, the acrylic blur effect will be removed on the Windows 10/11 login screen background.", "Description": "If disabled, the acrylic blur effect will be removed on the Windows 10/11 login screen background.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
@@ -3,7 +3,7 @@ title: "Mouse Acceleration"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1431} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1498}
"WPFToggleMouseAcceleration": { "WPFToggleMouseAcceleration": {
"Content": "Mouse Acceleration", "Content": "Mouse Acceleration",
"Description": "If enabled, the Cursor movement is affected by the speed of your physical mouse movements.", "Description": "If enabled, the Cursor movement is affected by the speed of your physical mouse movements.",
@@ -3,7 +3,7 @@ title: "Multiplane Overlay"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1413} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1480}
"WPFToggleMultiplaneOverlay": { "WPFToggleMultiplaneOverlay": {
"Content": "Multiplane Overlay", "Content": "Multiplane Overlay",
"Description": "Enable or disable the Multiplane Overlay, which can sometimes cause issues with graphics cards.", "Description": "Enable or disable the Multiplane Overlay, which can sometimes cause issues with graphics cards.",
@@ -3,7 +3,7 @@ title: "Microsoft Outlook New Version"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1352} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1419}
"WPFToggleNewOutlook": { "WPFToggleNewOutlook": {
"Content": "Microsoft Outlook New Version", "Content": "Microsoft Outlook New Version",
"Description": "If disabled, it removes the new Outlook toggle, disables the new Outlook migration, and ensures the classic Outlook application is used.", "Description": "If disabled, it removes the new Outlook toggle, disables the new Outlook migration, and ensures the classic Outlook application is used.",
@@ -3,7 +3,7 @@ title: "Num Lock on Startup"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1465} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1532}
"WPFToggleNumLock": { "WPFToggleNumLock": {
"Content": "Num Lock on Startup", "Content": "Num Lock on Startup",
"Description": "Toggle the Num Lock key state when your computer starts.", "Description": "Toggle the Num Lock key state when your computer starts.",
@@ -3,7 +3,7 @@ title: "S3 Sleep"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1509} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1576}
"WPFToggleS3Sleep": { "WPFToggleS3Sleep": {
"Content": "S3 Sleep", "Content": "S3 Sleep",
"Description": "Toggles between Modern Standby and S3 Sleep.", "Description": "Toggles between Modern Standby and S3 Sleep.",
@@ -1,5 +1,5 @@
--- ---
title: "Always Show Scrollbars" title: "Scrollbars Always Visible"
description: "" description: ""
--- ---
@@ -3,7 +3,7 @@ title: "File Explorer File Extensions"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1278} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1345}
"WPFToggleShowExt": { "WPFToggleShowExt": {
"Content": "File Explorer File Extensions", "Content": "File Explorer File Extensions",
"Description": "If enabled, File extensions (e.g., .txt, .jpg) are visible.", "Description": "If enabled, File extensions (e.g., .txt, .jpg) are visible.",
@@ -3,7 +3,7 @@ title: "S0 Sleep Network Connectivity"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1491} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1558}
"WPFToggleStandbyFix": { "WPFToggleStandbyFix": {
"Content": "S0 Sleep Network Connectivity", "Content": "S0 Sleep Network Connectivity",
"Description": "Enable or disable network connectivity during S0 Sleep.", "Description": "Enable or disable network connectivity during S0 Sleep.",
@@ -3,7 +3,7 @@ title: "Start Menu Recommendations"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1581} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1648}
"WPFToggleStartMenuRecommendations": { "WPFToggleStartMenuRecommendations": {
"Content": "Start Menu Recommendations", "Content": "Start Menu Recommendations",
"Description": "If disabled, then you will not see recommendations in the Start Menu. WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.", "Description": "If disabled, then you will not see recommendations in the Start Menu. WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.",
@@ -3,7 +3,7 @@ title: "Sticky Keys"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1625} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1692}
"WPFToggleStickyKeys": { "WPFToggleStickyKeys": {
"Content": "Sticky Keys", "Content": "Sticky Keys",
"Description": "If enabled, 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.", "Description": "If enabled, 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.",
@@ -3,7 +3,7 @@ title: "Taskbar Task View Icon"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1689} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1756}
"WPFToggleTaskView": { "WPFToggleTaskView": {
"Content": "Taskbar Task View Icon", "Content": "Taskbar Task View Icon",
"Description": "If enabled, Task View Button in Taskbar will be shown.", "Description": "If enabled, Task View Button in Taskbar will be shown.",
@@ -3,7 +3,7 @@ title: "Taskbar Centered Icons"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1643} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1710}
"WPFToggleTaskbarAlignment": { "WPFToggleTaskbarAlignment": {
"Content": "Taskbar Centered Icons", "Content": "Taskbar Centered Icons",
"Description": "[Windows 11] If enabled, the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.", "Description": "[Windows 11] If enabled, the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.",
@@ -3,7 +3,7 @@ title: "Taskbar Search Icon"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1671} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1738}
"WPFToggleTaskbarSearch": { "WPFToggleTaskbarSearch": {
"Content": "Taskbar Search Icon", "Content": "Taskbar Search Icon",
"Description": "If enabled, Search Button will be on the Taskbar.", "Description": "If enabled, Search Button will be on the Taskbar.",
@@ -3,7 +3,7 @@ title: "Logon Verbose Mode"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1334} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1401}
"WPFToggleVerboseLogon": { "WPFToggleVerboseLogon": {
"Content": "Logon Verbose Mode", "Content": "Logon Verbose Mode",
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.", "Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
@@ -3,7 +3,7 @@ title: "ConsumerFeatures - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=440} ```json {filename="config/tweaks.json",linenos=inline,linenostart=489}
"WPFTweaksConsumerFeatures": { "WPFTweaksConsumerFeatures": {
"Content": "ConsumerFeatures - Disable", "Content": "ConsumerFeatures - Disable",
"Description": "Windows 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).", "Description": "Windows 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).",
@@ -3,7 +3,7 @@ title: "Temporary Files - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1087} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1136}
"WPFTweaksDeleteTempFiles": { "WPFTweaksDeleteTempFiles": {
"Content": "Temporary Files - Remove", "Content": "Temporary Files - Remove",
"Description": "Erases TEMP Folders.", "Description": "Erases TEMP Folders.",
@@ -3,7 +3,7 @@ title: "File Explorer Automatic Folder Discovery - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1738} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1805}
"WPFTweaksDisableExplorerAutoDiscovery": { "WPFTweaksDisableExplorerAutoDiscovery": {
"Content": "File Explorer Automatic Folder Discovery - Disable", "Content": "File Explorer Automatic Folder Discovery - Disable",
"Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience. WARNING! Will disable File Explorer grouping.", "Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience. WARNING! Will disable File Explorer grouping.",
@@ -3,7 +3,7 @@ title: "Disk Cleanup - Run"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1074} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1123}
"WPFTweaksDiskCleanup": { "WPFTweaksDiskCleanup": {
"Content": "Disk Cleanup - Run", "Content": "Disk Cleanup - Run",
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
@@ -3,7 +3,7 @@ title: "End Task With Right Click - Enable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=870} ```json {filename="config/tweaks.json",linenos=inline,linenostart=919}
"WPFTweaksEndTaskOnTaskbar": { "WPFTweaksEndTaskOnTaskbar": {
"Content": "End Task With Right Click - Enable", "Content": "End Task With Right Click - Enable",
"Description": "Enables option to end task when right clicking a program in the taskbar.", "Description": "Enables option to end task when right clicking a program in the taskbar.",
@@ -3,7 +3,7 @@ title: "PowerShell 7 Telemetry - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=886} ```json {filename="config/tweaks.json",linenos=inline,linenostart=935}
"WPFTweaksPowershell7Tele": { "WPFTweaksPowershell7Tele": {
"Content": "PowerShell 7 Telemetry - Disable", "Content": "PowerShell 7 Telemetry - Disable",
"Description": "Creates an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell PowerShell 7 to not send Telemetry Data.", "Description": "Creates an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell PowerShell 7 to not send Telemetry Data.",
@@ -3,7 +3,7 @@ title: "Restore Point - Create"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=843} ```json {filename="config/tweaks.json",linenos=inline,linenostart=892}
"WPFTweaksRestorePoint": { "WPFTweaksRestorePoint": {
"Content": "Restore Point - Create", "Content": "Restore Point - Create",
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.", "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.",
@@ -3,7 +3,7 @@ title: "Telemetry - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=456} ```json {filename="config/tweaks.json",linenos=inline,linenostart=505}
"WPFTweaksTelemetry": { "WPFTweaksTelemetry": {
"Content": "Telemetry - Disable", "Content": "Telemetry - Disable",
"Description": "Disables Microsoft Telemetry.", "Description": "Disables Microsoft Telemetry.",
@@ -3,7 +3,7 @@ title: "Windows Platform Binary Table (WPBT) - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=942} ```json {filename="config/tweaks.json",linenos=inline,linenostart=991}
"WPFTweaksWPBT": { "WPFTweaksWPBT": {
"Content": "Windows Platform Binary Table (WPBT) - Disable", "Content": "Windows Platform Binary Table (WPBT) - Disable",
"Description": "If enabled, WPBT allows your computer vendor to execute programs at boot time, such as anti-theft software, software drivers, as well as force install software without user consent. Poses potential security risk.", "Description": "If enabled, WPBT allows your computer vendor to execute programs at boot time, such as anti-theft software, software drivers, as well as force install software without user consent. Poses potential security risk.",
@@ -3,7 +3,7 @@ title: "Adobe URL Block List - Enable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1022} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1071}
"WPFTweaksBlockAdobeNet": { "WPFTweaksBlockAdobeNet": {
"Content": "Adobe URL Block List - Enable", "Content": "Adobe URL Block List - Enable",
"Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", "Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
@@ -44,6 +44,55 @@ description: ""
"Value": "0", "Value": "0",
"Type": "DWord", "Type": "DWord",
"OriginalValue": "<RemoveEntry>" "OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveNewsDisabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveTalkDisabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "TorDisabled",
"Value": "1",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "BraveP3AEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "UrlKeyedAnonymizedDataCollectionEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "SafeBrowsingExtendedReportingEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
"Name": "MetricsReportingEnabled",
"Value": "0",
"Type": "DWord",
"OriginalValue": "<RemoveEntry>"
} }
], ],
``` ```
@@ -3,7 +3,7 @@ title: "Unwanted Pre-Installed Apps - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=802} ```json {filename="config/tweaks.json",linenos=inline,linenostart=851}
"WPFTweaksDeBloat": { "WPFTweaksDeBloat": {
"Content": "Unwanted Pre-Installed Apps - Remove", "Content": "Unwanted Pre-Installed Apps - Remove",
"Description": "This will remove a bunch of Windows pre-installed applications which most people dont want on there system.", "Description": "This will remove a bunch of Windows pre-installed applications which most people dont want on there system.",
@@ -3,7 +3,7 @@ title: "Background Apps - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1160} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1209}
"WPFTweaksDisableBGapps": { "WPFTweaksDisableBGapps": {
"Content": "Background Apps - Disable", "Content": "Background Apps - Disable",
"Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Windows 11.", "Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Windows 11.",
@@ -3,7 +3,7 @@ title: "Fullscreen Optimizations - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1176} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1225}
"WPFTweaksDisableFSO": { "WPFTweaksDisableFSO": {
"Content": "Fullscreen Optimizations - Disable", "Content": "Fullscreen Optimizations - Disable",
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.", "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.",
@@ -3,7 +3,7 @@ title: "IPv6 - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1138} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1187}
"WPFTweaksDisableIPv6": { "WPFTweaksDisableIPv6": {
"Content": "IPv6 - Disable", "Content": "IPv6 - Disable",
"Description": "Disables IPv6.", "Description": "Disables IPv6.",
@@ -1,11 +1,11 @@
--- ---
title: "Notification Tray & Calendar - Disable" title: "System Tray Notifications & Calendar - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=999} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1048}
"WPFTweaksDisableNotifications": { "WPFTweaksDisableNotifications": {
"Content": "Notification Tray & Calendar - Disable", "Content": "System Tray Notifications & Calendar - Disable",
"Description": "Disables all Notifications INCLUDING Calendar.", "Description": "Disables all Notifications INCLUDING Calendar.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
@@ -1,11 +1,11 @@
--- ---
title: "Disable warnings for unsigned RDP files" title: "RDP Unsigned File Warnings - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=289} ```json {filename="config/tweaks.json",linenos=inline,linenostart=338}
"WPFTweaksDisableWarningForUnsignedRdp": { "WPFTweaksDisableWarningForUnsignedRdp": {
"Content": "Disable warnings for unsigned RDP files", "Content": "RDP Unsigned File Warnings - Disable",
"Description": "Disables warnings shown when launching unsigned RDP files introduced with the latest Windows 10 and 11 updates.", "Description": "Disables warnings shown when launching unsigned RDP files introduced with the latest Windows 10 and 11 updates.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
@@ -3,7 +3,7 @@ title: "Visual Effects - Set to Best Performance"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=680} ```json {filename="config/tweaks.json",linenos=inline,linenostart=729}
"WPFTweaksDisplay": { "WPFTweaksDisplay": {
"Content": "Visual Effects - Set to Best Performance", "Content": "Visual Effects - Set to Best Performance",
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", "Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
@@ -3,7 +3,7 @@ title: "Microsoft Edge - Debloat"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=312} ```json {filename="config/tweaks.json",linenos=inline,linenostart=361}
"WPFTweaksEdgeDebloat": { "WPFTweaksEdgeDebloat": {
"Content": "Microsoft Edge - Debloat", "Content": "Microsoft Edge - Debloat",
"Description": "Disables various telemetry options, popups, and other annoyances in Edge.", "Description": "Disables various telemetry options, popups, and other annoyances in Edge.",
@@ -3,7 +3,7 @@ title: "IPv6 - Set IPv4 as Preferred"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1100} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1149}
"WPFTweaksIPv46": { "WPFTweaksIPv46": {
"Content": "IPv6 - Set IPv4 as Preferred", "Content": "IPv6 - Set IPv4 as Preferred",
"Description": "Setting the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.", "Description": "Setting the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.",
@@ -1,5 +1,5 @@
--- ---
title: "OO Shutup 10 - Run" title: "O&O ShutUp10++ - Run"
description: "" description: ""
--- ---
@@ -3,7 +3,7 @@ title: "Razer Software Auto-Install - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=958} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1007}
"WPFTweaksRazerBlock": { "WPFTweaksRazerBlock": {
"Content": "Razer Software Auto-Install - Disable", "Content": "Razer Software Auto-Install - Disable",
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.", "Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.",
@@ -3,7 +3,7 @@ title: "Microsoft Copilot - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=915} ```json {filename="config/tweaks.json",linenos=inline,linenostart=964}
"WPFTweaksRemoveCopilot": { "WPFTweaksRemoveCopilot": {
"Content": "Microsoft Copilot - Disable", "Content": "Microsoft Copilot - Disable",
"Description": "Removes Copilot AppXPackages and related ai packages", "Description": "Removes Copilot AppXPackages and related ai packages",
@@ -3,7 +3,7 @@ title: "Microsoft Edge - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=575} ```json {filename="config/tweaks.json",linenos=inline,linenostart=624}
"WPFTweaksRemoveEdge": { "WPFTweaksRemoveEdge": {
"Content": "Microsoft Edge - Remove", "Content": "Microsoft Edge - Remove",
"Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.", "Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.",
@@ -3,7 +3,7 @@ title: "File Explorer Gallery - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=663} ```json {filename="config/tweaks.json",linenos=inline,linenostart=712}
"WPFTweaksRemoveGallery": { "WPFTweaksRemoveGallery": {
"Content": "File Explorer Gallery - Disable", "Content": "File Explorer Gallery - Disable",
"Description": "Removes the Gallery from Explorer and sets This PC as default.", "Description": "Removes the Gallery from Explorer and sets This PC as default.",
@@ -3,7 +3,7 @@ title: "File Explorer Home - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=644} ```json {filename="config/tweaks.json",linenos=inline,linenostart=693}
"WPFTweaksRemoveHome": { "WPFTweaksRemoveHome": {
"Content": "File Explorer Home - Disable", "Content": "File Explorer Home - Disable",
"Description": "Removes the Home from Explorer and sets This PC as default.", "Description": "Removes the Home from Explorer and sets This PC as default.",
@@ -3,7 +3,7 @@ title: "Microsoft OneDrive - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=607} ```json {filename="config/tweaks.json",linenos=inline,linenostart=656}
"WPFTweaksRemoveOneDrive": { "WPFTweaksRemoveOneDrive": {
"Content": "Microsoft OneDrive - Remove", "Content": "Microsoft OneDrive - Remove",
"Description": "Denies permission to remove OneDrive user files, then uses its own uninstaller to remove it and restores the original permission afterward.", "Description": "Denies permission to remove OneDrive user files, then uses its own uninstaller to remove it and restores the original permission afterward.",
@@ -3,7 +3,7 @@ title: "Right-Click Menu Previous Layout - Enable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1052} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1101}
"WPFTweaksRightClickMenu": { "WPFTweaksRightClickMenu": {
"Content": "Right-Click Menu Previous Layout - Enable", "Content": "Right-Click Menu Previous Layout - Enable",
"Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.", "Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.",
@@ -3,7 +3,7 @@ title: "Storage Sense - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=899} ```json {filename="config/tweaks.json",linenos=inline,linenostart=948}
"WPFTweaksStorage": { "WPFTweaksStorage": {
"Content": "Storage Sense - Disable", "Content": "Storage Sense - Disable",
"Description": "Storage Sense deletes temp files automatically.", "Description": "Storage Sense deletes temp files automatically.",
@@ -3,7 +3,7 @@ title: "Teredo - Disable"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1116} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1165}
"WPFTweaksTeredo": { "WPFTweaksTeredo": {
"Content": "Teredo - Disable", "Content": "Teredo - Disable",
"Description": "Teredo network tunneling is an IPv6 feature that can cause additional latency, but may cause problems with some games.", "Description": "Teredo network tunneling is an IPv6 feature that can cause additional latency, but may cause problems with some games.",
@@ -3,7 +3,7 @@ title: "Date & Time - Set Time to UTC"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=591} ```json {filename="config/tweaks.json",linenos=inline,linenostart=640}
"WPFTweaksUTC": { "WPFTweaksUTC": {
"Content": "Date & Time - Set Time to UTC", "Content": "Date & Time - Set Time to UTC",
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.", "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.",
@@ -3,7 +3,7 @@ title: "Xbox & Gaming Components - Remove"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=779} ```json {filename="config/tweaks.json",linenos=inline,linenostart=828}
"WPFTweaksXboxRemoval": { "WPFTweaksXboxRemoval": {
"Content": "Xbox & Gaming Components - Remove", "Content": "Xbox & Gaming Components - Remove",
"Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.", "Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.",
@@ -3,7 +3,7 @@ title: "DNS - Set to:"
description: "" description: ""
--- ---
```json {filename="config/tweaks.json",linenos=inline,linenostart=1714} ```json {filename="config/tweaks.json",linenos=inline,linenostart=1781}
"WPFchangedns": { "WPFchangedns": {
"Content": "DNS - Set to:", "Content": "DNS - Set to:",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
@@ -80,7 +80,7 @@ Once the modification is complete, choose how to save your image:
> [!NOTE] > [!NOTE]
> `oscdimg.exe` (part of the Windows ADK) is required. If it's not found, Winutil will attempt to install it automatically via winget. If that fails, install it manually: `winget install -e --id Microsoft.OSCDIMG` > `oscdimg.exe` (part of the Windows ADK) is required. If it's not found, Winutil will attempt to install it automatically via winget. If that fails, install it manually: `winget install -e --id Microsoft.OSCDIMG`
{{< /tab >}} {{< /tab >}}
{{< tab name="Write to USB" >}} {{< tab name="Write to USB" >}}
@@ -1,24 +0,0 @@
function Get-WinUtilInstallerProcess {
<#
.SYNOPSIS
Checks if the given process is running
.PARAMETER Process
The process to check
.OUTPUTS
Boolean - True if the process is running
#>
param($Process)
if ($Null -eq $Process) {
return $false
}
if (Get-Process -Id $Process.Id -ErrorAction SilentlyContinue) {
return $true
}
return $false
}
@@ -44,21 +44,18 @@ Function Invoke-WinUtilCurrentSystem {
if ($CheckBox -eq "tweaks") { if ($CheckBox -eq "tweaks") {
if (!(Test-Path 'HKU:\')) {$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)} if (!(Test-Path 'HKU:\')) {$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)}
$ScheduledTasks = Get-ScheduledTask
$sync.configs.tweaks | Get-Member -MemberType NoteProperty | ForEach-Object { $sync.configs.tweaks | Get-Member -MemberType NoteProperty | ForEach-Object {
$Config = $psitem.Name $Config = $psitem.Name
#WPFEssTweaksTele
$entry = $sync.configs.tweaks.$Config $entry = $sync.configs.tweaks.$Config
$registryKeys = $entry.registry $registryKeys = $entry.registry
$scheduledtaskKeys = $entry.scheduledtask
$serviceKeys = $entry.service $serviceKeys = $entry.service
$appxKeys = $entry.appx $appxKeys = $entry.appx
$invokeScript = $entry.InvokeScript $invokeScript = $entry.InvokeScript
$entryType = $entry.Type $entryType = $entry.Type
if ($registryKeys -or $scheduledtaskKeys -or $serviceKeys) { if ($registryKeys -or $serviceKeys) {
$Values = @() $Values = @()
if ($entryType -eq "Toggle") { if ($entryType -eq "Toggle") {
@@ -103,20 +100,6 @@ Function Invoke-WinUtilCurrentSystem {
} }
} }
Foreach ($tweaks in $scheduledtaskKeys) {
Foreach ($tweak in $tweaks) {
$task = $ScheduledTasks | Where-Object {$($psitem.TaskPath + $psitem.TaskName) -like "\$($tweak.name)"}
if ($task) {
$actualValue = $task.State
$expectedValue = $tweak.State
if ($expectedValue -ne $actualValue) {
$values += $False
}
}
}
}
Foreach ($tweaks in $serviceKeys) { Foreach ($tweaks in $serviceKeys) {
Foreach ($tweak in $tweaks) { Foreach ($tweak in $tweaks) {
$Service = Get-Service -Name $tweak.Name $Service = Get-Service -Name $tweak.Name
+39 -39
View File
@@ -49,7 +49,7 @@ function Invoke-WinUtilISOMountAndVerify {
Set-WinUtilProgressBar -Label "Mounting ISO..." -Percent 10 Set-WinUtilProgressBar -Label "Mounting ISO..." -Percent 10
try { try {
Mount-DiskImage -ImagePath $isoPath -ErrorAction Stop | Out-Null Mount-DiskImage -ImagePath $isoPath
do { do {
Start-Sleep -Milliseconds 500 Start-Sleep -Milliseconds 500
@@ -64,7 +64,7 @@ function Invoke-WinUtilISOMountAndVerify {
$esdPath = Join-Path $driveLetter "sources\install.esd" $esdPath = Join-Path $driveLetter "sources\install.esd"
if (-not (Test-Path $wimPath) -and -not (Test-Path $esdPath)) { if (-not (Test-Path $wimPath) -and -not (Test-Path $esdPath)) {
Dismount-DiskImage -ImagePath $isoPath | Out-Null Dismount-DiskImage -ImagePath $isoPath
Write-Win11ISOLog "ERROR: install.wim/install.esd not found — not a valid Windows ISO." Write-Win11ISOLog "ERROR: install.wim/install.esd not found — not a valid Windows ISO."
[System.Windows.MessageBox]::Show( [System.Windows.MessageBox]::Show(
"This does not appear to be a valid Windows ISO.`n`ninstall.wim / install.esd was not found.", "This does not appear to be a valid Windows ISO.`n`ninstall.wim / install.esd was not found.",
@@ -79,7 +79,7 @@ function Invoke-WinUtilISOMountAndVerify {
$imageInfo = Get-WindowsImage -ImagePath $activeWim | Select-Object ImageIndex, ImageName $imageInfo = Get-WindowsImage -ImagePath $activeWim | Select-Object ImageIndex, ImageName
if (-not ($imageInfo | Where-Object { $_.ImageName -match "Windows 11" })) { if (-not ($imageInfo | Where-Object { $_.ImageName -match "Windows 11" })) {
Dismount-DiskImage -ImagePath $isoPath | Out-Null Dismount-DiskImage -ImagePath $isoPath
Write-Win11ISOLog "ERROR: No 'Windows 11' edition found in the image." Write-Win11ISOLog "ERROR: No 'Windows 11' edition found in the image."
[System.Windows.MessageBox]::Show( [System.Windows.MessageBox]::Show(
"No Windows 11 edition was found in this ISO.`n`nOnly official Windows 11 ISOs are supported.", "No Windows 11 edition was found in this ISO.`n`nOnly official Windows 11 ISOs are supported.",
@@ -151,7 +151,7 @@ function Invoke-WinUtilISOModify {
$sync["WPFWin11ISOModifyButton"].IsEnabled = $false $sync["WPFWin11ISOModifyButton"].IsEnabled = $false
$sync["Win11ISOModifying"] = $true $sync["Win11ISOModifying"] = $true
$existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue | $existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") |
Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1 Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1
$workDir = if ($existingWorkDir) { $workDir = if ($existingWorkDir) {
@@ -202,7 +202,7 @@ function Invoke-WinUtilISOModify {
$sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length $sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length
$sync["WPFWin11ISOStatusLog"].ScrollToEnd() $sync["WPFWin11ISOStatusLog"].ScrollToEnd()
}) })
Add-Content -Path (Join-Path $workDir "WinUtil_Win11ISO.log") -Value "[$ts] $msg" -ErrorAction SilentlyContinue Add-Content -Path (Join-Path $workDir "WinUtil_Win11ISO.log") -Value "[$ts] $msg"
} }
function SetProgress($label, $pct) { function SetProgress($label, $pct) {
@@ -223,11 +223,11 @@ function Invoke-WinUtilISOModify {
Log "Creating working directory: $workDir" Log "Creating working directory: $workDir"
$isoContents = Join-Path $workDir "iso_contents" $isoContents = Join-Path $workDir "iso_contents"
$mountDir = Join-Path $workDir "wim_mount" $mountDir = Join-Path $workDir "wim_mount"
New-Item -ItemType Directory -Path $isoContents, $mountDir -Force | Out-Null New-Item -ItemType Directory -Path $isoContents, $mountDir -Force
SetProgress "Copying ISO contents..." 10 SetProgress "Copying ISO contents..." 10
Log "Copying ISO contents from $driveLetter to $isoContents..." Log "Copying ISO contents from $driveLetter to $isoContents..."
& robocopy $driveLetter $isoContents /E /NFL /NDL /NJH /NJS | Out-Null & robocopy $driveLetter $isoContents /E /NFL /NDL /NJH /NJS
Log "ISO contents copied." Log "ISO contents copied."
SetProgress "Mounting install.wim..." 25 SetProgress "Mounting install.wim..." 25
@@ -236,7 +236,7 @@ function Invoke-WinUtilISOModify {
Set-ItemProperty -Path $localWim -Name IsReadOnly -Value $false Set-ItemProperty -Path $localWim -Name IsReadOnly -Value $false
Log "Mounting install.wim (Index ${selectedWimIndex}: $selectedEditionName) at $mountDir..." Log "Mounting install.wim (Index ${selectedWimIndex}: $selectedEditionName) at $mountDir..."
Mount-WindowsImage -ImagePath $localWim -Index $selectedWimIndex -Path $mountDir -ErrorAction Stop | Out-Null Mount-WindowsImage -ImagePath $localWim -Index $selectedWimIndex -Path $mountDir
SetProgress "Modifying install.wim..." 45 SetProgress "Modifying install.wim..." 45
Log "Applying WinUtil modifications to install.wim..." Log "Applying WinUtil modifications to install.wim..."
@@ -249,13 +249,13 @@ function Invoke-WinUtilISOModify {
SetProgress "Saving modified install.wim..." 65 SetProgress "Saving modified install.wim..." 65
Log "Dismounting and saving install.wim. This will take several minutes..." Log "Dismounting and saving install.wim. This will take several minutes..."
Dismount-WindowsImage -Path $mountDir -Save -ErrorAction Stop | Out-Null Dismount-WindowsImage -Path $mountDir -Save
Log "install.wim saved." Log "install.wim saved."
SetProgress "Removing unused editions from install.wim..." 70 SetProgress "Removing unused editions from install.wim..." 70
Log "Exporting edition '$selectedEditionName' (Index $selectedWimIndex) to a single-edition install.wim..." Log "Exporting edition '$selectedEditionName' (Index $selectedWimIndex) to a single-edition install.wim..."
$exportWim = Join-Path $isoContents "sources\install_export.wim" $exportWim = Join-Path $isoContents "sources\install_export.wim"
Export-WindowsImage -SourceImagePath $localWim -SourceIndex $selectedWimIndex -DestinationImagePath $exportWim -ErrorAction Stop | Out-Null Export-WindowsImage -SourceImagePath $localWim -SourceIndex $selectedWimIndex -DestinationImagePath $exportWim
Remove-Item -Path $localWim -Force Remove-Item -Path $localWim -Force
Rename-Item -Path $exportWim -NewName "install.wim" -Force Rename-Item -Path $exportWim -NewName "install.wim" -Force
$localWim = Join-Path $isoContents "sources\install.wim" $localWim = Join-Path $isoContents "sources\install.wim"
@@ -263,7 +263,7 @@ function Invoke-WinUtilISOModify {
SetProgress "Dismounting source ISO..." 80 SetProgress "Dismounting source ISO..." 80
Log "Dismounting original ISO..." Log "Dismounting original ISO..."
Dismount-DiskImage -ImagePath $isoPath | Out-Null Dismount-DiskImage -ImagePath $isoPath
$sync["Win11ISOWorkDir"] = $workDir $sync["Win11ISOWorkDir"] = $workDir
$sync["Win11ISOContentsDir"] = $isoContents $sync["Win11ISOContentsDir"] = $isoContents
@@ -279,26 +279,26 @@ function Invoke-WinUtilISOModify {
try { try {
if (Test-Path $mountDir) { if (Test-Path $mountDir) {
$mountedImages = Get-WindowsImage -Mounted -ErrorAction SilentlyContinue | Where-Object { $_.Path -eq $mountDir } $mountedImages = Get-WindowsImage -Mounted | Where-Object { $_.Path -eq $mountDir }
if ($mountedImages) { if ($mountedImages) {
Log "Cleaning up: dismounting install.wim (discarding changes)..." Log "Cleaning up: dismounting install.wim (discarding changes)..."
Dismount-WindowsImage -Path $mountDir -Discard -ErrorAction SilentlyContinue | Out-Null Dismount-WindowsImage -Path $mountDir -Discard
} }
} }
} catch { Log "Warning: could not dismount install.wim during cleanup: $_" } } catch { Log "Warning: could not dismount install.wim during cleanup: $_" }
try { try {
$mountedISO = Get-DiskImage -ImagePath $isoPath -ErrorAction SilentlyContinue $mountedISO = Get-DiskImage -ImagePath $isoPath
if ($mountedISO -and $mountedISO.Attached) { if ($mountedISO -and $mountedISO.Attached) {
Log "Cleaning up: dismounting source ISO..." Log "Cleaning up: dismounting source ISO..."
Dismount-DiskImage -ImagePath $isoPath -ErrorAction SilentlyContinue | Out-Null Dismount-DiskImage -ImagePath $isoPath
} }
} catch { Log "Warning: could not dismount ISO during cleanup: $_" } } catch { Log "Warning: could not dismount ISO during cleanup: $_" }
try { try {
if (Test-Path $workDir) { if (Test-Path $workDir) {
Log "Cleaning up: removing temp directory $workDir..." Log "Cleaning up: removing temp directory $workDir..."
Remove-Item -Path $workDir -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $workDir -Recurse -Force
} }
} catch { Log "Warning: could not remove temp directory during cleanup: $_" } } catch { Log "Warning: could not remove temp directory during cleanup: $_" }
@@ -322,9 +322,9 @@ function Invoke-WinUtilISOModify {
} }
}) })
} }
}) | Out-Null })
$script.BeginInvoke() | Out-Null $script.BeginInvoke()
} }
function Invoke-WinUtilISOCheckExistingWork { function Invoke-WinUtilISOCheckExistingWork {
@@ -335,7 +335,7 @@ function Invoke-WinUtilISOCheckExistingWork {
return return
} }
$existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue | $existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") |
Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1 Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1
if (-not $existingWorkDir) { return } if (-not $existingWorkDir) { return }
@@ -391,7 +391,7 @@ function Invoke-WinUtilISOCleanAndReset {
$sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length $sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length
$sync["WPFWin11ISOStatusLog"].ScrollToEnd() $sync["WPFWin11ISOStatusLog"].ScrollToEnd()
}) })
Add-Content -Path (Join-Path $workDir "WinUtil_Win11ISO.log") -Value "[$ts] $msg" -ErrorAction SilentlyContinue Add-Content -Path (Join-Path $workDir "WinUtil_Win11ISO.log") -Value "[$ts] $msg"
} }
function SetProgress($label, $pct) { function SetProgress($label, $pct) {
@@ -406,23 +406,23 @@ function Invoke-WinUtilISOCleanAndReset {
if ($workDir) { if ($workDir) {
$mountDir = Join-Path $workDir "wim_mount" $mountDir = Join-Path $workDir "wim_mount"
try { try {
$mountedImages = Get-WindowsImage -Mounted -ErrorAction SilentlyContinue | $mountedImages = Get-WindowsImage -Mounted |
Where-Object { $_.Path -like "$workDir*" } Where-Object { $_.Path -like "$workDir*" }
if ($mountedImages) { if ($mountedImages) {
foreach ($img in $mountedImages) { foreach ($img in $mountedImages) {
Log "Dismounting WIM at: $($img.Path) (discarding changes)..." Log "Dismounting WIM at: $($img.Path) (discarding changes)..."
SetProgress "Dismounting WIM image..." 3 SetProgress "Dismounting WIM image..." 3
Dismount-WindowsImage -Path $img.Path -Discard -ErrorAction Stop | Out-Null Dismount-WindowsImage -Path $img.Path -Discard
Log "WIM dismounted successfully." Log "WIM dismounted successfully."
} }
} elseif (Test-Path $mountDir) { } elseif (Test-Path $mountDir) {
Log "No mounted WIM reported by Get-WindowsImage. Running DISM /Cleanup-Wim as a precaution..." Log "No mounted WIM reported by Get-WindowsImage. Running DISM /Cleanup-Wim as a precaution..."
SetProgress "Running DISM cleanup..." 3 SetProgress "Running DISM cleanup..." 3
& dism /English /Cleanup-Wim 2>&1 | ForEach-Object { Log $_ } & dism /English /Cleanup-Wim | ForEach-Object { Log $_ }
} }
} catch { } catch {
Log "Warning: could not dismount WIM cleanly. Attempting DISM /Cleanup-Wim fallback: $_" Log "Warning: could not dismount WIM cleanly. Attempting DISM /Cleanup-Wim fallback: $_"
try { & dism /English /Cleanup-Wim 2>&1 | ForEach-Object { Log $_ } } try { & dism /English /Cleanup-Wim | ForEach-Object { Log $_ } }
catch { Log "Warning: DISM /Cleanup-Wim also failed: $_" } catch { Log "Warning: DISM /Cleanup-Wim also failed: $_" }
} }
} }
@@ -431,8 +431,8 @@ function Invoke-WinUtilISOCleanAndReset {
Log "Scanning files to delete in: $workDir" Log "Scanning files to delete in: $workDir"
SetProgress "Scanning files..." 5 SetProgress "Scanning files..." 5
$allFiles = @(Get-ChildItem -Path $workDir -File -Recurse -Force -ErrorAction SilentlyContinue) $allFiles = @(Get-ChildItem -Path $workDir -File -Recurse -Force)
$allDirs = @(Get-ChildItem -Path $workDir -Directory -Recurse -Force -ErrorAction SilentlyContinue | $allDirs = @(Get-ChildItem -Path $workDir -Directory -Recurse -Force |
Sort-Object { $_.FullName.Length } -Descending) Sort-Object { $_.FullName.Length } -Descending)
$total = $allFiles.Count $total = $allFiles.Count
$deleted = 0 $deleted = 0
@@ -440,7 +440,7 @@ function Invoke-WinUtilISOCleanAndReset {
Log "Found $total files to delete." Log "Found $total files to delete."
foreach ($f in $allFiles) { foreach ($f in $allFiles) {
try { Remove-Item -Path $f.FullName -Force -ErrorAction Stop } catch { Log "WARNING: could not delete $($f.FullName): $_" } try { Remove-Item -Path $f.FullName -Force } catch { Log "WARNING: could not delete $($f.FullName): $_" }
$deleted++ $deleted++
if ($deleted % 100 -eq 0 -or $deleted -eq $total) { if ($deleted % 100 -eq 0 -or $deleted -eq $total) {
$pct = [math]::Round(($deleted / [Math]::Max($total, 1)) * 85) + 5 $pct = [math]::Round(($deleted / [Math]::Max($total, 1)) * 85) + 5
@@ -449,10 +449,10 @@ function Invoke-WinUtilISOCleanAndReset {
} }
foreach ($d in $allDirs) { foreach ($d in $allDirs) {
try { Remove-Item -Path $d.FullName -Force -ErrorAction SilentlyContinue } catch {} try { Remove-Item -Path $d.FullName -Force } catch {}
} }
try { Remove-Item -Path $workDir -Recurse -Force -ErrorAction Stop } catch {} try { Remove-Item -Path $workDir -Recurse -Force } catch {}
if (Test-Path $workDir) { if (Test-Path $workDir) {
Log "WARNING: some items could not be deleted in $workDir" Log "WARNING: some items could not be deleted in $workDir"
@@ -501,9 +501,9 @@ function Invoke-WinUtilISOCleanAndReset {
$sync["WPFWin11ISOCleanResetButton"].IsEnabled = $true $sync["WPFWin11ISOCleanResetButton"].IsEnabled = $true
}) })
} }
}) | Out-Null })
$script.BeginInvoke() | Out-Null $script.BeginInvoke()
} }
function Invoke-WinUtilISOExport { function Invoke-WinUtilISOExport {
@@ -529,10 +529,10 @@ function Invoke-WinUtilISOExport {
$outputISO = $dlg.FileName $outputISO = $dlg.FileName
# Locate oscdimg.exe (Windows ADK or winget per-user install) # Locate oscdimg.exe (Windows ADK or winget per-user install)
$oscdimg = Get-ChildItem "C:\Program Files (x86)\Windows Kits" -Recurse -Filter "oscdimg.exe" -ErrorAction SilentlyContinue | $oscdimg = Get-ChildItem "C:\Program Files (x86)\Windows Kits" -Recurse -Filter "oscdimg.exe" |
Select-Object -First 1 -ExpandProperty FullName Select-Object -First 1 -ExpandProperty FullName
if (-not $oscdimg) { if (-not $oscdimg) {
$oscdimg = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter "oscdimg.exe" -ErrorAction SilentlyContinue | $oscdimg = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter "oscdimg.exe" |
Where-Object { $_.FullName -match 'Microsoft\.OSCDIMG' } | Where-Object { $_.FullName -match 'Microsoft\.OSCDIMG' } |
Select-Object -First 1 -ExpandProperty FullName Select-Object -First 1 -ExpandProperty FullName
} }
@@ -543,10 +543,10 @@ function Invoke-WinUtilISOExport {
# First ensure winget is installed and operational # First ensure winget is installed and operational
Install-WinUtilWinget Install-WinUtilWinget
$winget = Get-Command winget -ErrorAction Stop $winget = Get-Command winget
$result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1 $result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements
Write-Win11ISOLog "winget output: $result" Write-Win11ISOLog "winget output: $result"
$oscdimg = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter "oscdimg.exe" -ErrorAction SilentlyContinue | $oscdimg = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter "oscdimg.exe" |
Where-Object { $_.FullName -match 'Microsoft\.OSCDIMG' } | Where-Object { $_.FullName -match 'Microsoft\.OSCDIMG' } |
Select-Object -First 1 -ExpandProperty FullName Select-Object -First 1 -ExpandProperty FullName
} catch { } catch {
@@ -609,7 +609,7 @@ function Invoke-WinUtilISOExport {
$proc = [System.Diagnostics.Process]::new() $proc = [System.Diagnostics.Process]::new()
$proc.StartInfo = $psi $proc.StartInfo = $psi
$proc.Start() | Out-Null $proc.Start()
# Stream stdout line-by-line as oscdimg runs # Stream stdout line-by-line as oscdimg runs
while (-not $proc.StandardOutput.EndOfStream) { while (-not $proc.StandardOutput.EndOfStream) {
@@ -653,7 +653,7 @@ function Invoke-WinUtilISOExport {
$sync["WPFWin11ISOChooseISOButton"].IsEnabled = $true $sync["WPFWin11ISOChooseISOButton"].IsEnabled = $true
}) })
} }
}) | Out-Null })
$script.BeginInvoke() | Out-Null $script.BeginInvoke()
} }
+23 -23
View File
@@ -84,27 +84,27 @@ function Invoke-WinUtilISOScript {
function Add-DriversToImage { function Add-DriversToImage {
param ([string]$MountPath, [string]$DriverDir, [string]$Label = "image", [scriptblock]$Logger) param ([string]$MountPath, [string]$DriverDir, [string]$Label = "image", [scriptblock]$Logger)
& dism /English "/image:$MountPath" /Add-Driver "/Driver:$DriverDir" /Recurse 2>&1 | & dism /English "/image:$MountPath" /Add-Driver "/Driver:$DriverDir" /Recurse |
ForEach-Object { & $Logger " dism[$Label]: $_" } ForEach-Object { & $Logger " dism[$Label]: $_" }
} }
function Invoke-BootWimInject { function Invoke-BootWimInject {
param ([string]$BootWimPath, [string]$DriverDir, [scriptblock]$Logger) param ([string]$BootWimPath, [string]$DriverDir, [scriptblock]$Logger)
Set-ItemProperty -Path $BootWimPath -Name IsReadOnly -Value $false -ErrorAction SilentlyContinue Set-ItemProperty -Path $BootWimPath -Name IsReadOnly -Value $false
$mountDir = Join-Path $env:TEMP "WinUtil_BootMount_$(Get-Random)" $mountDir = Join-Path $env:TEMP "WinUtil_BootMount_$(Get-Random)"
New-Item -Path $mountDir -ItemType Directory -Force | Out-Null New-Item -Path $mountDir -ItemType Directory -Force
try { try {
& $Logger "Mounting boot.wim (index 2) for driver injection..." & $Logger "Mounting boot.wim (index 2) for driver injection..."
Mount-WindowsImage -ImagePath $BootWimPath -Index 2 -Path $mountDir -ErrorAction Stop | Out-Null Mount-WindowsImage -ImagePath $BootWimPath -Index 2 -Path $mountDir
Add-DriversToImage -MountPath $mountDir -DriverDir $DriverDir -Label "boot" -Logger $Logger Add-DriversToImage -MountPath $mountDir -DriverDir $DriverDir -Label "boot" -Logger $Logger
& $Logger "Saving boot.wim..." & $Logger "Saving boot.wim..."
Dismount-WindowsImage -Path $mountDir -Save -ErrorAction Stop | Out-Null Dismount-WindowsImage -Path $mountDir -Save
& $Logger "boot.wim driver injection complete." & $Logger "boot.wim driver injection complete."
} catch { } catch {
& $Logger "Warning: boot.wim driver injection failed: $_" & $Logger "Warning: boot.wim driver injection failed: $_"
try { Dismount-WindowsImage -Path $mountDir -Discard -ErrorAction SilentlyContinue | Out-Null } catch {} try { Dismount-WindowsImage -Path $mountDir -Discard } catch {}
} finally { } finally {
Remove-Item -Path $mountDir -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $mountDir -Recurse -Force
} }
} }
@@ -143,9 +143,9 @@ function Invoke-WinUtilISOScript {
if ($InjectCurrentSystemDrivers) { if ($InjectCurrentSystemDrivers) {
& $Log "Exporting all drivers from running system..." & $Log "Exporting all drivers from running system..."
$driverExportRoot = Join-Path $env:TEMP "WinUtil_DriverExport_$(Get-Random)" $driverExportRoot = Join-Path $env:TEMP "WinUtil_DriverExport_$(Get-Random)"
New-Item -Path $driverExportRoot -ItemType Directory -Force | Out-Null New-Item -Path $driverExportRoot -ItemType Directory -Force
try { try {
Export-WindowsDriver -Online -Destination $driverExportRoot | Out-Null Export-WindowsDriver -Online -Destination $driverExportRoot
& $Log "Injecting current system drivers into install.wim..." & $Log "Injecting current system drivers into install.wim..."
Add-DriversToImage -MountPath $ScratchDir -DriverDir $driverExportRoot -Label "install" -Logger $Log Add-DriversToImage -MountPath $ScratchDir -DriverDir $driverExportRoot -Label "install" -Logger $Log
@@ -163,7 +163,7 @@ function Invoke-WinUtilISOScript {
} catch { } catch {
& $Log "Error during driver export/injection: $_" & $Log "Error during driver export/injection: $_"
} finally { } finally {
Remove-Item -Path $driverExportRoot -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $driverExportRoot -Recurse -Force
} }
} else { } else {
& $Log "Driver injection skipped." & $Log "Driver injection skipped."
@@ -231,7 +231,7 @@ function Invoke-WinUtilISOScript {
$absPath = $fileNode.GetAttribute("path") $absPath = $fileNode.GetAttribute("path")
$relPath = $absPath -replace '^[A-Za-z]:[/\\]', '' $relPath = $absPath -replace '^[A-Za-z]:[/\\]', ''
$destPath = Join-Path $ScratchDir $relPath $destPath = Join-Path $ScratchDir $relPath
New-Item -Path (Split-Path $destPath -Parent) -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null New-Item -Path (Split-Path $destPath -Parent) -ItemType Directory -Force
$ext = [IO.Path]::GetExtension($destPath).ToLower() $ext = [IO.Path]::GetExtension($destPath).ToLower()
$encoding = switch ($ext) { $encoding = switch ($ext) {
@@ -326,23 +326,23 @@ function Invoke-WinUtilISOScript {
# ── 4. Delete scheduled task definition files ───────────────────────────── # ── 4. Delete scheduled task definition files ─────────────────────────────
& $Log "Deleting scheduled task definition files..." & $Log "Deleting scheduled task definition files..."
$tasksPath = "$ScratchDir\Windows\System32\Tasks" $tasksPath = "$ScratchDir\Windows\System32\Tasks"
Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -Force
Remove-Item "$tasksPath\Microsoft\Windows\Customer Experience Improvement Program" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\Customer Experience Improvement Program" -Recurse -Force
Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\ProgramDataUpdater" -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\ProgramDataUpdater" -Force
Remove-Item "$tasksPath\Microsoft\Windows\Chkdsk\Proxy" -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\Chkdsk\Proxy" -Force
Remove-Item "$tasksPath\Microsoft\Windows\Windows Error Reporting\QueueReporting" -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\Windows Error Reporting\QueueReporting" -Force
Remove-Item "$tasksPath\Microsoft\Windows\InstallService" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\InstallService" -Recurse -Force
Remove-Item "$tasksPath\Microsoft\Windows\UpdateOrchestrator" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\UpdateOrchestrator" -Recurse -Force
Remove-Item "$tasksPath\Microsoft\Windows\UpdateAssistant" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\UpdateAssistant" -Recurse -Force
Remove-Item "$tasksPath\Microsoft\Windows\WaaSMedic" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\WaaSMedic" -Recurse -Force
Remove-Item "$tasksPath\Microsoft\Windows\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\Windows\WindowsUpdate" -Recurse -Force
Remove-Item "$tasksPath\Microsoft\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$tasksPath\Microsoft\WindowsUpdate" -Recurse -Force
& $Log "Scheduled task files deleted." & $Log "Scheduled task files deleted."
# ── 5. Remove ISO support folder ───────────────────────────────────────── # ── 5. Remove ISO support folder ─────────────────────────────────────────
if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) { if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) {
& $Log "Removing ISO support\ folder..." & $Log "Removing ISO support\ folder..."
Remove-Item -Path (Join-Path $ISOContentsDir "support") -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path (Join-Path $ISOContentsDir "support") -Recurse -Force
& $Log "ISO support\ folder removed." & $Log "ISO support\ folder removed."
} }
} }
+23 -23
View File
@@ -93,7 +93,7 @@ function Invoke-WinUtilISOWriteUSB {
} }
function Get-FreeDriveLetter { function Get-FreeDriveLetter {
$used = (Get-PSDrive -PSProvider FileSystem -ErrorAction SilentlyContinue).Name $used = (Get-PSDrive -PSProvider FileSystem).Name
foreach ($c in [char[]](68..90)) { foreach ($c in [char[]](68..90)) {
if ($used -notcontains [string]$c) { return $c } if ($used -notcontains [string]$c) { return $c }
} }
@@ -107,29 +107,29 @@ function Invoke-WinUtilISOWriteUSB {
$dpFile1 = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt" $dpFile1 = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt"
"select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1 -Encoding ASCII "select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1 -Encoding ASCII
Log "Running diskpart clean on Disk $diskNum..." Log "Running diskpart clean on Disk $diskNum..."
$dpCleanOut = diskpart /s $dpFile1 2>&1 $dpCleanOut = diskpart /s $dpFile1
$dpCleanOut | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" } $dpCleanOut | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
Remove-Item $dpFile1 -Force -ErrorAction SilentlyContinue Remove-Item $dpFile1 -Force
if (($dpCleanOut -join ' ') -match 'device is not ready') { if (($dpCleanOut -join ' ') -match 'device is not ready') {
Log "Disk $diskNum was not ready; waiting 5 seconds and retrying clean..." Log "Disk $diskNum was not ready; waiting 5 seconds and retrying clean..."
Start-Sleep -Seconds 5 Start-Sleep -Seconds 5
Update-Disk -Number $diskNum -ErrorAction SilentlyContinue Update-Disk -Number $diskNum
$dpFile1b = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt" $dpFile1b = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt"
"select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1b -Encoding ASCII "select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1b -Encoding ASCII
diskpart /s $dpFile1b 2>&1 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" } diskpart /s $dpFile1b | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
Remove-Item $dpFile1b -Force -ErrorAction SilentlyContinue Remove-Item $dpFile1b -Force
} }
# Phase 2: Initialize as GPT # Phase 2: Initialize as GPT
Start-Sleep -Seconds 2 Start-Sleep -Seconds 2
Update-Disk -Number $diskNum -ErrorAction SilentlyContinue Update-Disk -Number $diskNum
$diskObj = Get-Disk -Number $diskNum -ErrorAction Stop $diskObj = Get-Disk -Number $diskNum
if ($diskObj.PartitionStyle -eq 'RAW') { if ($diskObj.PartitionStyle -eq 'RAW') {
Initialize-Disk -Number $diskNum -PartitionStyle GPT -ErrorAction Stop Initialize-Disk -Number $diskNum -PartitionStyle GPT
Log "Disk $diskNum initialized as GPT." Log "Disk $diskNum initialized as GPT."
} else { } else {
Set-Disk -Number $diskNum -PartitionStyle GPT -ErrorAction Stop Set-Disk -Number $diskNum -PartitionStyle GPT
Log "Disk $diskNum converted to GPT (was $($diskObj.PartitionStyle))." Log "Disk $diskNum converted to GPT (was $($diskObj.PartitionStyle))."
} }
@@ -138,7 +138,7 @@ function Invoke-WinUtilISOWriteUSB {
$volLabel = "W11-" + (Get-Date).ToString('yyMMdd') $volLabel = "W11-" + (Get-Date).ToString('yyMMdd')
$dpFile2 = Join-Path $env:TEMP "winutil_diskpart2_$(Get-Random).txt" $dpFile2 = Join-Path $env:TEMP "winutil_diskpart2_$(Get-Random).txt"
$maxFat32PartitionMB = 32768 $maxFat32PartitionMB = 32768
$diskSizeMB = [int][Math]::Floor((Get-Disk -Number $diskNum -ErrorAction Stop).Size / 1MB) $diskSizeMB = [int][Math]::Floor((Get-Disk -Number $diskNum).Size / 1MB)
$createPartitionCommand = "create partition primary" $createPartitionCommand = "create partition primary"
if ($diskSizeMB -gt $maxFat32PartitionMB) { if ($diskSizeMB -gt $maxFat32PartitionMB) {
$createPartitionCommand = "create partition primary size=$maxFat32PartitionMB" $createPartitionCommand = "create partition primary size=$maxFat32PartitionMB"
@@ -151,14 +151,14 @@ function Invoke-WinUtilISOWriteUSB {
"exit" "exit"
) | Set-Content -Path $dpFile2 -Encoding ASCII ) | Set-Content -Path $dpFile2 -Encoding ASCII
Log "Creating partitions on Disk $diskNum..." Log "Creating partitions on Disk $diskNum..."
diskpart /s $dpFile2 2>&1 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" } diskpart /s $dpFile2 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
Remove-Item $dpFile2 -Force -ErrorAction SilentlyContinue Remove-Item $dpFile2 -Force
SetProgress "Formatting USB partition..." 25 SetProgress "Formatting USB partition..." 25
Start-Sleep -Seconds 3 Start-Sleep -Seconds 3
Update-Disk -Number $diskNum -ErrorAction SilentlyContinue Update-Disk -Number $diskNum
$partitions = Get-Partition -DiskNumber $diskNum -ErrorAction Stop $partitions = Get-Partition -DiskNumber $diskNum
Log "Partitions on Disk $diskNum after creation: $($partitions.Count)" Log "Partitions on Disk $diskNum after creation: $($partitions.Count)"
foreach ($p in $partitions) { foreach ($p in $partitions) {
Log " Partition $($p.PartitionNumber) Type=$($p.Type) Letter=$($p.DriveLetter) Size=$([math]::Round($p.Size/1MB))MB" Log " Partition $($p.PartitionNumber) Type=$($p.Type) Letter=$($p.DriveLetter) Size=$([math]::Round($p.Size/1MB))MB"
@@ -173,14 +173,14 @@ function Invoke-WinUtilISOWriteUSB {
# with 'no volume selected' when the partition has never been formatted before) # with 'no volume selected' when the partition has never been formatted before)
Log "Formatting Partition $($winpePart.PartitionNumber) as FAT32 (label: $volLabel)..." Log "Formatting Partition $($winpePart.PartitionNumber) as FAT32 (label: $volLabel)..."
Get-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber | Get-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber |
Format-Volume -FileSystem FAT32 -NewFileSystemLabel $volLabel -Force -Confirm:$false | Out-Null Format-Volume -FileSystem FAT32 -NewFileSystemLabel $volLabel -Force -Confirm:$false
Log "Partition $($winpePart.PartitionNumber) formatted as FAT32." Log "Partition $($winpePart.PartitionNumber) formatted as FAT32."
SetProgress "Assigning drive letters..." 30 SetProgress "Assigning drive letters..." 30
Start-Sleep -Seconds 2 Start-Sleep -Seconds 2
Update-Disk -Number $diskNum -ErrorAction SilentlyContinue Update-Disk -Number $diskNum
try { Remove-PartitionAccessPath -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -AccessPath "$($winpePart.DriveLetter):" -ErrorAction SilentlyContinue } catch {} try { Remove-PartitionAccessPath -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -AccessPath "$($winpePart.DriveLetter):" } catch {}
$usbLetter = Get-FreeDriveLetter $usbLetter = Get-FreeDriveLetter
if (-not $usbLetter) { throw "No free drive letters (D-Z) available to assign to the USB data partition." } if (-not $usbLetter) { throw "No free drive letters (D-Z) available to assign to the USB data partition." }
Set-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -NewDriveLetter $usbLetter Set-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -NewDriveLetter $usbLetter
@@ -197,9 +197,9 @@ function Invoke-WinUtilISOWriteUSB {
if (-not (Test-Path $usbDrive)) { throw "Drive $usbDrive is not accessible after letter assignment." } if (-not (Test-Path $usbDrive)) { throw "Drive $usbDrive is not accessible after letter assignment." }
Log "USB data partition: $usbDrive" Log "USB data partition: $usbDrive"
$contentSizeBytes = (Get-ChildItem -LiteralPath $contentsDir -File -Recurse -Force -ErrorAction Stop | Measure-Object -Property Length -Sum).Sum $contentSizeBytes = (Get-ChildItem -LiteralPath $contentsDir -File -Recurse -Force | Measure-Object -Property Length -Sum).Sum
if (-not $contentSizeBytes) { $contentSizeBytes = 0 } if (-not $contentSizeBytes) { $contentSizeBytes = 0 }
$usbVolume = Get-Volume -DriveLetter $usbLetter -ErrorAction Stop $usbVolume = Get-Volume -DriveLetter $usbLetter
$partitionCapacityBytes = [int64]$usbVolume.Size $partitionCapacityBytes = [int64]$usbVolume.Size
$partitionFreeBytes = [int64]$usbVolume.SizeRemaining $partitionFreeBytes = [int64]$usbVolume.SizeRemaining
@@ -226,7 +226,7 @@ function Invoke-WinUtilISOWriteUSB {
if ($wimSizeMB -gt 3800) { if ($wimSizeMB -gt 3800) {
Log "install.wim is $wimSizeMB MB - splitting for FAT32 compatibility... This will take several minutes." Log "install.wim is $wimSizeMB MB - splitting for FAT32 compatibility... This will take several minutes."
$splitDest = Join-Path $usbDrive "sources\install.swm" $splitDest = Join-Path $usbDrive "sources\install.swm"
New-Item -ItemType Directory -Path (Split-Path $splitDest) -Force | Out-Null New-Item -ItemType Directory -Path (Split-Path $splitDest) -Force
Split-WindowsImage -ImagePath $installWim -SplitImagePath $splitDest -FileSize 3800 -CheckIntegrity Split-WindowsImage -ImagePath $installWim -SplitImagePath $splitDest -FileSize 3800 -CheckIntegrity
Log "install.wim split complete." Log "install.wim split complete."
Log "Copying remaining files to USB..." Log "Copying remaining files to USB..."
@@ -262,7 +262,7 @@ function Invoke-WinUtilISOWriteUSB {
$sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $true $sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $true
}) })
} }
}) | Out-Null })
$script.BeginInvoke() | Out-Null $script.BeginInvoke()
} }
@@ -1,8 +1,15 @@
function Invoke-WinUtilInstallPSProfile { function Invoke-WinUtilInstallPSProfile {
if (-not (Get-Command wt)) {
if (Test-Path $Profile) { Write-Host "Windows Terminal not found installing..."
Rename-Item $Profile -NewName ($Profile + '.bak') Install-WinUtilWinget
winget install Microsoft.WindowsTerminal --source winget --silent
} }
Start-Process pwsh -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"' if (-not (Get-Command pwsh)) {
Write-Host "Powershell 7 not found installing..."
Install-WinUtilWinget
winget install Microsoft.PowerShell --source winget --silent
}
wt new-tab pwsh -NoExit -Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"
} }
@@ -25,7 +25,6 @@ function Invoke-WinUtilTweaks {
if($undo) { if($undo) {
$Values = @{ $Values = @{
Registry = "OriginalValue" Registry = "OriginalValue"
ScheduledTask = "OriginalState"
Service = "OriginalType" Service = "OriginalType"
ScriptType = "UndoScript" ScriptType = "UndoScript"
} }
@@ -33,18 +32,11 @@ function Invoke-WinUtilTweaks {
} else { } else {
$Values = @{ $Values = @{
Registry = "Value" Registry = "Value"
ScheduledTask = "State"
Service = "StartupType" Service = "StartupType"
OriginalService = "OriginalType" OriginalService = "OriginalType"
ScriptType = "InvokeScript" ScriptType = "InvokeScript"
} }
} }
if($sync.configs.tweaks.$CheckBox.ScheduledTask) {
$sync.configs.tweaks.$CheckBox.ScheduledTask | ForEach-Object {
Write-Debug "$($psitem.Name) and state is $($psitem.$($values.ScheduledTask))"
Set-WinUtilScheduledTask -Name $psitem.Name -State $psitem.$($values.ScheduledTask)
}
}
if($sync.configs.tweaks.$CheckBox.service) { if($sync.configs.tweaks.$CheckBox.service) {
Write-Debug "KeepServiceStartup is $KeepServiceStartup" Write-Debug "KeepServiceStartup is $KeepServiceStartup"
$sync.configs.tweaks.$CheckBox.service | ForEach-Object { $sync.configs.tweaks.$CheckBox.service | ForEach-Object {
@@ -1,10 +1,9 @@
function Invoke-WinUtilUninstallPSProfile { function Invoke-WinUtilUninstallPSProfile {
if (Test-Path ($Profile + '.bak')) {
Remove-Item $Profile if (Test-Path ($Profile + ".bak")) {
Rename-Item ($Profile + '.bak') -NewName $Profile Move-Item -Path ($Profile + ".bak") -Destination $Profile
} } else {
else { Remove-Item -Path $Profile
Remove-Item $Profile
} }
Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green
@@ -1,42 +0,0 @@
function Set-WinUtilScheduledTask {
<#
.SYNOPSIS
Enables/Disables the provided Scheduled Task
.PARAMETER Name
The path to the Scheduled Task
.PARAMETER State
The State to set the Task to
.EXAMPLE
Set-WinUtilScheduledTask -Name "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -State "Disabled"
#>
param (
$Name,
$State
)
try {
if($State -eq "Disabled") {
Write-Host "Disabling Scheduled Task $Name"
Disable-ScheduledTask -TaskName $Name -ErrorAction Stop
}
if($State -eq "Enabled") {
Write-Host "Enabling Scheduled Task $Name"
Enable-ScheduledTask -TaskName $Name -ErrorAction Stop
}
} catch [System.Exception] {
if($psitem.Exception.Message -like "*The system cannot find the file specified*") {
Write-Warning "Scheduled Task $Name was not found."
} else {
Write-Warning "Unable to set $Name due to unhandled exception."
Write-Warning $psitem.Exception.Message
}
} catch {
Write-Warning "Unable to run script for $name due to unhandled exception."
Write-Warning $psitem.Exception.StackTrace
}
}
@@ -1,21 +0,0 @@
Function Update-WinUtilProgramWinget {
<#
.SYNOPSIS
This will update all programs using WinGet
#>
[ScriptBlock]$wingetinstall = {
$host.ui.RawUI.WindowTitle = """WinGet Install"""
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
}
$global:WinGetInstall = Start-Process -Verb runas powershell -ArgumentList "-command invoke-command -scriptblock {$wingetinstall} -argumentlist '$($ProgramsToInstall -join ",")'" -PassThru
}
+12 -27
View File
@@ -1,36 +1,21 @@
function Invoke-WPFInstallUpgrade { function Invoke-WPFInstallUpgrade {
<#
.SYNOPSIS
Invokes the function that upgrades all installed programs
#>
if ($sync.ChocoRadioButton.IsChecked) { if ($sync.ChocoRadioButton.IsChecked) {
Install-WinUtilChoco Install-WinUtilChoco # Ensure Chocolatey is installed before upgrading
$chocoUpgradeStatus = (Start-Process "choco" -ArgumentList "upgrade all -y" -Wait -PassThru -NoNewWindow).ExitCode
if ($chocoUpgradeStatus -eq 0) {
Write-Host "Upgrade Successful"
}
else{
Write-Host "Error Occurred. Return Code: $chocoUpgradeStatus"
}
}
else{
if((Test-WinUtilPackageManager -winget) -eq "not-installed") {
return
}
if(Get-WinUtilInstallerProcess -Process $global:WinGetInstall) {
$msg = "[Invoke-WPFInstallUpgrade] Install process is currently running. Please check for a powershell window labeled 'Winget Install'"
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
return
}
Update-WinUtilProgramWinget
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Updates started ---" Write-Host "-- Updates started ---"
Write-Host "-- You can close this window if desired ---" Write-Host "-- You can close this window if desired ---"
Write-Host "===========================================" Write-Host "==========================================="
Start-Process -FilePath powershell.exe -ArgumentList 'choco upgrade all -y'
} else {
Install-WinUtilWinget # Ensure WinGet is installed before upgrading
Write-Host "==========================================="
Write-Host "-- Updates started ---"
Write-Host "-- You can close this window if desired ---"
Write-Host "==========================================="
Start-Process -FilePath powershell.exe -ArgumentList 'winget upgrade --all --include-unknown --silent --accept-source-agreements --accept-package-agreements'
} }
} }
-4
View File
@@ -65,10 +65,6 @@ Describe "Config Files" -ForEach @(
@{ @{
name = "service" name = "service"
value = "OriginalType" value = "OriginalType"
},
@{
name = "ScheduledTask"
value = "OriginalState"
} }
) )
Foreach ($original in $Originals) { Foreach ($original in $Originals) {
+1
View File
@@ -431,6 +431,7 @@ $scripts = @(
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f; reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f;
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f; reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f;
reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DODownloadMode /f; reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DODownloadMode /f;
reg.exe add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v DisableFileSyncNGSC /t REG_DWORD /d 0 /f;
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f; reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f;
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\BITS" /v Start /t REG_DWORD /d 3 /f; reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\BITS" /v Start /t REG_DWORD /d 3 /f;
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\wuauserv" /v Start /t REG_DWORD /d 3 /f; reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\wuauserv" /v Start /t REG_DWORD /d 3 /f;