Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8193fd8ac | |||
| 25adabd622 | |||
| 2d605f1875 | |||
| d46d324df8 | |||
| 3e16817640 | |||
| d0b91d190a | |||
| bdbfdb6681 | |||
| 0154b749a4 | |||
| e6e44e3e04 | |||
| e6d8fdff75 | |||
| 6ba184bdeb | |||
| 6d6defc206 | |||
| fa073f8475 | |||
| 63aecc0bee | |||
| a0887783f8 | |||
| f3880b66bb | |||
| aa636926fa | |||
| ec3166bdc6 | |||
| a3f57532b6 | |||
| 3a7851b0f4 | |||
| 6fa73db245 | |||
| 184fe22a35 | |||
| 9d4613d838 | |||
| 10d83c5b20 | |||
| 4065759ca0 | |||
| 97d5f7b850 | |||
| bf542af426 | |||
| ea9c7de722 | |||
| d2e5886b02 | |||
| d43c26e314 | |||
| 4297d69f2c | |||
| 36e4b27872 | |||
| ec5c7a4639 | |||
| f2ca10e8c9 |
@@ -9,6 +9,15 @@ body:
|
||||
- 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).
|
||||
|
||||
- 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
|
||||
id: affected_part
|
||||
attributes:
|
||||
@@ -29,8 +38,15 @@ body:
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: tweaks_applied
|
||||
attributes:
|
||||
label: List the tweaks you applied before the issue occurred.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: error_output
|
||||
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."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<!--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
|
||||
- [ ] New feature
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
id: check_user
|
||||
if: env.command == 'true'
|
||||
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
|
||||
echo "user=true" >> $GITHUB_ENV
|
||||
else
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Close issue
|
||||
if: env.close_command == 'true'
|
||||
if: env.user == 'true' && env.close_command == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Reopen issue
|
||||
if: env.reopen_command == 'true'
|
||||
if: env.user == 'true' && env.reopen_command == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
gh issue reopen $ISSUE_NUMBER --repo ${{ github.repository }}
|
||||
|
||||
- name: Label issue
|
||||
if: env.label_command == 'true'
|
||||
if: env.user == 'true' && env.label_command == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
gh issue edit $ISSUE_NUMBER --repo ${{ github.repository }} --add-label "${{ env.label_name }}"
|
||||
|
||||
- name: Remove labels
|
||||
if: env.unlabel_command == 'true'
|
||||
if: env.user == 'true' && env.unlabel_command == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
|
||||
@@ -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.
|
||||
|
||||
<!-- sponsors --><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https://github.com/DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https://github.com/DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https://github.com/KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/partybrasil"><img src="https://github.com/partybrasil.png" width="60px" alt="User avatar: Miguel Diaz" /></a><a href="https://github.com/andrewpayne68"><img src="https://github.com/andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/Di3Z1E"><img src="https://github.com/Di3Z1E.png" width="60px" alt="User avatar: Di3Z1E" /></a><a href="https://github.com/AbdulVakeel"><img src="https://github.com/AbdulVakeel.png" width="60px" alt="User avatar: Abdul Vakeel Software Engineer" /></a><!-- sponsors -->
|
||||
<!-- sponsors --><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https://github.com/DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https://github.com/DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https://github.com/KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/andrewpayne68"><img src="https://github.com/andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/Di3Z1E"><img src="https://github.com/Di3Z1E.png" width="60px" alt="User avatar: Di3Z1E" /></a><a href="https://github.com/AbdulVakeel"><img src="https://github.com/AbdulVakeel.png" width="60px" alt="User avatar: Abdul Vakeel Software Engineer" /></a><!-- sponsors -->
|
||||
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
"link": "https://winutil.christitus.com/dev/features/features/install"
|
||||
},
|
||||
"WPFPanelAutologin": {
|
||||
"Content": "Autologin - Enable",
|
||||
"Content": "AutoLogon - Run",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Type": "Button",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"WPFTweaksDisableExplorerAutoDiscovery",
|
||||
"WPFTweaksWPBT",
|
||||
"WPFTweaksDVR",
|
||||
"WPFTweaksDeBloat",
|
||||
"WPFTweaksLocation",
|
||||
"WPFTweaksServices",
|
||||
"WPFTweaksTelemetry",
|
||||
@@ -16,6 +17,7 @@
|
||||
],
|
||||
"Minimal": [
|
||||
"WPFTweaksConsumerFeatures",
|
||||
"WPFTweaksDeBloat",
|
||||
"WPFTweaksWPBT",
|
||||
"WPFTweaksServices",
|
||||
"WPFTweaksTelemetry"
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
},
|
||||
"WPFTweaksServices": {
|
||||
"Content": "Services - Set to Manual",
|
||||
"Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.",
|
||||
"Description": "Sets some services to Manual startup and adjusts the SvcHostSplitThresholdInKB registry value to better match system memory, which can significantly reduce the number of svchost.exe processes.",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"service": [
|
||||
@@ -193,16 +193,6 @@
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "RemoteAccess",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Disabled"
|
||||
},
|
||||
{
|
||||
"Name": "RemoteRegistry",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Disabled"
|
||||
},
|
||||
{
|
||||
"Name": "StorSvc",
|
||||
"StartupType": "Manual",
|
||||
@@ -212,26 +202,6 @@
|
||||
"Name": "SharedAccess",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "TermService",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Manual"
|
||||
},
|
||||
{
|
||||
"Name": "TroubleshootingSvc",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Manual"
|
||||
},
|
||||
{
|
||||
"Name": "seclogon",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Manual"
|
||||
},
|
||||
{
|
||||
"Name": "ssh-agent",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Disabled"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
@@ -282,12 +252,61 @@
|
||||
"Value": "0",
|
||||
"Type": "DWord",
|
||||
"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"
|
||||
},
|
||||
"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.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
@@ -642,41 +661,28 @@
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeonedrive"
|
||||
},
|
||||
"WPFTweaksRemoveHome": {
|
||||
"Content": "File Explorer Home - Disable",
|
||||
"Description": "Removes the Home from Explorer and sets This PC as default.",
|
||||
"Content": "File Explorer Home and Gallery - Disable",
|
||||
"Description": "Removes the Home and Gallery from Explorer and sets This PC as default.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 1
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 0
|
||||
"
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Classes\\CLSID\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}",
|
||||
"Name": "System.IsPinnedToNameSpaceTree",
|
||||
"Value": "0",
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "LaunchTo",
|
||||
"Value": "1",
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehome"
|
||||
},
|
||||
"WPFTweaksRemoveGallery": {
|
||||
"Content": "File Explorer Gallery - Disable",
|
||||
"Description": "Removes the Gallery from Explorer and sets This PC as default.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removegallery"
|
||||
},
|
||||
"WPFTweaksDisplay": {
|
||||
"Content": "Visual Effects - Set to Best Performance",
|
||||
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
|
||||
@@ -802,7 +808,7 @@
|
||||
"WPFTweaksDeBloat": {
|
||||
"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.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"appx": [
|
||||
"Microsoft.WindowsFeedbackHub",
|
||||
@@ -838,7 +844,7 @@
|
||||
}
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/debloat"
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/debloat"
|
||||
},
|
||||
"WPFTweaksRestorePoint": {
|
||||
"Content": "Restore Point - Create",
|
||||
@@ -912,32 +918,45 @@
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/storage"
|
||||
},
|
||||
"WPFTweaksRemoveCopilot": {
|
||||
"Content": "Microsoft Copilot - Disable",
|
||||
"Description": "Removes Copilot AppXPackages and related ai packages",
|
||||
"WPFTweaksWindowsAI": {
|
||||
"Content": "Windows AI - Disable",
|
||||
"Description": "Removes or disables all ai features and packages",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
|
||||
"Name": "SettingsPageVisibility",
|
||||
"Value": "hide:aicomponents",
|
||||
"Type": "String",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\WindowsNotepad",
|
||||
"Name": "DisableAIFeatures",
|
||||
"Value": 1,
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"
|
||||
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers
|
||||
Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers
|
||||
|
||||
$Appx = (Get-AppxPackage MicrosoftWindows.Client.CoreAI).PackageFullName
|
||||
$Sid = (Get-LocalUser $Env:UserName).Sid.Value
|
||||
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force
|
||||
|
||||
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers
|
||||
Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers
|
||||
Remove-AppxPackage $Appx
|
||||
|
||||
Write-Host \"Copilot Removed\"
|
||||
Set-Service -Name WSAIFabricSvc -StartupType Disabled
|
||||
Disable-WindowsOptionalFeature -FeatureName Recall -Online
|
||||
|
||||
Write-Host \"Windows AI Disabled\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Write-Host \"Installing Copilot...\"
|
||||
winget install --name Copilot --source msstore --accept-package-agreements --accept-source-agreements --silent
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removecopilot"
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/windowsai"
|
||||
},
|
||||
"WPFTweaksWPBT": {
|
||||
"Content": "Windows Platform Binary Table (WPBT) - Disable",
|
||||
@@ -997,7 +1016,7 @@
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/razerblock"
|
||||
},
|
||||
"WPFTweaksDisableNotifications": {
|
||||
"Content": "Notification Tray & Calendar - Disable",
|
||||
"Content": "System Tray Notifications & Calendar - Disable",
|
||||
"Description": "Disables all Notifications INCLUDING Calendar.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
@@ -1233,6 +1252,24 @@
|
||||
],
|
||||
"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": {
|
||||
"Content": "Dark Theme for Windows",
|
||||
"Description": "Enable/Disable Dark Mode.",
|
||||
@@ -1392,7 +1429,7 @@
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook"
|
||||
},
|
||||
"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.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
@@ -1561,7 +1598,7 @@
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/bingsearch"
|
||||
},
|
||||
"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.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
@@ -1705,7 +1742,7 @@
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskview"
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
"Content": "OO Shutup 10 - Run",
|
||||
"Content": "O&O ShutUp10++ - Run",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Type": "Button",
|
||||
|
||||
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 179 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 170 KiB |
|
After Width: | Height: | Size: 170 KiB |
@@ -380,13 +380,6 @@ Update UI
|
||||
"Value": "0",
|
||||
"OriginalValue": "1"
|
||||
}
|
||||
],
|
||||
"ScheduledTask": [
|
||||
{
|
||||
"Name": "Microsoft\\Windows\\Autochk\\Proxy",
|
||||
"State": "Disabled",
|
||||
"OriginalState": "Enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -397,7 +390,6 @@ Update UI
|
||||
- `Description`: What it does
|
||||
- `category`: Essential/Advanced/Customize
|
||||
- `registry`: Registry changes to make
|
||||
- `ScheduledTask`: Scheduled tasks to modify
|
||||
- `service`: Services to change
|
||||
- `OriginalValue/State`: For undo functionality
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "Autologin - Enable"
|
||||
title: "AutoLogon - Run"
|
||||
description: ""
|
||||
---
|
||||
|
||||
|
||||
@@ -5,11 +5,18 @@ description: ""
|
||||
|
||||
```powershell {filename="functions/private/Invoke-WinUtilInstallPSProfile.ps1",linenos=inline,linenostart=1}
|
||||
function Invoke-WinUtilInstallPSProfile {
|
||||
|
||||
if (Test-Path $Profile) {
|
||||
Rename-Item $Profile -NewName ($Profile + '.bak')
|
||||
if (-not (Get-Command wt)) {
|
||||
Write-Host "Windows Terminal not found installing..."
|
||||
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}
|
||||
function Invoke-WinUtilUninstallPSProfile {
|
||||
if (Test-Path ($Profile + '.bak')) {
|
||||
Remove-Item $Profile
|
||||
Rename-Item ($Profile + '.bak') -NewName $Profile
|
||||
}
|
||||
else {
|
||||
Remove-Item $Profile
|
||||
|
||||
if (Test-Path ($Profile + ".bak")) {
|
||||
Move-Item -Path ($Profile + ".bak") -Destination $Profile
|
||||
} else {
|
||||
Remove-Item -Path $Profile
|
||||
}
|
||||
|
||||
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=1255}
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1545}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1582}
|
||||
"WPFToggleBingSearch": {
|
||||
"Content": "Start Menu Bing 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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1236}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1273}
|
||||
"WPFToggleDarkMode": {
|
||||
"Content": "Dark Theme for Windows",
|
||||
"Description": "Enable/Disable Dark Mode.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "BSoD Verbose Mode"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1210}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1229}
|
||||
"WPFToggleDetailedBSoD": {
|
||||
"Content": "BSoD Verbose Mode",
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1192}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1211}
|
||||
"WPFToggleDisableCrossDeviceResume": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "File Explorer Hidden Files"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1306}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1343}
|
||||
"WPFToggleHiddenFiles": {
|
||||
"Content": "File Explorer Hidden Files",
|
||||
"Description": "If enabled, Hidden Files will be shown.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Settings Home Page"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1527}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1564}
|
||||
"WPFToggleHideSettingsHome": {
|
||||
"Content": "Settings Home Page",
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1563}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1600}
|
||||
"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.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Mouse Acceleration"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1431}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1468}
|
||||
"WPFToggleMouseAcceleration": {
|
||||
"Content": "Mouse Acceleration",
|
||||
"Description": "If enabled, the Cursor movement is affected by the speed of your physical mouse movements.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Multiplane Overlay"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1413}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1450}
|
||||
"WPFToggleMultiplaneOverlay": {
|
||||
"Content": "Multiplane Overlay",
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1352}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1389}
|
||||
"WPFToggleNewOutlook": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Num Lock on Startup"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1465}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1502}
|
||||
"WPFToggleNumLock": {
|
||||
"Content": "Num Lock on Startup",
|
||||
"Description": "Toggle the Num Lock key state when your computer starts.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "S3 Sleep"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1509}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1546}
|
||||
"WPFToggleS3Sleep": {
|
||||
"Content": "S3 Sleep",
|
||||
"Description": "Toggles between Modern Standby and S3 Sleep.",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "Always Show Scrollbars"
|
||||
title: "Scrollbars Always Visible"
|
||||
description: ""
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "File Explorer File Extensions"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1278}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1315}
|
||||
"WPFToggleShowExt": {
|
||||
"Content": "File Explorer File Extensions",
|
||||
"Description": "If enabled, File extensions (e.g., .txt, .jpg) are visible.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "S0 Sleep Network Connectivity"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1491}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1528}
|
||||
"WPFToggleStandbyFix": {
|
||||
"Content": "S0 Sleep Network Connectivity",
|
||||
"Description": "Enable or disable network connectivity during S0 Sleep.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Start Menu Recommendations"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1581}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1618}
|
||||
"WPFToggleStartMenuRecommendations": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Sticky Keys"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1625}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1662}
|
||||
"WPFToggleStickyKeys": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Taskbar Task View Icon"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1689}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1726}
|
||||
"WPFToggleTaskView": {
|
||||
"Content": "Taskbar Task View Icon",
|
||||
"Description": "If enabled, Task View Button in Taskbar will be shown.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Taskbar Centered Icons"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1643}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1680}
|
||||
"WPFToggleTaskbarAlignment": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Taskbar Search Icon"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1671}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1708}
|
||||
"WPFToggleTaskbarSearch": {
|
||||
"Content": "Taskbar Search Icon",
|
||||
"Description": "If enabled, Search Button will be on the Taskbar.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Logon Verbose Mode"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1334}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1371}
|
||||
"WPFToggleVerboseLogon": {
|
||||
"Content": "Logon Verbose Mode",
|
||||
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "ConsumerFeatures - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=440}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=459}
|
||||
"WPFTweaksConsumerFeatures": {
|
||||
"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).",
|
||||
|
||||
@@ -3,11 +3,11 @@ title: "Unwanted Pre-Installed Apps - Remove"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=802}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=808}
|
||||
"WPFTweaksDeBloat": {
|
||||
"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.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"appx": [
|
||||
"Microsoft.WindowsFeedbackHub",
|
||||
@@ -3,7 +3,7 @@ title: "Temporary Files - Remove"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1087}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1106}
|
||||
"WPFTweaksDeleteTempFiles": {
|
||||
"Content": "Temporary Files - Remove",
|
||||
"Description": "Erases TEMP Folders.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "File Explorer Automatic Folder Discovery - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1738}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1775}
|
||||
"WPFTweaksDisableExplorerAutoDiscovery": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Disk Cleanup - Run"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1074}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1093}
|
||||
"WPFTweaksDiskCleanup": {
|
||||
"Content": "Disk Cleanup - Run",
|
||||
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "End Task With Right Click - Enable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=870}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=876}
|
||||
"WPFTweaksEndTaskOnTaskbar": {
|
||||
"Content": "End Task With Right Click - Enable",
|
||||
"Description": "Enables option to end task when right clicking a program in the taskbar.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "PowerShell 7 Telemetry - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=886}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=892}
|
||||
"WPFTweaksPowershell7Tele": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Restore Point - Create"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=843}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=849}
|
||||
"WPFTweaksRestorePoint": {
|
||||
"Content": "Restore Point - Create",
|
||||
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.",
|
||||
|
||||
@@ -6,7 +6,7 @@ description: ""
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=175}
|
||||
"WPFTweaksServices": {
|
||||
"Content": "Services - Set to Manual",
|
||||
"Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.",
|
||||
"Description": "Sets some services to Manual startup and adjusts the SvcHostSplitThresholdInKB registry value to better match system memory, which can significantly reduce the number of svchost.exe processes.",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"service": [
|
||||
@@ -25,16 +25,6 @@ description: ""
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "RemoteAccess",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Disabled"
|
||||
},
|
||||
{
|
||||
"Name": "RemoteRegistry",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Disabled"
|
||||
},
|
||||
{
|
||||
"Name": "StorSvc",
|
||||
"StartupType": "Manual",
|
||||
@@ -44,26 +34,6 @@ description: ""
|
||||
"Name": "SharedAccess",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "TermService",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Manual"
|
||||
},
|
||||
{
|
||||
"Name": "TroubleshootingSvc",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Manual"
|
||||
},
|
||||
{
|
||||
"Name": "seclogon",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Manual"
|
||||
},
|
||||
{
|
||||
"Name": "ssh-agent",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Disabled"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Telemetry - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=456}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=475}
|
||||
"WPFTweaksTelemetry": {
|
||||
"Content": "Telemetry - Disable",
|
||||
"Description": "Disables Microsoft Telemetry.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Windows Platform Binary Table (WPBT) - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=942}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=961}
|
||||
"WPFTweaksWPBT": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Adobe URL Block List - Enable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1022}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1041}
|
||||
"WPFTweaksBlockAdobeNet": {
|
||||
"Content": "Adobe URL Block List - Enable",
|
||||
"Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Brave Browser - Debloat"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=245}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=215}
|
||||
"WPFTweaksBraveDebloat": {
|
||||
"Content": "Brave Browser - Debloat",
|
||||
"Description": "Disables various annoyances like Brave Rewards, Leo AI, Crypto Wallet and VPN.",
|
||||
@@ -44,6 +44,55 @@ description: ""
|
||||
"Value": "0",
|
||||
"Type": "DWord",
|
||||
"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: "Background Apps - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1160}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1179}
|
||||
"WPFTweaksDisableBGapps": {
|
||||
"Content": "Background Apps - Disable",
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1176}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1195}
|
||||
"WPFTweaksDisableFSO": {
|
||||
"Content": "Fullscreen Optimizations - Disable",
|
||||
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "IPv6 - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1138}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1157}
|
||||
"WPFTweaksDisableIPv6": {
|
||||
"Content": "IPv6 - Disable",
|
||||
"Description": "Disables IPv6.",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "Notification Tray & Calendar - Disable"
|
||||
title: "System Tray Notifications & Calendar - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=999}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1018}
|
||||
"WPFTweaksDisableNotifications": {
|
||||
"Content": "Notification Tray & Calendar - Disable",
|
||||
"Content": "System Tray Notifications & Calendar - Disable",
|
||||
"Description": "Disables all Notifications INCLUDING Calendar.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "Disable warnings for unsigned RDP files"
|
||||
title: "RDP Unsigned File Warnings - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=289}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=308}
|
||||
"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.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Visual Effects - Set to Best Performance"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=680}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=686}
|
||||
"WPFTweaksDisplay": {
|
||||
"Content": "Visual Effects - Set to Best Performance",
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=312}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=331}
|
||||
"WPFTweaksEdgeDebloat": {
|
||||
"Content": "Microsoft Edge - Debloat",
|
||||
"Description": "Disables various telemetry options, popups, and other annoyances in Edge.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "IPv6 - Set IPv4 as Preferred"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1100}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1119}
|
||||
"WPFTweaksIPv46": {
|
||||
"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.",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "OO Shutup 10 - Run"
|
||||
title: "O&O ShutUp10++ - Run"
|
||||
description: ""
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Razer Software Auto-Install - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=958}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=977}
|
||||
"WPFTweaksRazerBlock": {
|
||||
"Content": "Razer Software Auto-Install - Disable",
|
||||
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.",
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
title: "Microsoft Copilot - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=915}
|
||||
"WPFTweaksRemoveCopilot": {
|
||||
"Content": "Microsoft Copilot - Disable",
|
||||
"Description": "Removes Copilot AppXPackages and related ai packages",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers
|
||||
Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers
|
||||
|
||||
$Appx = (Get-AppxPackage MicrosoftWindows.Client.CoreAI).PackageFullName
|
||||
$Sid = (Get-LocalUser $Env:UserName).Sid.Value
|
||||
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force
|
||||
Remove-AppxPackage $Appx
|
||||
|
||||
Write-Host \"Copilot Removed\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Write-Host \"Installing Copilot...\"
|
||||
winget install --name Copilot --source msstore --accept-package-agreements --accept-source-agreements --silent
|
||||
"
|
||||
],
|
||||
```
|
||||
@@ -3,7 +3,7 @@ title: "Microsoft Edge - Remove"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=575}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=594}
|
||||
"WPFTweaksRemoveEdge": {
|
||||
"Content": "Microsoft Edge - Remove",
|
||||
"Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.",
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "File Explorer Gallery - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=663}
|
||||
"WPFTweaksRemoveGallery": {
|
||||
"Content": "File Explorer Gallery - Disable",
|
||||
"Description": "Removes the Gallery from Explorer and sets This PC as default.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
||||
"
|
||||
],
|
||||
```
|
||||
@@ -1,24 +1,34 @@
|
||||
---
|
||||
title: "File Explorer Home - Disable"
|
||||
title: "File Explorer Home and Gallery - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=644}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=663}
|
||||
"WPFTweaksRemoveHome": {
|
||||
"Content": "File Explorer Home - Disable",
|
||||
"Description": "Removes the Home from Explorer and sets This PC as default.",
|
||||
"Content": "File Explorer Home and Gallery - Disable",
|
||||
"Description": "Removes the Home and Gallery from Explorer and sets This PC as default.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 1
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\"
|
||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 0
|
||||
"
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Classes\\CLSID\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}",
|
||||
"Name": "System.IsPinnedToNameSpaceTree",
|
||||
"Value": "0",
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "LaunchTo",
|
||||
"Value": "1",
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
```
|
||||
|
||||
## 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: "Microsoft OneDrive - Remove"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=607}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=626}
|
||||
"WPFTweaksRemoveOneDrive": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Right-Click Menu Previous Layout - Enable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1052}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1071}
|
||||
"WPFTweaksRightClickMenu": {
|
||||
"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.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Storage Sense - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=899}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=905}
|
||||
"WPFTweaksStorage": {
|
||||
"Content": "Storage Sense - Disable",
|
||||
"Description": "Storage Sense deletes temp files automatically.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "Teredo - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1116}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1135}
|
||||
"WPFTweaksTeredo": {
|
||||
"Content": "Teredo - Disable",
|
||||
"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: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=591}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=610}
|
||||
"WPFTweaksUTC": {
|
||||
"Content": "Date & Time - Set Time to UTC",
|
||||
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.",
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: "Windows AI - Disable"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=921}
|
||||
"WPFTweaksWindowsAI": {
|
||||
"Content": "Windows AI - Disable",
|
||||
"Description": "Removes or disables all ai features and packages",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
|
||||
"Name": "SettingsPageVisibility",
|
||||
"Value": "hide:aicomponents",
|
||||
"Type": "String",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\WindowsNotepad",
|
||||
"Name": "DisableAIFeatures",
|
||||
"Value": 1,
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"
|
||||
$Appx = (Get-AppxPackage MicrosoftWindows.Client.CoreAI).PackageFullName
|
||||
$Sid = (Get-LocalUser $Env:UserName).Sid.Value
|
||||
|
||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force
|
||||
|
||||
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers
|
||||
Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers
|
||||
Remove-AppxPackage $Appx
|
||||
|
||||
Set-Service -Name WSAIFabricSvc -StartupType Disabled
|
||||
Disable-WindowsOptionalFeature -FeatureName Recall -Online
|
||||
|
||||
Write-Host \"Windows AI Disabled\"
|
||||
"
|
||||
],
|
||||
```
|
||||
|
||||
## 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: "Xbox & Gaming Components - Remove"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=779}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=785}
|
||||
"WPFTweaksXboxRemoval": {
|
||||
"Content": "Xbox & Gaming Components - Remove",
|
||||
"Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.",
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "DNS - Set to:"
|
||||
description: ""
|
||||
---
|
||||
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1714}
|
||||
```json {filename="config/tweaks.json",linenos=inline,linenostart=1751}
|
||||
"WPFchangedns": {
|
||||
"Content": "DNS - Set to:",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
|
||||
@@ -16,7 +16,7 @@ To create a config file:
|
||||
|
||||
Once you have exported a config, launch Winutil with it using this command:
|
||||
```powershell
|
||||
& ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Config "C:\Path\To\Config.json" -Run
|
||||
& ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Config "C:\Path\To\Config.json"
|
||||
```
|
||||
|
||||
This is useful for:
|
||||
|
||||
@@ -80,7 +80,7 @@ Once the modification is complete, choose how to save your image:
|
||||
> [!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`
|
||||
|
||||
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< 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
|
||||
}
|
||||
@@ -1,258 +1,16 @@
|
||||
function Install-WinUtilProgramChoco {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Manages the installation or uninstallation of a list of Chocolatey packages.
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Install", "Uninstall")]
|
||||
[string]$Action,
|
||||
|
||||
.PARAMETER Programs
|
||||
A string array containing the programs to be installed or uninstalled.
|
||||
|
||||
.PARAMETER Action
|
||||
Specifies the action to perform: "Install" or "Uninstall". The default value is "Install".
|
||||
|
||||
.DESCRIPTION
|
||||
This function processes a list of programs to be managed using Chocolatey. Depending on the specified action, it either installs or uninstalls each program in the list, updating the taskbar progress accordingly. After all operations are completed, temporary output files are cleaned up.
|
||||
|
||||
.EXAMPLE
|
||||
Install-WinUtilProgramChoco -Programs @("7zip","chrome") -Action "Uninstall"
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string[]]$Programs,
|
||||
|
||||
[Parameter(Position = 1)]
|
||||
[String]$Action = "Install"
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string[]]$Programs
|
||||
)
|
||||
|
||||
function Initialize-OutputFile {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Initializes an output file by removing any existing file and creating a new, empty file at the specified path.
|
||||
|
||||
.PARAMETER filePath
|
||||
The full path to the file to be initialized.
|
||||
|
||||
.DESCRIPTION
|
||||
This function ensures that the specified file is reset by removing any existing file at the provided path and then creating a new, empty file. It is useful when preparing a log or output file for subsequent operations.
|
||||
|
||||
.EXAMPLE
|
||||
Initialize-OutputFile -filePath "C:\temp\output.txt"
|
||||
#>
|
||||
|
||||
param ($filePath)
|
||||
Remove-Item -Path $filePath -Force -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType File -Path $filePath | Out-Null
|
||||
}
|
||||
|
||||
function Invoke-ChocoCommand {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Executes a Chocolatey command with the specified arguments and returns the exit code.
|
||||
|
||||
.PARAMETER arguments
|
||||
The arguments to be passed to the Chocolatey command.
|
||||
|
||||
.DESCRIPTION
|
||||
This function runs a specified Chocolatey command by passing the provided arguments to the `choco` executable. It waits for the process to complete and then returns the exit code, allowing the caller to determine success or failure based on the exit code.
|
||||
|
||||
.RETURNS
|
||||
[int]
|
||||
The exit code of the Chocolatey command.
|
||||
|
||||
.EXAMPLE
|
||||
$exitCode = Invoke-ChocoCommand -arguments "install 7zip -y"
|
||||
#>
|
||||
|
||||
param ($arguments)
|
||||
return (Start-Process -FilePath "choco" -ArgumentList $arguments -Wait -PassThru).ExitCode
|
||||
}
|
||||
|
||||
function Test-UpgradeNeeded {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Checks if an upgrade is needed for a Chocolatey package based on the content of a log file.
|
||||
|
||||
.PARAMETER filePath
|
||||
The path to the log file that contains the output of a Chocolatey install command.
|
||||
|
||||
.DESCRIPTION
|
||||
This function reads the specified log file and checks for keywords that indicate whether an upgrade is needed. It returns a boolean value indicating whether the terms "reinstall" or "already installed" are present, which suggests that the package might need an upgrade.
|
||||
|
||||
.RETURNS
|
||||
[bool]
|
||||
True if the log file indicates that an upgrade is needed; otherwise, false.
|
||||
|
||||
.EXAMPLE
|
||||
$isUpgradeNeeded = Test-UpgradeNeeded -filePath "C:\temp\install-output.txt"
|
||||
#>
|
||||
|
||||
param ($filePath)
|
||||
return Get-Content -Path $filePath | Select-String -Pattern "reinstall|already installed" -Quiet
|
||||
}
|
||||
|
||||
function Update-TaskbarProgress {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Updates the taskbar progress based on the current installation progress.
|
||||
|
||||
.PARAMETER currentIndex
|
||||
The current index of the program being installed or uninstalled.
|
||||
|
||||
.PARAMETER totalPrograms
|
||||
The total number of programs to be installed or uninstalled.
|
||||
|
||||
.DESCRIPTION
|
||||
This function calculates the progress of the installation or uninstallation process and updates the taskbar accordingly. The taskbar is set to "Normal" if all programs have been processed, otherwise, it is set to "Error" as a placeholder.
|
||||
|
||||
.EXAMPLE
|
||||
Update-TaskbarProgress -currentIndex 3 -totalPrograms 10
|
||||
#>
|
||||
|
||||
param (
|
||||
[int]$currentIndex,
|
||||
[int]$totalPrograms
|
||||
)
|
||||
$progressState = if ($currentIndex -eq $totalPrograms) { "Normal" } else { "Error" }
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state $progressState -value ($currentIndex / $totalPrograms) }
|
||||
}
|
||||
|
||||
function Install-ChocoPackage {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs a Chocolatey package and optionally upgrades it if needed.
|
||||
|
||||
.PARAMETER Program
|
||||
A string containing the name of the Chocolatey package to be installed.
|
||||
|
||||
.PARAMETER currentIndex
|
||||
The current index of the program in the list of programs to be managed.
|
||||
|
||||
.PARAMETER totalPrograms
|
||||
The total number of programs to be installed.
|
||||
|
||||
.DESCRIPTION
|
||||
This function installs a Chocolatey package by running the `choco install` command. If the installation output indicates that an upgrade might be needed, the function will attempt to upgrade the package. The taskbar progress is updated after each package is processed.
|
||||
|
||||
.EXAMPLE
|
||||
Install-ChocoPackage -Program $Program -currentIndex 0 -totalPrograms 5
|
||||
#>
|
||||
|
||||
param (
|
||||
[string]$Program,
|
||||
[int]$currentIndex,
|
||||
[int]$totalPrograms
|
||||
)
|
||||
|
||||
$installOutputFile = "$env:TEMP\Install-WinUtilProgramChoco.install-command.output.txt"
|
||||
Initialize-OutputFile $installOutputFile
|
||||
|
||||
Write-Host "Starting installation of $Program with Chocolatey."
|
||||
|
||||
try {
|
||||
$installStatusCode = Invoke-ChocoCommand "install $Program -y --log-file $installOutputFile"
|
||||
if ($installStatusCode -eq 0) {
|
||||
|
||||
if (Test-UpgradeNeeded $installOutputFile) {
|
||||
$upgradeStatusCode = Invoke-ChocoCommand "upgrade $Program -y"
|
||||
Write-Host "$Program was" $(if ($upgradeStatusCode -eq 0) { "upgraded successfully." } else { "not upgraded." })
|
||||
}
|
||||
else {
|
||||
Write-Host "$Program installed successfully."
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "Failed to install $Program."
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to install $Program due to an error: $_"
|
||||
}
|
||||
finally {
|
||||
Update-TaskbarProgress $currentIndex $totalPrograms
|
||||
}
|
||||
}
|
||||
|
||||
function Uninstall-ChocoPackage {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Uninstalls a Chocolatey package and any related metapackages.
|
||||
|
||||
.PARAMETER Program
|
||||
A string containing the name of the Chocolatey package to be uninstalled.
|
||||
|
||||
.PARAMETER currentIndex
|
||||
The current index of the program in the list of programs to be managed.
|
||||
|
||||
.PARAMETER totalPrograms
|
||||
The total number of programs to be uninstalled.
|
||||
|
||||
.DESCRIPTION
|
||||
This function uninstalls a Chocolatey package and any related metapackages (e.g., .install or .portable variants). It updates the taskbar progress after processing each package.
|
||||
|
||||
.EXAMPLE
|
||||
Uninstall-ChocoPackage -Program $Program -currentIndex 0 -totalPrograms 5
|
||||
#>
|
||||
|
||||
param (
|
||||
[string]$Program,
|
||||
[int]$currentIndex,
|
||||
[int]$totalPrograms
|
||||
)
|
||||
|
||||
$uninstallOutputFile = "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt"
|
||||
Initialize-OutputFile $uninstallOutputFile
|
||||
|
||||
Write-Host "Searching for metapackages of $Program (.install or .portable)"
|
||||
$chocoPackages = ((choco list | Select-String -Pattern "$Program(\.install|\.portable)?").Matches.Value) -join " "
|
||||
if ($chocoPackages) {
|
||||
Write-Host "Starting uninstallation of $chocoPackages with Chocolatey..."
|
||||
try {
|
||||
$uninstallStatusCode = Invoke-ChocoCommand "uninstall $chocoPackages -y"
|
||||
Write-Host "$Program" $(if ($uninstallStatusCode -eq 0) { "uninstalled successfully." } else { "failed to uninstall." })
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to uninstall $Program due to an error: $_"
|
||||
}
|
||||
finally {
|
||||
Update-TaskbarProgress $currentIndex $totalPrograms
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "$Program is not installed."
|
||||
}
|
||||
}
|
||||
|
||||
$totalPrograms = $Programs.Count
|
||||
if ($totalPrograms -le 0) {
|
||||
throw "Parameter 'Programs' must have at least one item."
|
||||
}
|
||||
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Configuring Chocolatey packages ---"
|
||||
Write-Host "==========================================="
|
||||
|
||||
for ($currentIndex = 0; $currentIndex -lt $totalPrograms; $currentIndex++) {
|
||||
$Program = $Programs[$currentIndex]
|
||||
Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($currentIndex / $totalPrograms * 100)
|
||||
Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -value ($currentIndex / $totalPrograms)}
|
||||
|
||||
switch ($Action) {
|
||||
"Install" {
|
||||
Install-ChocoPackage -Program $Program -currentIndex $currentIndex -totalPrograms $totalPrograms
|
||||
}
|
||||
"Uninstall" {
|
||||
Uninstall-ChocoPackage -Program $Program -currentIndex $currentIndex -totalPrograms $totalPrograms
|
||||
}
|
||||
default {
|
||||
throw "Invalid action parameter value: '$Action'."
|
||||
}
|
||||
}
|
||||
}
|
||||
Set-WinUtilProgressBar -label "$($Action)ation done" -percent 100
|
||||
# Cleanup Output Files
|
||||
$outputFiles = @("$env:TEMP\Install-WinUtilProgramChoco.install-command.output.txt", "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt")
|
||||
foreach ($filePath in $outputFiles) {
|
||||
Remove-Item -Path $filePath -Force -ErrorAction SilentlyContinue
|
||||
if ($Action -eq 'Install') {
|
||||
Start-Process -FilePath choco -ArgumentList "install $Programs -y" -NoNewWindow -Wait
|
||||
} else {
|
||||
Start-Process -FilePath choco -ArgumentList "uninstall $Programs -y" -NoNewWindow -Wait
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,135 +1,16 @@
|
||||
Function Install-WinUtilProgramWinget {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Runs the designated action on the provided programs using Winget
|
||||
|
||||
.PARAMETER Programs
|
||||
A list of programs to process
|
||||
|
||||
.PARAMETER action
|
||||
The action to perform on the programs, can be either 'Install' or 'Uninstall'
|
||||
|
||||
.NOTES
|
||||
The triple quotes are required any time you need a " in a normal script block.
|
||||
The winget Return codes are documented here: https://github.com/microsoft/winget-cli/blob/master/doc/windows/package-actionr/winget/returnCodes.md
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory, Position=0)]$Programs,
|
||||
|
||||
[Parameter(Mandatory, Position=1)]
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Install", "Uninstall")]
|
||||
[String]$Action
|
||||
[string]$Action,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string[]]$Programs
|
||||
)
|
||||
|
||||
Function Invoke-Winget {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Invokes the winget.exe with the provided arguments and return the exit code
|
||||
|
||||
.PARAMETER wingetId
|
||||
The Id of the Program that WinGet should Install/Uninstall
|
||||
|
||||
.NOTES
|
||||
Invoke WinGet uses the public variable $Action defined outside the function to determine if a Program should be installed or removed
|
||||
#>
|
||||
param (
|
||||
[string]$wingetId
|
||||
)
|
||||
|
||||
$commonArguments = "--id $wingetId --silent"
|
||||
$arguments = if ($Action -eq "Install") {
|
||||
"install $commonArguments --accept-source-agreements --accept-package-agreements --source winget"
|
||||
} else {
|
||||
"uninstall $commonArguments --source winget"
|
||||
}
|
||||
|
||||
$processParams = @{
|
||||
FilePath = "winget"
|
||||
ArgumentList = $arguments
|
||||
Wait = $true
|
||||
PassThru = $true
|
||||
NoNewWindow = $true
|
||||
}
|
||||
|
||||
return (Start-Process @processParams).ExitCode
|
||||
if ($Action -eq 'Install') {
|
||||
Start-Process -FilePath winget -ArgumentList "install $Programs --accept-package-agreements --source winget --silent" -NoNewWindow -Wait
|
||||
} else {
|
||||
Start-Process -FilePath winget -ArgumentList "uninstall $Programs --source winget --silent" -NoNewWindow -Wait
|
||||
}
|
||||
|
||||
Function Invoke-Install {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Contains the Install Logic and return code handling from winget
|
||||
|
||||
.PARAMETER Program
|
||||
The WinGet ID of the Program that should be installed
|
||||
#>
|
||||
param (
|
||||
[string]$Program
|
||||
)
|
||||
$status = Invoke-Winget -wingetId $Program
|
||||
if ($status -eq 0) {
|
||||
Write-Host "$($Program) installed successfully."
|
||||
return $true
|
||||
} elseif ($status -eq -1978335189) {
|
||||
Write-Host "No applicable update found for $($Program)."
|
||||
return $true
|
||||
}
|
||||
|
||||
Write-Host "Failed to install $($Program)."
|
||||
return $false
|
||||
}
|
||||
|
||||
Function Invoke-Uninstall {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Contains the Uninstall Logic and return code handling from WinGet
|
||||
|
||||
.PARAMETER Program
|
||||
The WinGet ID of the Program that should be uninstalled
|
||||
#>
|
||||
param (
|
||||
[string]$Program
|
||||
)
|
||||
|
||||
try {
|
||||
$status = Invoke-Winget -wingetId $Program
|
||||
if ($status -eq 0) {
|
||||
Write-Host "$($Program) uninstalled successfully."
|
||||
return $true
|
||||
} else {
|
||||
Write-Host "Failed to uninstall $($Program)."
|
||||
return $false
|
||||
}
|
||||
} catch {
|
||||
Write-Host "Failed to uninstall $($Program) due to an error: $_"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
$count = $Programs.Count
|
||||
$failedPackages = @()
|
||||
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Configuring WinGet packages ---"
|
||||
Write-Host "==========================================="
|
||||
|
||||
for ($i = 0; $i -lt $count; $i++) {
|
||||
$Program = $Programs[$i]
|
||||
$result = $false
|
||||
Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($i / $count * 100)
|
||||
Invoke-WPFUIThread -ScriptBlock{ Set-WinUtilTaskbaritem -value ($i / $count)}
|
||||
|
||||
$result = switch ($Action) {
|
||||
"Install" {Invoke-Install -Program $Program}
|
||||
"Uninstall" {Invoke-Uninstall -Program $Program}
|
||||
default {throw "[Install-WinUtilProgramWinget] Invalid action: $Action"}
|
||||
}
|
||||
|
||||
if (-not $result) {
|
||||
$failedPackages += $Program
|
||||
}
|
||||
}
|
||||
|
||||
Set-WinUtilProgressBar -label "$($Action) action done." -percent 100
|
||||
return $failedPackages
|
||||
}
|
||||
|
||||
@@ -44,21 +44,18 @@ Function Invoke-WinUtilCurrentSystem {
|
||||
if ($CheckBox -eq "tweaks") {
|
||||
|
||||
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 {
|
||||
|
||||
$Config = $psitem.Name
|
||||
#WPFEssTweaksTele
|
||||
$entry = $sync.configs.tweaks.$Config
|
||||
$registryKeys = $entry.registry
|
||||
$scheduledtaskKeys = $entry.scheduledtask
|
||||
$serviceKeys = $entry.service
|
||||
$appxKeys = $entry.appx
|
||||
$invokeScript = $entry.InvokeScript
|
||||
$entryType = $entry.Type
|
||||
|
||||
if ($registryKeys -or $scheduledtaskKeys -or $serviceKeys) {
|
||||
if ($registryKeys -or $serviceKeys) {
|
||||
$Values = @()
|
||||
|
||||
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 ($tweak in $tweaks) {
|
||||
$Service = Get-Service -Name $tweak.Name
|
||||
|
||||
@@ -49,7 +49,7 @@ function Invoke-WinUtilISOMountAndVerify {
|
||||
Set-WinUtilProgressBar -Label "Mounting ISO..." -Percent 10
|
||||
|
||||
try {
|
||||
Mount-DiskImage -ImagePath $isoPath -ErrorAction Stop | Out-Null
|
||||
Mount-DiskImage -ImagePath $isoPath
|
||||
|
||||
do {
|
||||
Start-Sleep -Milliseconds 500
|
||||
@@ -64,7 +64,7 @@ function Invoke-WinUtilISOMountAndVerify {
|
||||
$esdPath = Join-Path $driveLetter "sources\install.esd"
|
||||
|
||||
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."
|
||||
[System.Windows.MessageBox]::Show(
|
||||
"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
|
||||
|
||||
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."
|
||||
[System.Windows.MessageBox]::Show(
|
||||
"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["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
|
||||
|
||||
$workDir = if ($existingWorkDir) {
|
||||
@@ -202,7 +202,7 @@ function Invoke-WinUtilISOModify {
|
||||
$sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length
|
||||
$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) {
|
||||
@@ -223,11 +223,11 @@ function Invoke-WinUtilISOModify {
|
||||
Log "Creating working directory: $workDir"
|
||||
$isoContents = Join-Path $workDir "iso_contents"
|
||||
$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
|
||||
|
||||
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."
|
||||
SetProgress "Mounting install.wim..." 25
|
||||
|
||||
@@ -236,7 +236,7 @@ function Invoke-WinUtilISOModify {
|
||||
Set-ItemProperty -Path $localWim -Name IsReadOnly -Value $false
|
||||
|
||||
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
|
||||
|
||||
Log "Applying WinUtil modifications to install.wim..."
|
||||
@@ -249,13 +249,13 @@ function Invoke-WinUtilISOModify {
|
||||
|
||||
SetProgress "Saving modified install.wim..." 65
|
||||
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."
|
||||
|
||||
SetProgress "Removing unused editions from install.wim..." 70
|
||||
Log "Exporting edition '$selectedEditionName' (Index $selectedWimIndex) to a single-edition install.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
|
||||
Rename-Item -Path $exportWim -NewName "install.wim" -Force
|
||||
$localWim = Join-Path $isoContents "sources\install.wim"
|
||||
@@ -263,7 +263,7 @@ function Invoke-WinUtilISOModify {
|
||||
|
||||
SetProgress "Dismounting source ISO..." 80
|
||||
Log "Dismounting original ISO..."
|
||||
Dismount-DiskImage -ImagePath $isoPath | Out-Null
|
||||
Dismount-DiskImage -ImagePath $isoPath
|
||||
|
||||
$sync["Win11ISOWorkDir"] = $workDir
|
||||
$sync["Win11ISOContentsDir"] = $isoContents
|
||||
@@ -279,26 +279,26 @@ function Invoke-WinUtilISOModify {
|
||||
|
||||
try {
|
||||
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) {
|
||||
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: $_" }
|
||||
|
||||
try {
|
||||
$mountedISO = Get-DiskImage -ImagePath $isoPath -ErrorAction SilentlyContinue
|
||||
$mountedISO = Get-DiskImage -ImagePath $isoPath
|
||||
if ($mountedISO -and $mountedISO.Attached) {
|
||||
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: $_" }
|
||||
|
||||
try {
|
||||
if (Test-Path $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: $_" }
|
||||
|
||||
@@ -322,9 +322,9 @@ function Invoke-WinUtilISOModify {
|
||||
}
|
||||
})
|
||||
}
|
||||
}) | Out-Null
|
||||
})
|
||||
|
||||
$script.BeginInvoke() | Out-Null
|
||||
$script.BeginInvoke()
|
||||
}
|
||||
|
||||
function Invoke-WinUtilISOCheckExistingWork {
|
||||
@@ -335,7 +335,7 @@ function Invoke-WinUtilISOCheckExistingWork {
|
||||
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
|
||||
|
||||
if (-not $existingWorkDir) { return }
|
||||
@@ -391,7 +391,7 @@ function Invoke-WinUtilISOCleanAndReset {
|
||||
$sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length
|
||||
$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) {
|
||||
@@ -406,23 +406,23 @@ function Invoke-WinUtilISOCleanAndReset {
|
||||
if ($workDir) {
|
||||
$mountDir = Join-Path $workDir "wim_mount"
|
||||
try {
|
||||
$mountedImages = Get-WindowsImage -Mounted -ErrorAction SilentlyContinue |
|
||||
$mountedImages = Get-WindowsImage -Mounted |
|
||||
Where-Object { $_.Path -like "$workDir*" }
|
||||
if ($mountedImages) {
|
||||
foreach ($img in $mountedImages) {
|
||||
Log "Dismounting WIM at: $($img.Path) (discarding changes)..."
|
||||
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."
|
||||
}
|
||||
} elseif (Test-Path $mountDir) {
|
||||
Log "No mounted WIM reported by Get-WindowsImage. Running DISM /Cleanup-Wim as a precaution..."
|
||||
SetProgress "Running DISM cleanup..." 3
|
||||
& dism /English /Cleanup-Wim 2>&1 | ForEach-Object { Log $_ }
|
||||
& dism /English /Cleanup-Wim | ForEach-Object { Log $_ }
|
||||
}
|
||||
} catch {
|
||||
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: $_" }
|
||||
}
|
||||
}
|
||||
@@ -431,8 +431,8 @@ function Invoke-WinUtilISOCleanAndReset {
|
||||
Log "Scanning files to delete in: $workDir"
|
||||
SetProgress "Scanning files..." 5
|
||||
|
||||
$allFiles = @(Get-ChildItem -Path $workDir -File -Recurse -Force -ErrorAction SilentlyContinue)
|
||||
$allDirs = @(Get-ChildItem -Path $workDir -Directory -Recurse -Force -ErrorAction SilentlyContinue |
|
||||
$allFiles = @(Get-ChildItem -Path $workDir -File -Recurse -Force)
|
||||
$allDirs = @(Get-ChildItem -Path $workDir -Directory -Recurse -Force |
|
||||
Sort-Object { $_.FullName.Length } -Descending)
|
||||
$total = $allFiles.Count
|
||||
$deleted = 0
|
||||
@@ -440,7 +440,7 @@ function Invoke-WinUtilISOCleanAndReset {
|
||||
Log "Found $total files to delete."
|
||||
|
||||
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++
|
||||
if ($deleted % 100 -eq 0 -or $deleted -eq $total) {
|
||||
$pct = [math]::Round(($deleted / [Math]::Max($total, 1)) * 85) + 5
|
||||
@@ -449,10 +449,10 @@ function Invoke-WinUtilISOCleanAndReset {
|
||||
}
|
||||
|
||||
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) {
|
||||
Log "WARNING: some items could not be deleted in $workDir"
|
||||
@@ -501,9 +501,9 @@ function Invoke-WinUtilISOCleanAndReset {
|
||||
$sync["WPFWin11ISOCleanResetButton"].IsEnabled = $true
|
||||
})
|
||||
}
|
||||
}) | Out-Null
|
||||
})
|
||||
|
||||
$script.BeginInvoke() | Out-Null
|
||||
$script.BeginInvoke()
|
||||
}
|
||||
|
||||
function Invoke-WinUtilISOExport {
|
||||
@@ -529,10 +529,10 @@ function Invoke-WinUtilISOExport {
|
||||
$outputISO = $dlg.FileName
|
||||
|
||||
# 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
|
||||
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' } |
|
||||
Select-Object -First 1 -ExpandProperty FullName
|
||||
}
|
||||
@@ -543,10 +543,10 @@ function Invoke-WinUtilISOExport {
|
||||
# First ensure winget is installed and operational
|
||||
Install-WinUtilWinget
|
||||
|
||||
$winget = Get-Command winget -ErrorAction Stop
|
||||
$result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1
|
||||
$winget = Get-Command winget
|
||||
$result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements
|
||||
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' } |
|
||||
Select-Object -First 1 -ExpandProperty FullName
|
||||
} catch {
|
||||
@@ -609,7 +609,7 @@ function Invoke-WinUtilISOExport {
|
||||
|
||||
$proc = [System.Diagnostics.Process]::new()
|
||||
$proc.StartInfo = $psi
|
||||
$proc.Start() | Out-Null
|
||||
$proc.Start()
|
||||
|
||||
# Stream stdout line-by-line as oscdimg runs
|
||||
while (-not $proc.StandardOutput.EndOfStream) {
|
||||
@@ -653,7 +653,7 @@ function Invoke-WinUtilISOExport {
|
||||
$sync["WPFWin11ISOChooseISOButton"].IsEnabled = $true
|
||||
})
|
||||
}
|
||||
}) | Out-Null
|
||||
})
|
||||
|
||||
$script.BeginInvoke() | Out-Null
|
||||
$script.BeginInvoke()
|
||||
}
|
||||
|
||||
@@ -84,27 +84,27 @@ function Invoke-WinUtilISOScript {
|
||||
|
||||
function Add-DriversToImage {
|
||||
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]: $_" }
|
||||
}
|
||||
|
||||
function Invoke-BootWimInject {
|
||||
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)"
|
||||
New-Item -Path $mountDir -ItemType Directory -Force | Out-Null
|
||||
New-Item -Path $mountDir -ItemType Directory -Force
|
||||
try {
|
||||
& $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
|
||||
& $Logger "Saving boot.wim..."
|
||||
Dismount-WindowsImage -Path $mountDir -Save -ErrorAction Stop | Out-Null
|
||||
Dismount-WindowsImage -Path $mountDir -Save
|
||||
& $Logger "boot.wim driver injection complete."
|
||||
} catch {
|
||||
& $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 {
|
||||
Remove-Item -Path $mountDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path $mountDir -Recurse -Force
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,9 +143,9 @@ function Invoke-WinUtilISOScript {
|
||||
if ($InjectCurrentSystemDrivers) {
|
||||
& $Log "Exporting all drivers from running system..."
|
||||
$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 {
|
||||
Export-WindowsDriver -Online -Destination $driverExportRoot | Out-Null
|
||||
Export-WindowsDriver -Online -Destination $driverExportRoot
|
||||
|
||||
& $Log "Injecting current system drivers into install.wim..."
|
||||
Add-DriversToImage -MountPath $ScratchDir -DriverDir $driverExportRoot -Label "install" -Logger $Log
|
||||
@@ -163,7 +163,7 @@ function Invoke-WinUtilISOScript {
|
||||
} catch {
|
||||
& $Log "Error during driver export/injection: $_"
|
||||
} finally {
|
||||
Remove-Item -Path $driverExportRoot -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path $driverExportRoot -Recurse -Force
|
||||
}
|
||||
} else {
|
||||
& $Log "Driver injection skipped."
|
||||
@@ -231,7 +231,7 @@ function Invoke-WinUtilISOScript {
|
||||
$absPath = $fileNode.GetAttribute("path")
|
||||
$relPath = $absPath -replace '^[A-Za-z]:[/\\]', ''
|
||||
$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()
|
||||
$encoding = switch ($ext) {
|
||||
@@ -326,23 +326,23 @@ function Invoke-WinUtilISOScript {
|
||||
# ── 4. Delete scheduled task definition files ─────────────────────────────
|
||||
& $Log "Deleting scheduled task definition files..."
|
||||
$tasksPath = "$ScratchDir\Windows\System32\Tasks"
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Customer Experience Improvement Program" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\ProgramDataUpdater" -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Chkdsk\Proxy" -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Windows Error Reporting\QueueReporting" -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\InstallService" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\UpdateOrchestrator" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\UpdateAssistant" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\WaaSMedic" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$tasksPath\Microsoft\WindowsUpdate" -Recurse -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
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\ProgramDataUpdater" -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Chkdsk\Proxy" -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\Windows Error Reporting\QueueReporting" -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\InstallService" -Recurse -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\UpdateOrchestrator" -Recurse -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\UpdateAssistant" -Recurse -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\WaaSMedic" -Recurse -Force
|
||||
Remove-Item "$tasksPath\Microsoft\Windows\WindowsUpdate" -Recurse -Force
|
||||
Remove-Item "$tasksPath\Microsoft\WindowsUpdate" -Recurse -Force
|
||||
& $Log "Scheduled task files deleted."
|
||||
|
||||
# ── 5. Remove ISO support folder ─────────────────────────────────────────
|
||||
if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) {
|
||||
& $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."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
}
|
||||
|
||||
function Get-FreeDriveLetter {
|
||||
$used = (Get-PSDrive -PSProvider FileSystem -ErrorAction SilentlyContinue).Name
|
||||
$used = (Get-PSDrive -PSProvider FileSystem).Name
|
||||
foreach ($c in [char[]](68..90)) {
|
||||
if ($used -notcontains [string]$c) { return $c }
|
||||
}
|
||||
@@ -107,29 +107,29 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
$dpFile1 = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt"
|
||||
"select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1 -Encoding ASCII
|
||||
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: $_" }
|
||||
Remove-Item $dpFile1 -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item $dpFile1 -Force
|
||||
|
||||
if (($dpCleanOut -join ' ') -match 'device is not ready') {
|
||||
Log "Disk $diskNum was not ready; waiting 5 seconds and retrying clean..."
|
||||
Start-Sleep -Seconds 5
|
||||
Update-Disk -Number $diskNum -ErrorAction SilentlyContinue
|
||||
Update-Disk -Number $diskNum
|
||||
$dpFile1b = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt"
|
||||
"select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1b -Encoding ASCII
|
||||
diskpart /s $dpFile1b 2>&1 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
|
||||
Remove-Item $dpFile1b -Force -ErrorAction SilentlyContinue
|
||||
diskpart /s $dpFile1b | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
|
||||
Remove-Item $dpFile1b -Force
|
||||
}
|
||||
|
||||
# Phase 2: Initialize as GPT
|
||||
Start-Sleep -Seconds 2
|
||||
Update-Disk -Number $diskNum -ErrorAction SilentlyContinue
|
||||
$diskObj = Get-Disk -Number $diskNum -ErrorAction Stop
|
||||
Update-Disk -Number $diskNum
|
||||
$diskObj = Get-Disk -Number $diskNum
|
||||
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."
|
||||
} else {
|
||||
Set-Disk -Number $diskNum -PartitionStyle GPT -ErrorAction Stop
|
||||
Set-Disk -Number $diskNum -PartitionStyle GPT
|
||||
Log "Disk $diskNum converted to GPT (was $($diskObj.PartitionStyle))."
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
$volLabel = "W11-" + (Get-Date).ToString('yyMMdd')
|
||||
$dpFile2 = Join-Path $env:TEMP "winutil_diskpart2_$(Get-Random).txt"
|
||||
$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"
|
||||
if ($diskSizeMB -gt $maxFat32PartitionMB) {
|
||||
$createPartitionCommand = "create partition primary size=$maxFat32PartitionMB"
|
||||
@@ -151,14 +151,14 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
"exit"
|
||||
) | Set-Content -Path $dpFile2 -Encoding ASCII
|
||||
Log "Creating partitions on Disk $diskNum..."
|
||||
diskpart /s $dpFile2 2>&1 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
|
||||
Remove-Item $dpFile2 -Force -ErrorAction SilentlyContinue
|
||||
diskpart /s $dpFile2 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" }
|
||||
Remove-Item $dpFile2 -Force
|
||||
|
||||
SetProgress "Formatting USB partition..." 25
|
||||
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)"
|
||||
foreach ($p in $partitions) {
|
||||
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)
|
||||
Log "Formatting Partition $($winpePart.PartitionNumber) as FAT32 (label: $volLabel)..."
|
||||
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."
|
||||
|
||||
SetProgress "Assigning drive letters..." 30
|
||||
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
|
||||
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
|
||||
@@ -197,9 +197,9 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
if (-not (Test-Path $usbDrive)) { throw "Drive $usbDrive is not accessible after letter assignment." }
|
||||
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 }
|
||||
$usbVolume = Get-Volume -DriveLetter $usbLetter -ErrorAction Stop
|
||||
$usbVolume = Get-Volume -DriveLetter $usbLetter
|
||||
$partitionCapacityBytes = [int64]$usbVolume.Size
|
||||
$partitionFreeBytes = [int64]$usbVolume.SizeRemaining
|
||||
|
||||
@@ -226,7 +226,7 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
if ($wimSizeMB -gt 3800) {
|
||||
Log "install.wim is $wimSizeMB MB - splitting for FAT32 compatibility... This will take several minutes."
|
||||
$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
|
||||
Log "install.wim split complete."
|
||||
Log "Copying remaining files to USB..."
|
||||
@@ -262,7 +262,7 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
$sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $true
|
||||
})
|
||||
}
|
||||
}) | Out-Null
|
||||
})
|
||||
|
||||
$script.BeginInvoke() | Out-Null
|
||||
$script.BeginInvoke()
|
||||
}
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
function Invoke-WinUtilInstallPSProfile {
|
||||
|
||||
if (Test-Path $Profile) {
|
||||
Rename-Item $Profile -NewName ($Profile + '.bak')
|
||||
if (-not (Get-Command wt)) {
|
||||
Write-Host "Windows Terminal not found installing..."
|
||||
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) {
|
||||
$Values = @{
|
||||
Registry = "OriginalValue"
|
||||
ScheduledTask = "OriginalState"
|
||||
Service = "OriginalType"
|
||||
ScriptType = "UndoScript"
|
||||
}
|
||||
@@ -33,18 +32,11 @@ function Invoke-WinUtilTweaks {
|
||||
} else {
|
||||
$Values = @{
|
||||
Registry = "Value"
|
||||
ScheduledTask = "State"
|
||||
Service = "StartupType"
|
||||
OriginalService = "OriginalType"
|
||||
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) {
|
||||
Write-Debug "KeepServiceStartup is $KeepServiceStartup"
|
||||
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
function Invoke-WinUtilUninstallPSProfile {
|
||||
if (Test-Path ($Profile + '.bak')) {
|
||||
Remove-Item $Profile
|
||||
Rename-Item ($Profile + '.bak') -NewName $Profile
|
||||
}
|
||||
else {
|
||||
Remove-Item $Profile
|
||||
|
||||
if (Test-Path ($Profile + ".bak")) {
|
||||
Move-Item -Path ($Profile + ".bak") -Destination $Profile
|
||||
} else {
|
||||
Remove-Item -Path $Profile
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||