mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 14:06:27 +00:00
Release 2026.03.09 (#514)
- Moved all config files to a dedicated `Config` folder. This includes `Features.json`, `DefaultSettings,json`, `Apps.json`, `LastUsedSettings.json` and `CustomAppsList` - Updated CONTRIBUTING.md file - Replaced support button with a `Report a bug` button when script encounters an error when applying changes - Fixed error with importing modules when launching the script from PowerShell 7 (#510) - Add option to hide the 'All Apps' section from the start menu (#513)
This commit is contained in:
32
.github/CONTRIBUTING.md
vendored
32
.github/CONTRIBUTING.md
vendored
@@ -59,16 +59,16 @@ Understanding the project structure is essential for contributing effectively:
|
|||||||
|
|
||||||
```
|
```
|
||||||
Win11Debloat/
|
Win11Debloat/
|
||||||
├── Win11Debloat.ps1 # Main PowerShell script
|
├── Win11Debloat.ps1 # Main PowerShell script
|
||||||
├── Apps.json # List of supported apps for removal
|
├── Scripts/ # Additional PowerShell scripts and functions
|
||||||
├── DefaultSettings.json # Default configuration preset
|
│ └── Get.ps1 # Script used for the quick launch method to automatically download and run Win11debloat
|
||||||
├── LastUsedSettings.json # Last used configuration (generated during use)
|
├── Config/
|
||||||
├── Assets/
|
│ ├── Apps.json # List of supported apps for removal
|
||||||
│ └── Features.json # All features with metadata
|
│ ├── DefaultSettings.json # Default configuration preset
|
||||||
├── Regfiles/ # Registry files for each feature
|
│ ├── Features.json # All features with metadata
|
||||||
├── Schemas/ # XAML Schemas for GUI elements
|
│ └── LastUsedSettings.json # Last used configuration (generated during use)
|
||||||
└── Scripts/ # Additional PowerShell scripts and functions
|
├── Regfiles/ # Registry files for each feature
|
||||||
└── Get.ps1 # Script used for the quick launch method to automatically download and run Win11debloat
|
└── Schemas/ # XAML Schemas for GUI elements
|
||||||
```
|
```
|
||||||
|
|
||||||
### Best Practices
|
### Best Practices
|
||||||
@@ -131,7 +131,7 @@ To add a new app that can be removed via Win11Debloat:
|
|||||||
Get-AppxPackage | Select-Object Name, PackageFullName
|
Get-AppxPackage | Select-Object Name, PackageFullName
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Edit `Apps.json`**: Add a new entry to the `"Apps"` array:
|
2. **Edit `Config/Apps.json`**: Add a new entry to the `"Apps"` array:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"FriendlyName": "Display Name",
|
"FriendlyName": "Display Name",
|
||||||
@@ -148,7 +148,7 @@ To add a new app that can be removed via Win11Debloat:
|
|||||||
|
|
||||||
### Adding a New Feature
|
### Adding a New Feature
|
||||||
|
|
||||||
Features are defined in `Assets/Features.json` and can modify Windows settings via registry files or PowerShell commands.
|
Features are defined in `Config/Features.json` and can modify Windows settings via registry files or PowerShell commands.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> For simple features that just include a registry change, no actual coding is required in the main script except for adding the corresponding command-line parameters. The GUI is automatically built using the information in the Features.json file.
|
> For simple features that just include a registry change, no actual coding is required in the main script except for adding the corresponding command-line parameters. The GUI is automatically built using the information in the Features.json file.
|
||||||
@@ -183,7 +183,7 @@ If your feature requires more than just applying a registry file, add custom log
|
|||||||
|
|
||||||
#### 2. Add Feature to Features.json
|
#### 2. Add Feature to Features.json
|
||||||
|
|
||||||
Add your feature to the `"Features"` array in `Assets/Features.json`:
|
Add your feature to the `"Features"` array in `Config/Features.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -230,7 +230,7 @@ Add a corresponding parameter to both `Win11Debloat.ps1` AND `Scripts/Get.ps1`,
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The default preset is intentionally conservative. Features added to it should be thoroughly tested and widely beneficial. When in doubt, leave the feature out of the default preset.
|
> The default preset is intentionally conservative. Features added to it should be thoroughly tested and widely beneficial. When in doubt, leave the feature out of the default preset.
|
||||||
|
|
||||||
The default preset (`DefaultSettings.json`) defines which features are automatically applied when users run Win11Debloat in "Default Mode" or with the `-RunDefaults` parameter. This preset should include features that are widely considered to improve the Windows experience without breaking functionality.
|
The default preset (`Config/DefaultSettings.json`) defines which features are automatically applied when users run Win11Debloat in "Default Mode" or with the `-RunDefaults` parameter. This preset should include features that are widely considered to improve the Windows experience without breaking functionality.
|
||||||
|
|
||||||
**When to add a feature to the default preset:**
|
**When to add a feature to the default preset:**
|
||||||
- The feature removes obvious bloatware or distractions
|
- The feature removes obvious bloatware or distractions
|
||||||
@@ -244,7 +244,7 @@ The default preset (`DefaultSettings.json`) defines which features are automatic
|
|||||||
- The feature is highly opinionated or preference-based
|
- The feature is highly opinionated or preference-based
|
||||||
- The feature is experimental or not thoroughly tested
|
- The feature is experimental or not thoroughly tested
|
||||||
|
|
||||||
To add your feature to the default preset, edit `DefaultSettings.json` and add a new entry to the `"Settings"` array:
|
To add your feature to the default preset, edit `Config/DefaultSettings.json` and add a new entry to the `"Settings"` array:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -282,7 +282,7 @@ To add your feature to the default preset, edit `DefaultSettings.json` and add a
|
|||||||
|
|
||||||
To add a new category for organizing features:
|
To add a new category for organizing features:
|
||||||
|
|
||||||
- Add a new category entry to the `"Categories"` array in `Assets/Features.json`:
|
- Add a new category entry to the `"Categories"` array in `Config/Features.json`:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Name": "Your Category Name",
|
"Name": "Your Category Name",
|
||||||
|
|||||||
@@ -575,6 +575,19 @@
|
|||||||
"MinVersion": 22621,
|
"MinVersion": 22621,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "DisableStartAllApps",
|
||||||
|
"Label": "'All Apps' section in the start menu",
|
||||||
|
"ToolTip": "This will hide the 'All Apps' section in the start menu, which shows all installed apps. WARNING: Hiding this section may make it harder to find installed apps on your system. This feature uses policies, which will lock down certain settings.",
|
||||||
|
"Category": "Start Menu & Search",
|
||||||
|
"Action": "Hide",
|
||||||
|
"RegistryKey": "Disable_Start_All_Apps.reg",
|
||||||
|
"ApplyText": "Disabling the 'All Apps' section in the start menu...",
|
||||||
|
"UndoAction": "Show",
|
||||||
|
"RegistryUndoKey": "Enable_Start_All_Apps.reg",
|
||||||
|
"MinVersion": 26200,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "DisableStartPhoneLink",
|
"FeatureId": "DisableStartPhoneLink",
|
||||||
"Label": "Phone Link integration in the start menu",
|
"Label": "Phone Link integration in the start menu",
|
||||||
@@ -129,8 +129,9 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
|
|
||||||
#### Start Menu & Search
|
#### Start Menu & Search
|
||||||
|
|
||||||
- Remove or replace all pinned apps from start for the current user, or for all existing & new users. (W11 only)
|
- Remove or replace all pinned apps from the start menu. (W11 only)
|
||||||
- Disable the recommended section in the start menu. (W11 only)
|
- Hide the recommended section in the start menu. (W11 only)
|
||||||
|
- Hide the 'All Apps' section in the start menu. (W11 only)
|
||||||
- Disable the Phone Link mobile devices integration in the start menu. (W11 only)
|
- Disable the Phone Link mobile devices integration in the start menu. (W11 only)
|
||||||
- Disable Bing web search & Copilot integration in Windows search.
|
- Disable Bing web search & Copilot integration in Windows search.
|
||||||
- Disable Microsoft Store app suggestions in Windows search. (W11 only)
|
- Disable Microsoft Store app suggestions in Windows search. (W11 only)
|
||||||
|
|||||||
4
Regfiles/Disable_Start_All_Apps.reg
Normal file
4
Regfiles/Disable_Start_All_Apps.reg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
|
||||||
|
"NoStartMenuMorePrograms"=dword:00000001
|
||||||
4
Regfiles/Sysprep/Disable_Start_All_Apps.reg
Normal file
4
Regfiles/Sysprep/Disable_Start_All_Apps.reg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
|
||||||
|
"NoStartMenuMorePrograms"=dword:00000001
|
||||||
7
Regfiles/Undo/Enable_Start_All_Apps.reg
Normal file
7
Regfiles/Undo/Enable_Start_All_Apps.reg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
|
||||||
|
"NoStartMenuMorePrograms"=-
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
|
||||||
|
"NoStartMenuMorePrograms"=-
|
||||||
@@ -87,6 +87,7 @@ function Show-ApplyModal {
|
|||||||
$script:ApplyStepNameEl.Text = "Preparing..."
|
$script:ApplyStepNameEl.Text = "Preparing..."
|
||||||
$script:ApplyStepCounterEl.Text = "Preparing..."
|
$script:ApplyStepCounterEl.Text = "Preparing..."
|
||||||
$script:ApplyProgressBarEl.Value = 0
|
$script:ApplyProgressBarEl.Value = 0
|
||||||
|
$script:ApplyModalInErrorState = $false
|
||||||
|
|
||||||
# Set up progress callback for ExecuteAllChanges
|
# Set up progress callback for ExecuteAllChanges
|
||||||
$script:ApplyProgressCallback = {
|
$script:ApplyProgressCallback = {
|
||||||
@@ -192,6 +193,23 @@ function Show-ApplyModal {
|
|||||||
$script:ApplyCompletionIconEl.Foreground = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#c42b1c"))
|
$script:ApplyCompletionIconEl.Foreground = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#c42b1c"))
|
||||||
$script:ApplyCompletionTitleEl.Text = "Error"
|
$script:ApplyCompletionTitleEl.Text = "Error"
|
||||||
$script:ApplyCompletionMessageEl.Text = "An error occurred while applying changes: $($_.Exception.Message)"
|
$script:ApplyCompletionMessageEl.Text = "An error occurred while applying changes: $($_.Exception.Message)"
|
||||||
|
|
||||||
|
# Set error state to change Kofi button to report link
|
||||||
|
$script:ApplyModalInErrorState = $true
|
||||||
|
|
||||||
|
# Update Kofi button to be a report issue button
|
||||||
|
$applyKofiBtn.Content = $null
|
||||||
|
|
||||||
|
$reportText = [System.Windows.Controls.TextBlock]::new()
|
||||||
|
$reportText.Text = 'Report a bug'
|
||||||
|
$reportText.VerticalAlignment = 'Center'
|
||||||
|
$reportText.FontSize = 14
|
||||||
|
$reportText.Margin = [System.Windows.Thickness]::new(0, 0, 0, 1)
|
||||||
|
|
||||||
|
$applyKofiBtn.Content = $reportText
|
||||||
|
|
||||||
|
[System.Windows.Automation.AutomationProperties]::SetName($applyKofiBtn, 'Report a bug')
|
||||||
|
|
||||||
$applyWindow.Dispatcher.Invoke([System.Windows.Threading.DispatcherPriority]::Render, [action]{})
|
$applyWindow.Dispatcher.Invoke([System.Windows.Threading.DispatcherPriority]::Render, [action]{})
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
@@ -206,7 +224,11 @@ function Show-ApplyModal {
|
|||||||
})
|
})
|
||||||
|
|
||||||
$applyKofiBtn.Add_Click({
|
$applyKofiBtn.Add_Click({
|
||||||
Start-Process "https://ko-fi.com/raphire"
|
if ($script:ApplyModalInErrorState) {
|
||||||
|
Start-Process "https://github.com/Raphire/Win11Debloat/issues/new"
|
||||||
|
} else {
|
||||||
|
Start-Process "https://ko-fi.com/raphire"
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$applyCancelBtn.Add_Click({
|
$applyCancelBtn.Add_Click({
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ param (
|
|||||||
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||||
[switch]$HideTaskview,
|
[switch]$HideTaskview,
|
||||||
[switch]$DisableStartRecommended,
|
[switch]$DisableStartRecommended,
|
||||||
|
[switch]$DisableStartAllApps,
|
||||||
[switch]$DisableStartPhoneLink,
|
[switch]$DisableStartPhoneLink,
|
||||||
[switch]$DisableCopilot,
|
[switch]$DisableCopilot,
|
||||||
[switch]$DisableRecall,
|
[switch]$DisableRecall,
|
||||||
@@ -166,6 +167,12 @@ else {
|
|||||||
$windowStyle = "Normal"
|
$windowStyle = "Normal"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove Powershell 7 modules from path to prevent module loading issues in the script
|
||||||
|
if ($PSVersionTable.PSVersion.Major -ge 7) {
|
||||||
|
$NewPSModulePath = $env:PSModulePath -split ';' | Where-Object -FilterScript { $_ -like '*WindowsPowerShell*' }
|
||||||
|
$env:PSModulePath = $NewPSModulePath -join ';'
|
||||||
|
}
|
||||||
|
|
||||||
# Run Win11Debloat script with the provided arguments
|
# Run Win11Debloat script with the provided arguments
|
||||||
$debloatProcess = Start-Process powershell.exe -WindowStyle $windowStyle -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat.ps1 $arguments" -Verb RunAs
|
$debloatProcess = Start-Process powershell.exe -WindowStyle $windowStyle -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat.ps1 $arguments" -Verb RunAs
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ param (
|
|||||||
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||||
[switch]$HideTaskview,
|
[switch]$HideTaskview,
|
||||||
[switch]$DisableStartRecommended,
|
[switch]$DisableStartRecommended,
|
||||||
|
[switch]$DisableStartAllApps,
|
||||||
[switch]$DisableStartPhoneLink,
|
[switch]$DisableStartPhoneLink,
|
||||||
[switch]$DisableCopilot,
|
[switch]$DisableCopilot,
|
||||||
[switch]$DisableRecall,
|
[switch]$DisableRecall,
|
||||||
@@ -102,11 +103,12 @@ param (
|
|||||||
|
|
||||||
|
|
||||||
# Define script-level variables & paths
|
# Define script-level variables & paths
|
||||||
$script:Version = "2026.03.07"
|
$script:Version = "2026.03.09"
|
||||||
$script:DefaultSettingsFilePath = "$PSScriptRoot/DefaultSettings.json"
|
$script:AppsListFilePath = "$PSScriptRoot/Config/Apps.json"
|
||||||
$script:AppsListFilePath = "$PSScriptRoot/Apps.json"
|
$script:DefaultSettingsFilePath = "$PSScriptRoot/Config/DefaultSettings.json"
|
||||||
$script:SavedSettingsFilePath = "$PSScriptRoot/LastUsedSettings.json"
|
$script:FeaturesFilePath = "$PSScriptRoot/Config/Features.json"
|
||||||
$script:CustomAppsListFilePath = "$PSScriptRoot/CustomAppsList"
|
$script:SavedSettingsFilePath = "$PSScriptRoot/Config/LastUsedSettings.json"
|
||||||
|
$script:CustomAppsListFilePath = "$PSScriptRoot/Config/CustomAppsList"
|
||||||
$script:DefaultLogPath = "$PSScriptRoot/Logs/Win11Debloat.log"
|
$script:DefaultLogPath = "$PSScriptRoot/Logs/Win11Debloat.log"
|
||||||
$script:RegfilesPath = "$PSScriptRoot/Regfiles"
|
$script:RegfilesPath = "$PSScriptRoot/Regfiles"
|
||||||
$script:AssetsPath = "$PSScriptRoot/Assets"
|
$script:AssetsPath = "$PSScriptRoot/Assets"
|
||||||
@@ -116,7 +118,6 @@ $script:MessageBoxSchema = "$PSScriptRoot/Schemas/MessageBoxWindow.xaml"
|
|||||||
$script:AboutWindowSchema = "$PSScriptRoot/Schemas/AboutWindow.xaml"
|
$script:AboutWindowSchema = "$PSScriptRoot/Schemas/AboutWindow.xaml"
|
||||||
$script:ApplyChangesWindowSchema = "$PSScriptRoot/Schemas/ApplyChangesWindow.xaml"
|
$script:ApplyChangesWindowSchema = "$PSScriptRoot/Schemas/ApplyChangesWindow.xaml"
|
||||||
$script:SharedStylesSchema = "$PSScriptRoot/Schemas/SharedStyles.xaml"
|
$script:SharedStylesSchema = "$PSScriptRoot/Schemas/SharedStyles.xaml"
|
||||||
$script:FeaturesFilePath = "$script:AssetsPath/Features.json"
|
|
||||||
|
|
||||||
$script:ControlParams = 'WhatIf', 'Confirm', 'Verbose', 'Debug', 'LogPath', 'Silent', 'Sysprep', 'User', 'NoRestartExplorer', 'RunDefaults', 'RunDefaultsLite', 'RunSavedSettings', 'RunAppsListGenerator', 'CLI', 'AppRemovalTarget'
|
$script:ControlParams = 'WhatIf', 'Confirm', 'Verbose', 'Debug', 'LogPath', 'Silent', 'Sysprep', 'User', 'NoRestartExplorer', 'RunDefaults', 'RunDefaultsLite', 'RunSavedSettings', 'RunAppsListGenerator', 'CLI', 'AppRemovalTarget'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user