### applications.json Structure Example Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Illustrates the JSON structure for defining applications that can be installed via WinUtil, including package manager IDs and display information. ```json {filename="config/applications.json"} { "WPFInstall": { "category": "Browsers", "choco": "googlechrome", "content": "Google Chrome", "description": "Google Chrome browser", "link": "https://chrome.google.com", "winget": "Google.Chrome" } } ``` -------------------------------- ### Application Installation Flow Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Outlines the steps involved when a user installs applications using WinUtil, from user interaction to UI updates. ```powershell User clicks "Install" ↓ Get-WinUtilCheckBoxes → Retrieves selected apps ↓ For each selected app: ↓ Check if WinGet/Choco is installed ↓ Install-WinUtilWinget/Choco (if needed) ↓ Install-WinUtilProgramWinget/Choco → Install app ↓ Update UI with progress ↓ Display completion message ``` -------------------------------- ### Install PowerShell Profile Function Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/InstallPSProfile.md This function checks for Windows Terminal and PowerShell 7, installs them using winget if missing, and then sets up the PowerShell profile by downloading and executing a setup script. ```powershell function Invoke-WinUtilInstallPSProfile { if (-not (Get-Command wt)) { Write-Host "Windows Terminal not found installing..." Install-WinUtilWinget winget install Microsoft.WindowsTerminal --source winget --silent } 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" } ``` -------------------------------- ### Install OSCDIMG Tool Source: https://github.com/christitustech/winutil/blob/main/docs/content/userguide/win11Creator/_index.md Use this command to install the OSCDIMG tool if it's not found. This is necessary for creating bootable ISO images. ```bash winget install -e --id Microsoft.OSCDIMG ``` -------------------------------- ### Install WinUtil (Stable Branch) Source: https://github.com/christitustech/winutil/blob/main/README.md Run this command in PowerShell or Terminal as administrator to install the stable version of WinUtil. ```powershell irm https://christitus.com/win | iex ``` -------------------------------- ### Install WinUtil (Development Branch) Source: https://github.com/christitustech/winutil/blob/main/README.md Run this command in PowerShell or Terminal as administrator to install the development version of WinUtil. ```powershell irm https://christitus.com/windev | iex ``` -------------------------------- ### Check and Install Winget Package Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Checks if the 'winget' command is available. If not, it calls 'Install-WinUtilWinget' to install it. It then proceeds to install a specified package using 'winget'. ```powershell # Check if installed if (!(Get-Command winget -ErrorAction SilentlyContinue)) { Install-WinUtilWinget } # Install package winget install --id $app.winget --silent --accept-source-agreements ``` -------------------------------- ### Add New Application Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Defines a new application to be installed by editing the applications.json configuration file. ```json { "WPFInstallNewApp": { "category": "Utilities", "content": "New App", "description": "Description of new app", "winget": "Publisher.AppName", "choco": "appname" } } ``` -------------------------------- ### tweaks.json Structure Example Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Shows the JSON format for configuring system tweaks, detailing registry modifications, service changes, and undo information. ```json {filename="config/tweaks.json"} { "WPFTweaksTelemetry": { "Content": "Disable Telemetry", "Description": "Disables Microsoft Telemetry", "category": "Essential Tweaks", "panel": "1", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", "Name": "AllowTelemetry", "Type": "DWord", "Value": "0", "OriginalValue": "1" } ] } } ``` -------------------------------- ### Check and Install Chocolatey Package Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Checks if the 'choco' command is available. If not, it calls 'Install-WinUtilChoco' to install it. It then proceeds to install a specified package using 'choco'. ```powershell # Check if installed if (!(Get-Command choco -ErrorAction SilentlyContinue)) { Install-WinUtilChoco } # Install package choco install $app.choco -y ``` -------------------------------- ### JSON Configuration for Start Menu Recommendations Tweak Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md This JSON snippet defines a tweak to disable Start Menu recommendations. It specifies registry paths, values, and scripts to apply or undo the change. Note the warning about disabling Windows Spotlight on the Lock Screen. ```json { "WPFToggleStartMenuRecommendations": { "Content": "Start Menu Recommendations", "Description": "Toggles the recommendations section in the Start Menu. WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.", "category": "Customize Preferences", "panel": "2", "Type": "Toggle", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Start", "Name": "HideRecommendedSection", "Value": "0", "Type": "DWord", "OriginalValue": "1", "DefaultState": "true" }, { "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Education", "Name": "IsEducationEnvironment", "Value": "0", "Type": "DWord", "OriginalValue": "1", "DefaultState": "true" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer", "Name": "HideRecommendedSection", "Value": "0", "Type": "DWord", "OriginalValue": "1", "DefaultState": "true" } ], "InvokeScript": [ " Invoke-WinUtilExplorerUpdate -action \"restart\" " ], "UndoScript": [ " Invoke-WinUtilExplorerUpdate -action \"restart\" " ] } } ``` -------------------------------- ### Enable .NET Framework 2, 3, 4 Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Features/dotnet.md This JSON configuration enables .NET Framework versions 2, 3, and 4. It specifies the content, description, category, panel, and feature components to be installed. ```json "WPFFeaturesdotnet": { "Content": ".NET Framework (Versions 2, 3, 4) - Enable", "Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.", "category": "Features", "panel": "1", "feature": [ "NetFx4-AdvSrvs", "NetFx3" ], "InvokeScript": [] } ``` -------------------------------- ### Download and Run O&O ShutUp10++ Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md This PowerShell function downloads the OOSU10.exe executable from the official O&O Software website to the temporary directory and then starts the process. It includes basic error handling for download failures. ```powershell function Invoke-WPFOOSU { try { $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest -Uri https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe -OutFile "$Env:Temp\ooshutup10.exe" Start-Process -FilePath "$Env:Temp\ooshutup10.exe" $ProgressPreference = 'Continue' } catch { Write-Error "Couldn't download O&O ShutUp10. Please make sure you have an active internet connection." } } ``` -------------------------------- ### Reinstall WinGet using PowerShell Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Fixes/Winget.md This function attempts to install WinGet using Chocolatey. It includes error handling and visual feedback for taskbar items. Use this when WinGet is suspected to be broken or malfunctioning. ```powershell function Invoke-WPFFixesWinget { <# .SYNOPSIS Fixes WinGet by running `choco install winget` .DESCRIPTION BravoNorris for the fantastic idea of a button to reinstall WinGet #> # Install Choco if not already present try { Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" Write-Host "==> Starting WinGet Repair" Install-WinUtilWinget } catch { Write-Error "Failed to install WinGet: $_" Set-WinUtilTaskbaritem -state "Error" -overlay "warning" } finally { Write-Host "==> Finished WinGet Repair" Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } } ``` -------------------------------- ### Invoke-WPFSSHServer Function Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Remote-Access/SSHServer.md This PowerShell function invokes the OpenSSH Server installation process within a runspace. It calls the Invoke-WinUtilSSHServer cmdlet and then displays a success message. ```powershell function Invoke-WPFSSHServer { <# .SYNOPSIS Invokes the OpenSSH Server install in a runspace #> Invoke-WPFRunspace -ScriptBlock { Invoke-WinUtilSSHServer Write-Host "=======================================" Write-Host "-- OpenSSH Server installed! ---" Write-Host "=======================================" } } ``` -------------------------------- ### Launch Winutil (Development Branch) Source: https://github.com/christitustech/winutil/blob/main/docs/content/userguide/getting-started/_index.md Use this command to download and execute the development version of Winutil. This is intended for testing purposes only and may contain experimental features. ```powershell irm "https://christitus.com/windev" | iex ``` -------------------------------- ### Development Build Script Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Compile the project for development, outputting 'winutil.ps1' to the root directory. ```powershell ."/Compile.ps1" ``` -------------------------------- ### Disable Razer Software Auto-Install Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md This JSON configuration defines a tweak to block Razer software installations. It modifies registry settings and includes scripts to manage Razer installation directories and permissions. ```json { "WPFTweaksRazerBlock": { "Content": "Razer Software Auto-Install - Disable", "Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", "Name": "SearchOrderConfig", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Device Installer", "Name": "DisableCoInstallers", "Value": "1", "Type": "DWord", "OriginalValue": "0" } ], "InvokeScript": [ " $RazerPath = \"C:\\Windows\\Installer\\Razer\" if (Test-Path $RazerPath) { Remove-Item $RazerPath\\* -Recurse -Force } else { New-Item -Path $RazerPath -ItemType Directory } icacls $RazerPath /deny \"Everyone:(W)\"" ], "UndoScript": [ " icacls \"C:\\Windows\\Installer\\Razer\" /remove:d Everyone " ] } } ``` -------------------------------- ### Apply Standard Winutil Preset Source: https://github.com/christitustech/winutil/blob/main/docs/content/userguide/automation/_index.md Run Winutil with the 'Standard' preset to apply common configurations automatically. This command downloads and executes the Winutil script. ```powershell & ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Preset Standard ``` -------------------------------- ### Configure Services Startup Type Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Services.md This JSON configuration defines settings for managing Windows services. It specifies the desired startup type for various services and includes a script to adjust system memory thresholds. ```json { "WPFTweaksServices": { "Content": "Services - Set to Manual", "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": [ { "Name": "CscService", "StartupType": "Disabled", "OriginalType": "Manual" }, { "Name": "DiagTrack", "StartupType": "Disabled", "OriginalType": "Automatic" }, { "Name": "MapsBroker", "StartupType": "Manual", "OriginalType": "Automatic" }, { "Name": "StorSvc", "StartupType": "Manual", "OriginalType": "Automatic" }, { "Name": "SharedAccess", "StartupType": "Disabled", "OriginalType": "Automatic" } ], "InvokeScript": [ " $Memory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum / 1KB Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory " ] } } ``` -------------------------------- ### Enable Legacy Recovery via bcdedit Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Features/EnableLegacyRecovery.md Use this command to set the boot policy to legacy, which enables the Advanced Boot Options screen accessible via the F8 key during startup. ```json "WPFFeatureEnableLegacyRecovery": { "Content": "Legacy F8 Boot Recovery - Enable", "Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", "category": "Features", "panel": "1", "feature": [], "InvokeScript": [ "bcdedit /set bootmenupolicy legacy" ] } ``` -------------------------------- ### Load JSON Configurations Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Loads application, tweak, and feature configurations from JSON files into the $sync.configs hashtable at startup. ```powershell $sync.configs = @{} $sync.configs.applications = Get-Content "config/applications.json" | ConvertFrom-Json $sync.configs.tweaks = Get-Content "config/tweaks.json" | ConvertFrom-Json $sync.configs.features = Get-Content "config/feature.json" | ConvertFrom-Json ``` -------------------------------- ### Disable Store Search Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/DisableStoreSearch.md This JSON snippet configures a tweak to disable recommended Microsoft Store apps in Start menu searches. It specifies the content, description, category, panel, and the scripts to invoke and undo the tweak. ```json "WPFTweaksDisableStoreSearch": { "Content": "Microsoft Store Recommended Search Results - Disable", "Description": "Will not display recommended Microsoft Store apps when searching for apps in the Start menu.", "category": "Essential Tweaks", "panel": "1", "InvokeScript": [ "icacls \"$Env:LocalAppData\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db\" /deny Everyone:F" ], "UndoScript": [ "icacls \"$Env:LocalAppData\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db\" /grant Everyone:F" ], ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/christitustech/winutil/blob/main/docs/content/CONTRIBUTING.md Change the current directory to the WinUtil project folder in PowerShell. ```powershell cd path\to\winutil ``` -------------------------------- ### Disable Windows Consumer Features Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md This JSON snippet configures the disabling of Windows Consumer Features via the registry. It specifies the path, name, value, and type for the registry entry that controls this setting. Use this to prevent automatic installation of store apps and games. ```json "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).", "category": "Essential Tweaks", "panel": "1", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", "Name": "DisableWindowsConsumerFeatures", "Value": "1", "Type": "DWord", "OriginalValue": "" } ], ``` -------------------------------- ### Winutil Project Directory Layout Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Shows the organization of files and directories within the Winutil project, including build scripts, core logic, functions, configuration, and documentation. ```text winutil/ ├── Compile.ps1 # Build script that combines all files ├── winutil.ps1 # Compiled output (generated) ├── scripts/ │ ├── main.ps1 # Entry point and GUI initialization │ └── start.ps1 # Startup logic ├── functions/ │ ├── private/ # Internal helper functions │ │ ├── Get-WinUtilVariables.ps1 │ │ ├── Install-WinUtilWinget.ps1 │ │ └── ... │ ├── public/ # User-facing functions │ │ ├── Initialize-WPFUI.ps1 │ │ └── ... ├── config/ # JSON configuration files │ ├── applications.json # Application definitions │ ├── tweaks.json # Tweak definitions │ ├── feature.json # Windows feature definitions │ └── preset.json # Preset configurations ├── xaml/ │ └── inputXML.xaml # GUI layout definition └── docs/ # Documentation ``` -------------------------------- ### Clone the WinUtil Repository Source: https://github.com/christitustech/winutil/blob/main/docs/content/CONTRIBUTING.md Clone your forked repository to your local machine and navigate into the project directory. ```bash git clone https://github.com/YOUR_USERNAME/winutil.git cd winutil ``` -------------------------------- ### Run Manual Tests Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Compile the project and execute tests using the -run flag. ```powershell # Compile and run with -run flag ."/Compile.ps1" -run ``` -------------------------------- ### Win11 Creator Data Flow Overview Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md This diagram outlines the sequential process of the Win11 Creator, from user ISO selection to final export. It highlights the main functions and their interactions. ```mermaid graph TD A[User selects official Windows 11 ISO] B(Invoke-WinUtilISOBrowse) C(Invoke-WinUtilISOMountAndVerify) D{User optionally enables Driver Injection} E(Invoke-WinUtilISOModify) F(Invoke-WinUtilISOExport) G(Invoke-WinUtilISOCleanAndReset) A --> B B --> C C --> D D --> E E --> F F --> G subgraph "Invoke-WinUtilISOMountAndVerify" C1[Mount ISO via Mount-DiskImage] C2[Verify install.wim or install.esd exists] C3[Check for "Windows 11" in image metadata] C4[Extract available editions] C5[Store ISO path, drive letter, WIM path, image info in $sync] end subgraph "Invoke-WinUtilISOModify" E1[Create work directory] E2[Copy ISO contents to disk] E3[Mount install.wim] E4[Invoke-WinUtilISOScript] E5[DISM /Cleanup-Image /StartComponentCleanup /ResetBase] E6[Dismount and save modified install.wim] E7[Export selected edition only] E8[Dismount source ISO] E9[Report completion] end subgraph "Invoke-WinUtilISOScript" E4A[Remove 40+ bloat AppX packages] E4B[Export and inject drivers] E4C[Remove OneDrive setup] E4D[Load offline registry hives] E4E[Apply 50+ registry tweaks] E4F[Delete telemetry scheduled task files] E4G[Pre-stage setup scripts] E4H[Unload registry hives] end subgraph "Invoke-WinUtilISOExport" F1[Option 1: Save as ISO] F2[Option 2: Write to USB] end C --> C1 & C2 & C3 & C4 & C5 E --> E1 & E2 & E3 & E4 & E5 & E6 & E7 & E8 & E9 E3 --> E4 E4 --> E4A & E4B & E4C & E4D & E4E & E4F & E4G & E4H E6 --> E7 E7 --> E8 E8 --> E9 F --> F1 & F2 ``` -------------------------------- ### Apply WinUtil Preset Source: https://github.com/christitustech/winutil/blob/main/README.md Apply a predefined configuration like 'Standard', 'Minimal', or 'Advanced' using this command. Ensure PowerShell is run as administrator. ```powershell & ([ScriptBlock]::Create((irm https://christitus.com/win))) -Preset Standard ``` -------------------------------- ### Apply Custom Winutil Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/userguide/automation/_index.md Launch Winutil using a custom exported JSON configuration file. This is useful for applying specific settings across multiple machines or after a Windows reinstallation. ```powershell & ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Config "C:\Path\To\Config.json" ``` -------------------------------- ### Tweak Application Flow Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Details the process for applying system tweaks selected by the user, including loading definitions and invoking changes. ```powershell User selects tweaks and clicks "Run Tweaks" ↓ Get-WinUtilCheckBoxes → Get selected tweaks ↓ For each selected tweak: ↓ Load tweak definition from tweaks.json ↓ Invoke-WPFTweak → Apply registry/service changes ↓ Log changes ↓ Store original values (for undo) ↓ Update UI ↓ Display completion ``` -------------------------------- ### Add New Tweak Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Defines a new system tweak by editing the tweaks.json configuration file, including registry modifications. ```json { "WPFTweaksNewTweak": { "Content": "New Tweak", "Description": "What it does", "category": "Essential Tweaks", "registry": [ { "Path": "HKLM:\\Path\\To\\Key", "Name": "ValueName", "Type": "DWord", "Value": "1", "OriginalValue": "0" } ] } } ``` -------------------------------- ### Enable Battery Percentage in System Tray (JSON Config) Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/BatteryPercentage.md This JSON configuration snippet enables the 'System Tray Battery Percentage' tweak. It specifies the content, description, category, panel, type, and registry modifications required. ```json "WPFToggleBatteryPercentage": { "Content": "System Tray Battery Percentage", "Description": "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": "", "DefaultState": "false" } ], ``` -------------------------------- ### Enable Verbose Logon Mode Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md This JSON snippet configures the 'WPFToggleVerboseLogon' setting to display detailed messages during Windows startup and shutdown. It specifies the registry path, name, and value to be modified. ```json { "WPFToggleVerboseLogon": { "Content": "Logon Verbose Mode", "Description": "Show detailed messages during startup/shutdown.", "category": "Customize Preferences", "panel": "2", "Type": "Toggle", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "Name": "VerboseStatus", "Value": "1", "Type": "DWord", "OriginalValue": "0", "DefaultState": "false" } ] } } ``` -------------------------------- ### Enable Right-Click Menu Previous Layout Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md This JSON configuration defines the settings for the 'Right-Click Menu Previous Layout - Enable' tweak. It specifies registry paths, values, and PowerShell scripts for both enabling and undoing the change. ```json { "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.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", "registry": [ { "Path": "HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32", "Name": "(default)", "Value": "", "Type": "String", "OriginalValue": "" } ], "InvokeScript": [ " New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"" Write-Host Restarting explorer.exe ... Stop-Process -Name \"explorer\" -Force " ], "UndoScript": [ " Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse -Confirm:$false -Force # Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure. Write-Host Restarting explorer.exe ... Stop-Process -Name \"explorer\" -Force " ] } } ``` -------------------------------- ### Configure Restore Point Creation Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md This JSON configuration enables the creation of a system restore point. It specifies the description, category, and registry modifications required. The InvokeScript section contains PowerShell commands to ensure restore point creation is enabled and then creates a new restore point. ```json "WPFTweaksRestorePoint": { "Content": "Restore Point - Create", "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.", "category": "Essential Tweaks", "panel": "1", "Checked": "False", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore", "Name": "SystemRestorePointCreationFrequency", "Value": "0", "Type": "DWord", "OriginalValue": "1440" } ], "InvokeScript": [ " if (-not (Get-ComputerRestorePoint)) { Enable-ComputerRestore -Drive $Env:SystemDrive } Checkpoint-Computer -Description \"System Restore Point created by WinUtil\" -RestorePointType MODIFY_SETTINGS Write-Host \"System Restore Point Created Successfully\" -ForegroundColor Green " ] } ``` -------------------------------- ### Configure Disk Cleanup Tweak Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md This JSON snippet configures the 'WPFTweaksDiskCleanup' setting, which invokes Disk Cleanup and component cleanup commands. ```json "WPFTweaksDiskCleanup": { "Content": "Disk Cleanup - Run", "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", "category": "Essential Tweaks", "panel": "1", "InvokeScript": [ " cleanmgr.exe /d C: /VERYLOWDISK Dism.exe /online /Cleanup-Image /ResetBase " ] } ``` -------------------------------- ### Review Code Differences Source: https://github.com/christitustech/winutil/blob/main/docs/content/CONTRIBUTING.md Use git diff to inspect the specific changes made to your files before committing. ```bash git diff ``` -------------------------------- ### Enable Registry Backup Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Features/RegBackup.md This JSON snippet configures the 'WPFFeatureRegBackup' feature to enable daily registry backups. It sets registry properties and registers a scheduled task named 'AutoRegBackup' to run the 'RegIdleBackup' task daily at 00:30. ```json "WPFFeatureRegBackup": { "Content": "Registry Backup (Daily Task 12:30am) - Enable", "Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.", "category": "Features", "panel": "1", "feature": [], "InvokeScript": [ " New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force $action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn \"\\Microsoft\\Windows\\Registry\\RegIdleBackup\"' $trigger = New-ScheduledTaskTrigger -Daily -At 00:30 Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System' " ], ``` -------------------------------- ### Winutil High-Level Architecture Diagram Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/architecture.md Illustrates the layered architecture of Winutil, showing the interaction between the WPF GUI, public/private APIs, configuration files, and external tools. ```text ┌─────────────────────────────────────────────────────┐ │ Winutil GUI │ │ (WPF XAML Interface) │ └──────────────────┬──────────────────────────────────┘ │ ┌─────────┴─────────┐ │ │ ┌────────▼──────┐ ┌───────▼────────┐ │ Public APIs │ │ Private APIs │ │ (User-facing)│ │ (Internal) │ └───────┬───────┘ └───────┬────────┘ │ │ └────────┬──────────┘ │ ┌────────────▼────────────┐ │ Configuration Files │ │ (JSON definitions) │ └────────────┬────────────┘ │ ┌────────────▼────────────┐ │ External Tools │ │ (WinGet, Chocolatey) │ └─────────────────────────┘ ``` -------------------------------- ### Stage All Changes for Commit Source: https://github.com/christitustech/winutil/blob/main/docs/content/CONTRIBUTING.md Stage all modified files in the current directory for the next commit. ```bash git add . ``` -------------------------------- ### WSL Feature Configuration Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Features/wsl.md This JSON snippet defines the configuration for enabling the Windows Subsystem for Linux (WSL) feature. It includes the feature name, description, category, panel, and required underlying Windows features. ```json "WPFFeaturewsl": { "Content": "Windows Subsystem for Linux (WSL) - Enable", "Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.", "category": "Features", "panel": "1", "feature": [ "VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux" ], "InvokeScript": [], ``` -------------------------------- ### Enable Windows Sandbox Feature Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/features/Features/Sandbox.md This JSON snippet configures the 'WPFFeaturesSandbox' feature to enable Windows Sandbox. It specifies the content, description, category, panel, and associated features. ```json "WPFFeaturesSandbox": { "Content": "Windows Sandbox - Enable", "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", "category": "Features", "panel": "1", "feature": [ "Containers-DisposableClientVM" ], ``` -------------------------------- ### Configure Display Performance Tweaks Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md This JSON configuration defines registry modifications to set visual effects to best performance. It includes paths, names, values, and types for various registry keys. The InvokeScript applies these changes, and UndoScript reverts them. ```json { "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.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", "registry": [ { "Path": "HKCU:\\Control Panel\\Desktop", "Name": "DragFullWindows", "Value": "0", "Type": "String", "OriginalValue": "1" }, { "Path": "HKCU:\\Control Panel\\Desktop", "Name": "MenuShowDelay", "Value": "200", "Type": "String", "OriginalValue": "400" }, { "Path": "HKCU:\\Control Panel\\Desktop\\WindowMetrics", "Name": "MinAnimate", "Value": "0", "Type": "String", "OriginalValue": "1" }, { "Path": "HKCU:\\Control Panel\\Keyboard", "Name": "KeyboardDelay", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "ListviewAlphaSelect", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "ListviewShadow", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "TaskbarAnimations", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VisualEffects", "Name": "VisualFXSetting", "Value": "3", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\DWM", "Name": "EnableAeroPeek", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "TaskbarMn", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "ShowTaskViewButton", "Value": "0", "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", "Name": "SearchboxTaskbarMode", "Value": "0", "Type": "DWord", "OriginalValue": "1" } ], "InvokeScript": [ "Set-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0))" ], "UndoScript": [ "Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\"" ] } } ``` -------------------------------- ### Reinstall WinGet via Winutil Source: https://github.com/christitustech/winutil/blob/main/docs/content/faq.md Use this command within the Winutil 'Config' tab to reinstall the Windows Package Manager (WinGet) if it is not functioning correctly. ```powershell WinGet Reinstall ``` -------------------------------- ### Configure Num Lock on Startup Source: https://github.com/christitustech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/NumLock.md This JSON snippet configures the 'WPFToggleNumLock' tweak to set the Num Lock state on startup. It specifies registry paths and values to modify for both the default user and the current user. ```json "WPFToggleNumLock": { "Content": "Num Lock on Startup", "Description": "Toggle the Num Lock key state when your computer starts.", "category": "Customize Preferences", "panel": "2", "Type": "Toggle", "registry": [ { "Path": "HKU:\\.Default\\Control Panel\\Keyboard", "Name": "InitialKeyboardIndicators", "Value": "2", "Type": "String", "OriginalValue": "0", "DefaultState": "false" }, { "Path": "HKCU:\\Control Panel\\Keyboard", "Name": "InitialKeyboardIndicators", "Value": "2", "Type": "String", "OriginalValue": "0", "DefaultState": "false" } ], ```