87 Commits

Author SHA1 Message Date
Raphire
c6535803ec Bump version 2026-03-15 22:59:37 +01:00
Jeffrey
c37bdcf5f2 Improve app page with sorting, recommendations and more (#520) 2026-03-15 22:58:06 +01:00
Jeffrey
d187679cd0 Add bubble hint to guide users to review the selected changes after clicking Default Mode button (#519) 2026-03-15 20:16:53 +01:00
Raphire
06f8f9eb6a Fix problem with unpacking script when old Config files exist 2026-03-10 00:39:53 +01:00
Jeffrey
8d5295d831 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)
2026-03-09 23:36:24 +01:00
Raphire
260a143509 Bump version 2026-03-09 23:32:13 +01:00
Raphire
94e5c95d57 Remove Powershell 7 modules from path to prevent module loading issues in the script 2026-03-09 23:21:22 +01:00
Raphire
8401474a79 Add option to hide the 'All Apps' section from the start menu (#513) 2026-03-09 23:03:56 +01:00
Raphire
992c80bc1e Launch main script using pwsh.exe when Get.ps1 is run in Powershell 7 2026-03-09 22:49:07 +01:00
Jeffrey
18823c4a80 Import Microsoft.PowerShell.Security module 2026-03-09 01:47:32 +01:00
Raphire
3d6259f117 When script encounters an error, show button for reporting the issue 2026-03-08 22:31:09 +01:00
Raphire
1ea82b9728 Merge branch 'master' into develop 2026-03-08 17:12:12 +01:00
Raphire
df20b007ca Update CONTRIBUTING.md 2026-03-08 17:10:22 +01:00
Raphire
0887eaadfd Merge branch 'master' into develop 2026-03-08 17:04:05 +01:00
Raphire
eb3e041ed6 Update README.md 2026-03-08 17:03:46 +01:00
Raphire
63a219d3e7 Update CONTRIBUTING.md 2026-03-08 02:15:15 +01:00
Raphire
9467d6cb7b Update CONTRIBUTING.md 2026-03-08 02:14:28 +01:00
Raphire
ea9b3ce02b Update CONTRIBUTING.md with best practices and common pitfalls for contributors 2026-03-08 02:07:35 +01:00
Raphire
1eeacf3351 Move Config files to Config folder 2026-03-08 01:34:53 +01:00
Raphire
e8adac1852 Add CONTRIBUTING.md file 2026-03-08 01:03:44 +01:00
Raphire
ec99a1c619 Update README script image 2026-03-08 01:00:54 +01:00
Raphire
238a48d39b Bump version 2026-03-07 20:42:23 +01:00
Jeffrey
9afd4ee02e Add option to disable Storage Sense automatic disk cleanup (#507) 2026-03-07 20:29:08 +01:00
Jeffrey
70f8170e81 Add option to disable WSAIFabric service from automatically starting (#501) 2026-03-07 20:28:58 +01:00
Jeffrey
ad0b49060a Add option to disable MS Store app results in Windows Search (#509)
This also includes:

* Update README for DisableSearchHighlights and DisableFindMyDevice

* Extracted more logic from main script into separate scripts

* Add event handler for tab changes to regenerate overview
2026-03-07 20:28:48 +01:00
@lexlucas
bbfbd7193e Add Search Highlights, Find My Device toggles and Lenovo/Dell OEM apps (#508) 2026-03-07 19:32:06 +01:00
Raphire
495762e378 Update feature label for Bing integration and rename Previous button to Back 2026-03-07 16:14:05 +01:00
Raphire
7c3af36e06 Update styling of ApplyChangesWindow 2026-03-07 16:04:14 +01:00
Jeffrey
c72e4fcb54 Add warning about some changes requiring a reboot & fix focus loss after Explorer restart (#506) 2026-03-07 15:53:58 +01:00
Raphire
8956c41b4d Update changes applied text 2026-03-07 15:17:03 +01:00
Anonymoussaurus
33ce8d6f70 Update app description for MS Edge to note impact on Windows Sandbox (#491)
Co-authored-by: Raphire <9938813+Raphire@users.noreply.github.com>
2026-03-07 15:03:42 +01:00
Jeffrey
a1907c2a78 Improve & simplify the overview/apply changes pages (#505) 2026-03-07 14:49:29 +01:00
Jeffrey
b5b67290de Fix Search Icon and Label options (#504)
As reported in #503
2026-03-05 23:22:45 +01:00
Raphire
d25960de64 Update feature descriptions 2026-03-05 20:49:14 +01:00
Raphire
ea67435f64 Bump version 2026-02-19 22:45:13 +01:00
Jeffrey
a611e6b128 Update winget check (#484) 2026-02-19 22:44:50 +01:00
Jeffrey
033fa1b8af Fix force remove edge prompt (#483) 2026-02-19 22:26:17 +01:00
Raphire
1b6aa00bdd Update README.md image 2026-02-18 21:54:18 +01:00
Jeffrey
7d00b84a07 Add option to quickly apply default settings from home page (#479) 2026-02-18 21:39:00 +01:00
Raphire
15775d9dc8 Bump version 2026-02-18 21:01:07 +01:00
Raphire
2cb9f41db1 Disable Location Services via policy instead 2026-02-18 20:59:24 +01:00
Jeffrey
e496aa3af0 Add option to disable location services (#478) 2026-02-18 20:53:53 +01:00
Raphire
b355706cee Move Windows Search history option 2026-02-18 20:35:22 +01:00
Raphire
810fb3be43 Move Windows Search history option 2026-02-18 20:34:49 +01:00
Raphire
9500c2099e Update finish button styling 2026-02-18 20:33:17 +01:00
Raphire
d172a0ef0c Update System Tweaks description 2026-02-18 20:33:05 +01:00
Raphire
c76c3ce7ac Improve Windows feature enabling 2026-02-18 19:07:21 +01:00
Jeffrey
2c940ff489 Add option to disable Windows search history, enable Windows Sandbox and enable WSL (#477)
* Add option to disable local Windows search history
* Add option to enable Windows Sandbox and WSL
2026-02-18 19:00:49 +01:00
Raphire
e0e69c0ef5 Update app table header color 2026-02-18 17:32:23 +01:00
Raphire
c9ce72f79a Increase font size for column headers in app table 2026-02-18 00:36:11 +01:00
Raphire
397eba7ca8 Update app name label for clarity 2026-02-18 00:33:46 +01:00
Raphire
bffa6dfc3e Update app name/descriptions 2026-02-18 00:30:02 +01:00
Raphire
754c3cee4c Improve app page with table-like structure 2026-02-18 00:26:10 +01:00
Raphire
f47b0531a4 Update app tooltip descriptions 2026-02-17 00:11:55 +01:00
Raphire
6427b35bc8 Fix CreateRestorePoint Timeout 2026-02-15 23:50:32 +01:00
Raphire
60e8985db0 Update tooltips 2026-02-15 23:34:46 +01:00
Raphire
6589dab528 Bump release 2026-02-15 23:24:26 +01:00
Raphire
2a9a3960b8 Update menu.png image 2026-02-15 23:23:51 +01:00
Jeffrey
65aabbc050 Refactor code structure for improved readability and maintainability (#473)
* Add ToolTips to Tweaks
2026-02-15 23:08:54 +01:00
Jeffrey
95dc490b6e Add tweak category icons (#471) 2026-02-15 16:59:25 +01:00
Jeffrey
687c089f2e Prompt after failure to create restore point (#469) 2026-02-15 16:54:01 +01:00
Jeffrey
5dcc8bffdd Add titlebar menu and MessageBox styling (#470) 2026-02-15 16:53:41 +01:00
Raphire
f9b4cec417 Update README.md links to wiki 2026-02-12 23:55:47 +01:00
Jeffrey
0e7b289d03 Add Multi-tasking settings (#458)
- Disable window snapping
- Disable Snap Assist
- Disable Snap Layouts
- Change showing tabs when snapping or pressing Alt+Tab
2026-02-12 23:14:15 +01:00
Jeffrey
feef8f76b9 Add option to select target user(s) for app removal (#462) 2026-02-12 22:50:22 +01:00
Jeffrey
50db66bb5f Fix styling for other user input box (#459) 2026-02-11 22:27:50 +01:00
Raphire
b48fa24627 Improve DisableEdgeAds feature
This will now also disable:
- The first run experience
- Default browser prompts
- Adobe Acrobat buttons/ads
- Spotlight experiences and recommendations
2026-02-10 21:11:46 +01:00
Raphire
f8c2c6ddd7 Fix Header styling on Applying Changes page 2026-02-07 19:18:09 +01:00
Raphire
1ea2c63522 Add link to wiki next to tweak category headers 2026-02-07 15:42:06 +01:00
Raphire
675882cb3b Fix key in Enable_Game_Bar_Integration.reg 2026-02-07 15:06:45 +01:00
Raphire
ae4d19f59c Update Start/Apply button styling 2026-02-07 01:40:28 +01:00
Jeffrey
327f4ee7ab Allow forceful MS Edge removal via GUI, remove max version from DisableStartRecommended (#454) 2026-02-06 23:45:47 +01:00
Jeffrey
3af62159a5 UI improvements & cancel execution when closing during execution (#455) 2026-02-06 23:44:39 +01:00
Raphire
6e65a07184 Add missing switches for Windows Update settings 2026-02-04 14:01:04 +01:00
Jeffrey
84bff3ab0c Add option to disable BitLocker automatic device encryption (#451) 2026-02-04 13:59:10 +01:00
Jeffrey
46deca7703 Add Windows Update Settings (#450)
- Prevent getting updates as soon as they're available
- Prevent automatic restarts after updates while signed in
- Disable sharing downloaded updates with other PCs
2026-02-04 13:47:47 +01:00
Jeffrey
6a3f244f9b Support Ctrl+F for search boxes (#449) 2026-02-04 11:43:36 +01:00
Jeffrey
75d783cc63 Make GUI resizable (#448) 2026-02-04 11:34:55 +01:00
Jeffrey
afdb66b5d4 Fix crash on clearing Start menu pinned apps for all users (#447)
As reported in #445
2026-02-04 10:26:55 +01:00
Jeffrey
6a1a091a87 Add search bar to tweak page (#440) 2026-02-02 21:54:40 +01:00
Raphire
1ef8992320 Respect NoRestartExplorer flag in GUI 2026-02-02 21:52:09 +01:00
Jeffrey
59d0e83238 Remove sponsorship (#442) 2026-02-02 20:43:59 +01:00
makhlwf
482161fdd8 Improve UI accessibility for screen readers (#441) 2026-02-02 20:42:29 +01:00
Raphire
91f3dbf5e6 Compressed menu.png to reduce download size 2026-02-01 13:48:05 +01:00
Raphire
57f5e1c632 Remove wiki image to reduce download size 2026-02-01 13:43:02 +01:00
Raphire
95e844923e Minimize the powershell window when no parameters are provided 2026-02-01 13:40:22 +01:00
Raphire
c6e3edbe40 Minimize Win11Debloat powershell window when not running CLI mode 2026-02-01 13:37:27 +01:00
120 changed files with 8851 additions and 4850 deletions

347
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,347 @@
# How to Contribute?
We welcome contributions from the community. You can contribute to Win11Debloat by:
- Reporting issues and bugs [here](https://github.com/Raphire/Win11Debloat/issues/new?template=bug_report.yml)
- Submitting feature requests [here](https://github.com/Raphire/Win11Debloat/issues/new?template=feature_request.yml)
- Testing Win11Debloat
- Creating a pull request
- Improving the documentation
# Testing Win11Debloat
You can help us test the latest changes and additions to the script. If you encounter any issues, please report them [here](https://github.com/Raphire/Win11Debloat/issues/new?template=bug_report.yml).
> [!WARNING]
> The prerelease version of Win11Debloat is meant for developers to test the script. Don't use this in production environments!
You can launch the prerelease version of Win11Debloat by running this command:
```ps1
& ([scriptblock]::Create((irm "https://debloat.raphi.re/dev")))
```
# Contributing Code
## Getting Started
### Fork and Clone the Repository
1. **Fork the project** on GitHub by clicking the "Fork" button at the top right of the repository page.
2. **Clone the repository** to your local machine:
```powershell
git clone https://github.com/YOUR-USERNAME/Win11Debloat.git
cd Win11Debloat
```
3. **Create a new branch** for your contribution:
```powershell
git checkout -b feature/your-feature-name
```
### Running the Script Locally
1. Open PowerShell as an administrator
2. Enable script execution if necessary:
```powershell
Set-ExecutionPolicy Unrestricted -Scope Process -Force
```
3. Navigate to your Win11Debloat directory
4. Run the script:
```powershell
.\Win11Debloat.ps1
```
## Implementation Guidelines
### Project Structure
Understanding the project structure is essential for contributing effectively:
```
Win11Debloat/
├── Win11Debloat.ps1 # Main PowerShell script
├── Scripts/ # Additional PowerShell scripts and functions
│ └── Get.ps1 # Script used for the quick launch method to automatically download and run Win11debloat
├── Config/
│ ├── Apps.json # List of supported apps for removal
│ ├── DefaultSettings.json # Default configuration preset
│ ├── Features.json # All features with metadata
│ └── LastUsedSettings.json # Last used configuration (generated during use)
├── Regfiles/ # Registry files for each feature
└── Schemas/ # XAML Schemas for GUI elements
```
### Best Practices
1. **Test Thoroughly**: Always test your changes on a Windows test environment before submitting. This includes undoing tweaks and running script as another user and in Sysprep mode.
2. **Document Changes**: Update the `README.md` and other relevant documentation. Wiki documentation will be generated/updated based on the `Features.json` and `Apps.json` files.
3. **Follow Existing Patterns**: Look at existing implementations for guidance.
4. **Use Clear Naming**: Choose descriptive names for features, IDs, and registry files.
5. **Minimal Changes**: Registry files should only modify what's necessary. Avoid using policies where possible.
6. **Comment Your Code**: Add comments explaining your reasoning for complex logic in PowerShell scripts.
7. **Version Constraints**: Use `MinVersion` and `MaxVersion` if a feature only applies to specific Windows versions.
8. **Limit pull requests to 1 feature**: Keep pull requests limited to just one feature, this makes it easier to review your changes.
### Code Style
- Use **4 spaces** for indentation in PowerShell scripts
- Use **2 spaces** for indentation in JSON files
- Follow existing naming conventions
- Keep lines reasonable in length
- Use descriptive variable names
- Try to limit your indentation to a max of 4-5 levels, if possible.
- Use [Segoe Fluent Icon Assets](https://learn.microsoft.com/en-us/windows/apps/design/iconography/segoe-fluent-icons-font) for icons.
### Common Pitfalls
Avoid these common mistakes when contributing:
1. **Forgetting Get.ps1**: When adding a new command-line parameter, contributors often remember to add it to `Win11Debloat.ps1` but forget to add the same parameter to `Scripts/Get.ps1`. Both files **must** have matching parameters.
2. **Missing Registry Files**: Always create an `Undo` registry file for reversibility, aswell as a `Sysprep` registry file for Sysprep mode.
3. **Incorrect Registry Hives for Sysprep**: Sysprep registry files apply changes to Windows' default user, registry keys in the `HKEY_CURRENT_USER` hive must use `hkey_users\default` instead. Ensure you update **all** registry keys in the file.
4. **Wrong Registry File Location**:
- Main action files go in `Regfiles/`
- Undo files go in `Regfiles/Undo/`
- Sysprep files go in `Regfiles/Sysprep/`
Placing files in the wrong directory will cause the script to fail when trying to apply or undo changes.
6. **Not Testing Undo Functionality**: Always test that your undo registry file properly reverts all changes. A feature that can't be undone will frustrate users.
7. **Not Testing User/Sysprep Functionality**: Always test that your feature works when applied to another user or to the Windows default user with Sysprep. Sysprep changes can be tested by creating new users after running the script.
7. **Missing Category**: Features without a `Category` field (set to `null`) won't appear in the GUI. This is intentional for command-line-only features, make sure this is what you want before submitting.
8. **Hardcoded Paths**: When writing PowerShell logic, use `$PSScriptRoot` and script variables instead of hardcoded paths. This ensures the script works regardless of where it's installed.
## Implementing New Features
### Adding Support for a New App
> [!NOTE]
> The script automatically generates the app options for the GUI from the app information in the Apps.json file.
To add a new app that can be removed via Win11Debloat:
1. **Find the AppId**: To find the correct AppId for an app:
```powershell
Get-AppxPackage | Select-Object Name, PackageFullName
```
2. **Edit `Config/Apps.json`**: Add a new entry to the `"Apps"` array:
```json
{
"FriendlyName": "Display Name",
"AppId": "AppPackageIdentifier",
"Description": "Brief description of the app",
"SelectedByDefault": true|false
}
```
3. **Follow the Guidelines**:
- Use clear, user-friendly names for `FriendlyName`
- Set `SelectedByDefault` to `true` only for apps that are largely considered bloatware, otherwise set to `false`
- Provide a concise description explaining what the app does
### Adding a New Feature
Features are defined in `Config/Features.json` and can modify Windows settings via registry files or PowerShell commands.
> [!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.
#### 1a. Create the Registry File(s)
Create new registry files in the `Regfiles/` directory:
- **Disable file**: `Disable_YourFeature.reg`
- **Enable file**: `Undo/Enable_YourFeature.reg` (for reverting)
- **Sysprep file**: `Sysprep/Disable_YourFeature.reg` (for Sysprep mode)
Example registry file structure:
```reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\YourPath]
"SettingName"=dword:00000000
```
A Sysprep registry file should apply the same changes as the normal action. Replace the hive of registry keys that start with `HKEY_CURRENT_USER` with `hkey_users\default`. For example:
```reg
Windows Registry Editor Version 5.00
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\YourPath]
"SettingName"=dword:00000000
```
#### 1b. Implement the Feature Logic
If your feature requires more than just applying a registry file, add custom logic to the main script in the appropriate section. In most cases this will involve creating a new entry in the `ExecuteParameter` function for your new feature.
#### 2. Add Feature to Features.json
Add your feature to the `"Features"` array in `Config/Features.json`:
```json
{
"FeatureId": "YourFeatureId",
"Label": "Short label describing the feature",
"ToolTip": "Detailed explanation of what this feature does and its impact.",
"Category": "Privacy & Suggested Content",
"Priority": 1,
"Action": "Disable",
"RegistryKey": "Disable_YourFeature.reg",
"ApplyText": "Disabling your feature...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_YourFeature.reg",
"RequiresReboot": false,
"MinVersion": null,
"MaxVersion": null
}
```
**Field Descriptions**:
- `FeatureId`: Unique identifier (must match parameter name in Win11Debloat.ps1 and Get.ps1)
- `Label`: Short description shown in the UI, written in a way to fit with the Action or UndoAction prefixed
- `ToolTip`: Detailed explanation of what the feature does, used for tooltips in the GUI
- `Category`: One of the predefined categories (see Categories array in Features.json), features without a category won't be loaded into the GUI.
- `Priority`: Optional. The priority value (int) is used to sort features within a category. If this field is omitted the feature will be sorted based on the order in the Features.json file.
- `Action`: Action word for the feature (e.g., "Disable", "Enable", "Hide", "Show")
- `RegistryKey`: Filename of the registry file to apply (in Regfiles/ directory) or null if feature does not require registry changes
- `ApplyText`: Message shown when applying the feature
- `UndoAction`: Action word for reverting (e.g., "Enable", "Show")
- `RegistryUndoKey`: Filename of the registry file to revert changes or null if feature does not require registry changes
- `RequiresReboot`: Optional boolean. Set to `true` if the feature requires a system reboot to take effect
- `MinVersion`: Minimum Windows build version (e.g., "22000") or null
- `MaxVersion`: Maximum Windows version or null
#### 3. Add Command-Line Parameter
Add a corresponding parameter to both `Win11Debloat.ps1` AND `Scripts/Get.ps1`, the parameter name should match the FeatureId you have defined in `Features.json`. In most cases this will be a switch parameter, example:
```powershell
[switch]$YourFeatureId,
```
### Adding a Feature to the Default Preset
> [!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 (`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:**
- The feature removes obvious bloatware or distractions
- The feature enhances privacy without breaking core functionality
- The feature is generally non-controversial and beneficial to most users
- The change can be easily reverted if needed
**When NOT to add a feature to the default preset:**
- The feature significantly changes core Windows behavior
- The feature might break applications or workflows for some users
- The feature is highly opinionated or preference-based
- The feature is experimental or not thoroughly tested
To add your feature to the default preset, edit `Config/DefaultSettings.json` and add a new entry to the `"Settings"` array:
```json
{
"Name": "YourFeatureId",
"Value": true
}
```
**Field Descriptions**:
- `Name`: Must exactly match the `FeatureId` from Features.json
- `Value`: Set to `true` to enable the feature in default mode
**Example:**
```json
{
"Version": "1.0",
"Settings": [
{
"Name": "CreateRestorePoint",
"Value": true
},
{
"Name": "DisableTelemetry",
"Value": true
},
{
"Name": "YourFeatureId",
"Value": true
}
]
}
```
### Adding a Category
To add a new category for organizing features:
- Add a new category entry to the `"Categories"` array in `Config/Features.json`:
```json
{
"Name": "Your Category Name",
"Icon": "&#xE#### ;"
}
```
> [!TIP]
> Use [Segoe Fluent Icon Assets](https://learn.microsoft.com/en-us/windows/apps/design/iconography/segoe-fluent-icons-font) for icon codes.
### Adding UI Groups
UI Groups allow features to be grouped together in the GUI with a combobox (dropdown) selection:
```json
{
"GroupId": "UniqueGroupId",
"Label": "Display label for the group",
"ToolTip": "Explanation of what this group controls",
"Category": "Category Name",
"Priority": 1,
"Values": [
{
"Label": "Option 1",
"FeatureIds": ["FeatureId1"]
},
{
"Label": "Option 2",
"FeatureIds": ["FeatureId2"]
}
]
}
```
## Submitting a Pull Request
1. **Commit your changes** with clear, descriptive commit messages:
```powershell
git add .
git commit -m "Add feature: Description of your changes"
```
2. **Push to your fork**:
```powershell
git push origin feature/your-feature-name
```
3. **Create a Pull Request** on GitHub:
- Go to the original Win11Debloat repository
- Click "New Pull Request"
- Select your fork and branch
- Provide a clear description of your changes, include references to the registry keys used
- Reference any related issues
4. **Respond to feedback**: Be prepared to make adjustments based on code review feedback.
# Questions?
If you have questions about contributing, feel free to:
- Open a [discussion](https://github.com/Raphire/Win11Debloat/discussions)
- Comment on an existing issue
- Ask in your pull request

1
.gitignore vendored
View File

@@ -2,4 +2,5 @@ LastSettings
SavedSettings
LastUsedSettings.json
CustomAppsList
Logs/*
Win11Debloat.log

View File

@@ -1,998 +0,0 @@
{
"Version": "1.0",
"Categories": [
"Start Menu",
"System",
"Privacy & Suggested Content",
"Taskbar",
"Appearance",
"AI",
"Other",
"File Explorer",
"Gaming"
],
"UiGroups": [
{
"GroupId": "SearchIcon",
"Label": "Taskbar search style",
"Category": "Taskbar",
"Priority": 2,
"Values": [
{ "Label": "Hide", "FeatureIds": ["HideSearchTb"] },
{ "Label": "Show search icon only", "FeatureIds": ["ShowSearchIconTb"] },
{ "Label": "Show search icon and label", "FeatureIds": ["ShowSearchLabelTb"] },
{ "Label": "Show search box", "FeatureIds": ["ShowSearchBoxTb"] }
]
},
{
"GroupId": "MultiMon",
"Label": "Show taskbar apps on",
"Category": "Taskbar",
"Values": [
{ "Label": "All taskbars", "FeatureIds": ["MMTaskbarModeAll"] },
{ "Label": "Main taskbar and taskbar where window is open", "FeatureIds": ["MMTaskbarModeMainActive"] },
{ "Label": "Taskbar where window is open", "FeatureIds": ["MMTaskbarModeActive"] }
]
},
{
"GroupId": "CombineButtons",
"Label": "Combine taskbar buttons on the main display",
"Category": "Taskbar",
"Values": [
{ "Label": "Always", "FeatureIds": ["CombineTaskbarAlways"] },
{ "Label": "When taskbar is full", "FeatureIds": ["CombineTaskbarWhenFull"] },
{ "Label": "Never", "FeatureIds": ["CombineTaskbarNever"] }
]
},
{
"GroupId": "CombineMMButtons",
"Label": "Combine taskbar buttons on secondary displays",
"Category": "Taskbar",
"Values": [
{ "Label": "Always", "FeatureIds": ["CombineMMTaskbarAlways"] },
{ "Label": "When taskbar is full", "FeatureIds": ["CombineMMTaskbarWhenFull"] },
{ "Label": "Never", "FeatureIds": ["CombineMMTaskbarNever"] }
]
},
{
"GroupId": "ClearStart",
"Label": "Remove pinned apps from the start menu",
"Category": "Start Menu",
"Values": [
{ "Label": "Remove for the current user", "FeatureIds": ["ClearStart"] },
{ "Label": "Remove for all users", "FeatureIds": ["ClearStartAllUsers"] }
]
},
{
"GroupId": "ExplorerLocation",
"Label": "Open File Explorer to",
"Category": "File Explorer",
"Values": [
{ "Label": "Home", "FeatureIds": ["ExplorerToHome"] },
{ "Label": "This PC", "FeatureIds": ["ExplorerToThisPC"] },
{ "Label": "Downloads", "FeatureIds": ["ExplorerToDownloads"] },
{ "Label": "OneDrive", "FeatureIds": ["ExplorerToOneDrive"] }
]
}
],
"Features": [
{
"FeatureId": "RemoveApps",
"Label": "Remove the apps specified in the 'Apps' parameter",
"Category": null,
"Action": "Remove Apps",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "Apps",
"Label": "The selection of apps to remove, specified as a comma separated list. Use 'Default' (or omit) to use the default apps list",
"Category": null,
"Action": "Apps",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "RemoveAppsCustom",
"Label": "Remove custom selection of apps",
"Category": null,
"Action": "Remove Custom Apps",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "RemoveCommApps",
"Label": "Remove the Mail, Calendar, and People apps",
"Category": null,
"Action": "Remove Mail, Calendar & People",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "RemoveW11Outlook",
"Label": "Remove the new Outlook for Windows app",
"Category": null,
"Action": "Remove Outlook for Windows",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "RemoveGamingApps",
"Label": "Remove the Xbox App and Xbox Gamebar",
"Category": null,
"Action": "Remove Gaming Apps",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "RemoveHPApps",
"Label": "Remove HP OEM applications",
"Category": null,
"Action": "Remove HP Apps",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "CreateRestorePoint",
"Label": "Create a system restore point",
"Category": null,
"Action": "Create Restore Point",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableTelemetry",
"Label": "telemetry, tracking & targeted ads",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Telemetry.reg",
"ApplyText": "> Disabling telemetry, diagnostic data, activity history, app-launch tracking and targeted ads...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Telemetry.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableSuggestions",
"Label": "tips, tricks & suggested content",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Windows_Suggestions.reg",
"ApplyText": "> Disabling tips, tricks, suggestions and ads across Windows...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Windows_Suggestions.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableLockscreenTips",
"Label": "tips & tricks on the lock screen",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Lockscreen_Tips.reg",
"ApplyText": "> Disabling tips & tricks on the lock screen...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Lockscreen_Tips.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableDesktopSpotlight",
"Label": "Windows Spotlight for desktop",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Desktop_Spotlight.reg",
"ApplyText": "> Disabling the 'Windows Spotlight' desktop background option...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Desktop_Spotlight.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableEdgeAds",
"Label": "ads, suggestions and newsfeed in Edge",
"Category": "Privacy & Suggested Content",
"Action": "Disable",
"RegistryKey": "Disable_Edge_Ads_And_Suggestions.reg",
"ApplyText": "> Disabling ads, suggestions and the MSN news feed in Microsoft Edge...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Edge_Ads_And_Suggestions.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableCopilot",
"Label": "Microsoft Copilot",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Copilot.reg",
"ApplyText": "> Disabling Microsoft Copilot...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Copilot.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisableRecall",
"Label": "Windows Recall",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_AI_Recall.reg",
"ApplyText": "> Disabling Windows Recall...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_AI_Recall.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisableClickToDo",
"Label": "Click To Do, AI text & image analysis",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Click_to_Do.reg",
"ApplyText": "> Disabling Click to Do...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Click_to_Do.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisableDVR",
"Label": "Xbox game/screen recording",
"Category": "Gaming",
"Action": "Disable",
"RegistryKey": "Disable_DVR.reg",
"ApplyText": "> Disabling Xbox game/screen recording...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_DVR.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableGameBarIntegration",
"Label": "Game Bar integration",
"Category": "Gaming",
"Action": "Disable",
"RegistryKey": "Disable_Game_Bar_Integration.reg",
"ApplyText": "> Disabling Game Bar integration...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Game_Bar_Integration.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ClearStart",
"Action": "Clear Start Menu",
"Label": "Remove all pinned apps from the start menu for this user only",
"Category": "Start Menu",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "ClearStartAllUsers",
"Action": "Clear Start Menu (All Users)",
"Label": "Remove all pinned apps from the start menu for all existing and new users",
"Category": "Start Menu",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "ReplaceStart",
"Action": "Replace Start Menu",
"Label": "Replace the start menu layout for this user only with the provided template file",
"Category": null,
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "ReplaceStartAllUsers",
"Action": "Replace Start Menu (All Users)",
"Label": "Replace the start menu layout for all existing and new users with the provided template file",
"Category": null,
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisableStartRecommended",
"Label": "recommended section in the start menu",
"Category": "Start Menu",
"Action": "Hide",
"RegistryKey": "Disable_Start_Recommended.reg",
"ApplyText": "> Disabling the start menu recommended section...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Start_Recommended.reg",
"MinVersion": 22621,
"MaxVersion": 26199
},
{
"FeatureId": "DisableBing",
"Label": "Bing web search & Copilot integration",
"Category": "Start Menu",
"Action": "Disable",
"RegistryKey": "Disable_Bing_Cortana_In_Search.reg",
"ApplyText": "> Disabling Bing web search & Copilot integration in Windows search...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Bing_Cortana_In_Search.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableStartPhoneLink",
"Label": "Phone Link integration in the start menu",
"Category": "Start Menu",
"Action": "Disable",
"RegistryKey": "Disable_Phone_Link_In_Start.reg",
"ApplyText": "> Disabling the Phone Link mobile devices integration in the start menu...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Phone_Link_In_Start.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisableSettings365Ads",
"Label": "Microsoft 365 ads in Settings Home",
"Category": "Privacy & Suggested Content",
"Action": "Hide",
"RegistryKey": "Disable_Settings_365_Ads.reg",
"ApplyText": "> Disabling Microsoft 365 ads in Settings Home...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Settings_365_Ads.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableSettingsHome",
"Label": "Settings 'Home' page",
"Category": "Privacy & Suggested Content",
"Action": "Hide",
"RegistryKey": "Disable_Settings_Home.reg",
"ApplyText": "> Disabling the Settings Home page...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Settings_Home.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableEdgeAI",
"Label": "AI features in Microsoft Edge",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Edge_AI_Features.reg",
"ApplyText": "> Disabling AI features in Microsoft Edge...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Edge_AI_Features.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisablePaintAI",
"Label": "AI features in Paint",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Paint_AI_Features.reg",
"ApplyText": "> Disabling AI features in Paint...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Paint_AI_Features.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "DisableNotepadAI",
"Label": "AI features in Notepad",
"Category": "AI",
"Action": "Disable",
"RegistryKey": "Disable_Notepad_AI_Features.reg",
"ApplyText": "> Disabling AI features in Notepad...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Notepad_AI_Features.reg",
"MinVersion": 22621,
"MaxVersion": null
},
{
"FeatureId": "EnableDarkMode",
"Label": "theme for system and apps",
"Category": "Appearance",
"Action": "Enable dark",
"RegistryKey": "Enable_Dark_Mode.reg",
"ApplyText": "> Enabling dark mode for system and apps...",
"UndoAction": "Disable light",
"RegistryUndoKey": "Enable_Light_Mode.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableDragTray",
"Label": "'Drag Tray' for sharing & moving files",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Share_Drag_Tray.reg",
"ApplyText": "> Disabling Drag Tray...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Share_Drag_Tray.reg",
"MinVersion": 26200,
"MaxVersion": null
},
{
"FeatureId": "RevertContextMenu",
"Label": "context menu style",
"Category": "System",
"Action": "Use classic Windows 10",
"RegistryKey": "Disable_Show_More_Options_Context_Menu.reg",
"ApplyText": "> Restoring the classic Windows 10 style context menu...",
"UndoAction": "Use modern Windows 11",
"RegistryUndoKey": "Enable_W11_Style_Context_Menu.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "DisableMouseAcceleration",
"Label": "Enhance Pointer Precision (mouse acceleration)",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Enhance_Pointer_Precision.reg",
"ApplyText": "> Turning off Enhanced Pointer Precision...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Enhance_Pointer_Precision.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableStickyKeys",
"Label": "Sticky Keys keyboard shortcut",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Sticky_Keys_Shortcut.reg",
"ApplyText": "> Disabling the Sticky Keys keyboard shortcut...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Sticky_Keys_Shortcut.reg",
"MinVersion": 26100,
"MaxVersion": null
},
{
"FeatureId": "TaskbarAlignLeft",
"Label": "taskbar alignment",
"Category": "Taskbar",
"Priority": 1,
"Action": "Left",
"RegistryKey": "Align_Taskbar_Left.reg",
"ApplyText": "> Aligning taskbar buttons to the left...",
"UndoAction": "Center",
"RegistryUndoKey": "Align_Taskbar_Center.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "HideSearchTb",
"Label": "Hide search icon from the taskbar",
"Category": "Taskbar",
"Action": "Hide Search",
"RegistryKey": "Hide_Search_Taskbar.reg",
"ApplyText": "> Hiding the search icon from the taskbar...",
"UndoAction": "Show Search Box",
"RegistryUndoKey": "Show_Search_Box.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "ShowSearchIconTb",
"Label": "Show search icon on the taskbar",
"Category": "Taskbar",
"Action": "Show Search Icon",
"RegistryKey": "Show_Search_Box.reg",
"ApplyText": "> Changing taskbar search to icon only...",
"UndoAction": "Show Search Box",
"RegistryUndoKey": "Show_Search_Box.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "ShowSearchLabelTb",
"Label": "Show search icon with label on the taskbar",
"Category": "Taskbar",
"Action": "Show Search Label",
"RegistryKey": "Show_Search_Box.reg",
"ApplyText": "> Changing taskbar search to icon with label...",
"UndoAction": "Show Search Box",
"RegistryUndoKey": "Show_Search_Box.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "ShowSearchBoxTb",
"Label": "Show search box on the taskbar",
"Category": "Taskbar",
"Action": "Show Search Box",
"RegistryKey": "Show_Search_Box.reg",
"ApplyText": "> Changing taskbar search to search box...",
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "HideTaskview",
"Label": "'Task view' button on the taskbar",
"Category": "Taskbar",
"Priority": 3,
"Action": "Hide",
"RegistryKey": "Hide_Taskview_Taskbar.reg",
"ApplyText": "> Hiding the taskview button from the taskbar...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_Taskview_Taskbar.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "DisableWidgets",
"Label": "widgets on the taskbar & lock screen",
"Category": "Taskbar",
"Priority": 4,
"Action": "Disable",
"RegistryKey": "Disable_Widgets_Service.reg",
"ApplyText": "> Disabling widgets on the taskbar & lock screen...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Widgets_Service.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "HideChat",
"Label": "Chat (meet now) icon on the taskbar",
"Category": "Taskbar",
"Priority": 5,
"Action": "Hide",
"RegistryKey": "Disable_Chat_Taskbar.reg",
"ApplyText": "> Hiding the chat icon from the taskbar...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Chat_Taskbar.reg",
"MinVersion": null,
"MaxVersion": 22621
},
{
"FeatureId": "DisableFastStartup",
"Label": "fast start-up",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Fast_Startup.reg",
"ApplyText": "> Disabling Fast Start-up...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Fast_Startup.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableModernStandbyNetworking",
"Label": "Modern Standby network connectivity",
"Category": "System",
"Action": "Disable",
"RegistryKey": "Disable_Modern_Standby_Networking.reg",
"ApplyText": "> Disabling network connectivity during Modern Standby...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Modern_Standby_Networking.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "EnableEndTask",
"Label": "'End Task' option in taskbar context menu",
"Category": "Taskbar",
"Priority": 6,
"Action": "Show",
"RegistryKey": "Enable_End_Task.reg",
"ApplyText": "> Enabling the 'End Task' option in the taskbar right click menu...",
"UndoAction": "Hide",
"RegistryUndoKey": "Disable_End_Task.reg",
"MinVersion": 22631,
"MaxVersion": null
},
{
"FeatureId": "EnableLastActiveClick",
"Label": "'Last Active Click' behavior for taskbar apps",
"Category": "Taskbar",
"Priority": 7,
"Action": "Enable",
"RegistryKey": "Enable_Last_Active_Click.reg",
"ApplyText": "> Enabling the 'Last Active Click' behavior in the taskbar app area...",
"UndoAction": "Disable",
"RegistryUndoKey": "Disable_Last_Active_Click.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "CombineTaskbarAlways",
"Label": "Always combine taskbar buttons and hide labels for the main display",
"Category": "Taskbar",
"Action": "Combine Taskbar Always",
"RegistryKey": "Combine_Taskbar_Always.reg",
"ApplyText": "> Setting the taskbar on the main display to always combine buttons and hide labels...",
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "CombineMMTaskbarAlways",
"Label": "Always combine taskbar buttons and hide labels for secondary displays",
"Category": "Taskbar",
"Action": "Combine Multi-Monitor Taskbar Always",
"RegistryKey": "Combine_MMTaskbar_Always.reg",
"ApplyText": "> Setting the taskbar on secondary displays to always combine buttons and hide labels...",
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "CombineTaskbarWhenFull",
"Label": "Combine taskbar buttons and hide labels when taskbar is full for the main display",
"Category": "Taskbar",
"Action": "Combine Taskbar When Full",
"RegistryKey": "Combine_Taskbar_When_Full.reg",
"ApplyText": "> Setting the taskbar on the main display to only combine buttons and hide labels when the taskbar is full...",
"UndoAction": "Combine Taskbar Always",
"RegistryUndoKey": "Combine_Taskbar_Always.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "CombineMMTaskbarWhenFull",
"Label": "Combine taskbar buttons and hide labels when taskbar is full for secondary displays",
"Category": "Taskbar",
"Action": "Combine Multi-Monitor Taskbar When Full",
"RegistryKey": "Combine_MMTaskbar_When_Full.reg",
"ApplyText": "> Setting the taskbar on secondary displays to only combine buttons and hide labels when the taskbar is full...",
"UndoAction": "Combine Multi-Monitor Taskbar Always",
"RegistryUndoKey": "Combine_MMTaskbar_Always.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "CombineTaskbarNever",
"Label": "Never combine taskbar buttons and show labels for the main display",
"Category": "Taskbar",
"Action": "Never Combine Taskbar",
"RegistryKey": "Combine_Taskbar_Never.reg",
"ApplyText": "> Setting the taskbar on the main display to never combine buttons or hide labels...",
"UndoAction": "Combine Taskbar Always",
"RegistryUndoKey": "Combine_Taskbar_Always.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "CombineMMTaskbarNever",
"Label": "Never combine taskbar buttons and show labels for secondary displays",
"Category": "Taskbar",
"Action": "Never Combine Multi-Monitor Taskbar",
"RegistryKey": "Combine_MMTaskbar_Never.reg",
"ApplyText": "> Setting the taskbar on secondary displays to never combine buttons or hide labels...",
"UndoAction": "Combine Multi-Monitor Taskbar Always",
"RegistryUndoKey": "Combine_MMTaskbar_Always.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "MMTaskbarModeAll",
"Label": "Show app icons on all taskbars",
"Category": "Taskbar",
"Action": "Show All Taskbar Icons",
"RegistryKey": "MMTaskbarMode_All.reg",
"ApplyText": "> Setting the taskbar to show app icons on all taskbars...",
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "MMTaskbarModeMainActive",
"Label": "Show app icons on main taskbar and on taskbar where the windows is open",
"Category": "Taskbar",
"Action": "Show Taskbar Icons Main + Active",
"RegistryKey": "MMTaskbarMode_Main_Active.reg",
"ApplyText": "> Setting the taskbar to show app icons on main taskbar and on taskbar where the windows is open...",
"UndoAction": "Show All Taskbar Icons",
"RegistryUndoKey": "MMTaskbarMode_All.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "MMTaskbarModeActive",
"Label": "Show app icons only on taskbar where the window is open",
"Category": "Taskbar",
"Action": "Show Taskbar Icons Active Only",
"RegistryKey": "MMTaskbarMode_Active.reg",
"ApplyText": "> Setting the taskbar to only show app icons on the taskbar where the window is open...",
"UndoAction": "Show All Taskbar Icons",
"RegistryUndoKey": "MMTaskbarMode_All.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "ExplorerToHome",
"Label": "Change the default location that File Explorer opens to 'Home'",
"Category": "File Explorer",
"Action": "Explorer to Home",
"RegistryKey": "Launch_File_Explorer_To_Home.reg",
"ApplyText": "> Changing the default location that File Explorer opens to, to 'Home'...",
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ExplorerToThisPC",
"Label": "Change the default location that File Explorer opens to 'This PC'",
"Category": "File Explorer",
"Action": "Explorer to This PC",
"RegistryKey": "Launch_File_Explorer_To_This_PC.reg",
"ApplyText": "> Changing the default location that File Explorer opens to, to 'This PC'...",
"UndoAction": "Explorer to Home",
"RegistryUndoKey": "Launch_File_Explorer_To_Home.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ExplorerToDownloads",
"Label": "Change the default location that File Explorer opens to 'Downloads'",
"Category": "File Explorer",
"Action": "Explorer to Downloads",
"RegistryKey": "Launch_File_Explorer_To_Downloads.reg",
"ApplyText": "> Changing the default location that File Explorer opens to, to 'Downloads'...",
"UndoAction": "Explorer to Home",
"RegistryUndoKey": "Launch_File_Explorer_To_Home.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ExplorerToOneDrive",
"Label": "Change the default location that File Explorer opens to 'OneDrive'",
"Category": "File Explorer",
"Action": "Explorer to OneDrive",
"RegistryKey": "Launch_File_Explorer_To_OneDrive.reg",
"ApplyText": "> Changing the default location that File Explorer opens to, to 'OneDrive'...",
"UndoAction": "Explorer to Home",
"RegistryUndoKey": "Launch_File_Explorer_To_Home.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ShowKnownFileExt",
"Label": "file extensions for known file types",
"Category": "File Explorer",
"Action": "Show",
"RegistryKey": "Show_Extensions_For_Known_File_Types.reg",
"ApplyText": "> Enabling file extensions for known file types...",
"UndoAction": "Hide",
"RegistryUndoKey": "Hide_Extensions_For_Known_File_Types.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ShowHiddenFolders",
"Label": "hidden files, folders and drives",
"Category": "File Explorer",
"Action": "Show",
"RegistryKey": "Show_Hidden_Folders.reg",
"ApplyText": "> Unhiding hidden files, folders and drives...",
"UndoAction": "Hide",
"RegistryUndoKey": "Hide_Hidden_Folders.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "HideHome",
"Label": "'Home' from navigation pane",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_Home_from_Explorer.reg",
"ApplyText": "> Hiding the home section from the File Explorer navigation pane...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_Home_in_Explorer.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "HideGallery",
"Label": "'Gallery' from navigation pane",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_Gallery_from_Explorer.reg",
"ApplyText": "> Hiding the gallery section from the File Explorer navigation pane...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_Gallery_in_Explorer.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "HideDupliDrive",
"Label": "duplicate removable drive entries",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_duplicate_removable_drives_from_navigation_pane_of_File_Explorer.reg",
"ApplyText": "> Hiding duplicate removable drive entries from the File Explorer navigation pane...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_duplicate_removable_drives_in_navigation_pane_of_File_Explorer.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "AddFoldersToThisPC",
"Label": "common folders back to 'This PC' page",
"Category": "File Explorer",
"Action": "Add",
"RegistryKey": "Add_All_Folders_Under_This_PC.reg",
"ApplyText": "> Adding all common folders (Desktop, Downloads, etc.) back to 'This PC' in File Explorer...",
"UndoAction": "Remove",
"RegistryUndoKey": "Remove_All_Folders_Under_This_PC.reg",
"MinVersion": 22000,
"MaxVersion": null
},
{
"FeatureId": "DisableTransparency",
"Label": "transparency effects",
"Category": "Appearance",
"Action": "Disable",
"RegistryKey": "Disable_Transparency.reg",
"ApplyText": "> Disabling transparency effects...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Transparency.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "DisableAnimations",
"Label": "animations and visual effects",
"Category": "Appearance",
"Action": "Disable",
"RegistryKey": "Disable_Animations.reg",
"ApplyText": "> Disabling animations and visual effects...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Animations.reg",
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "ForceRemoveEdge",
"Label": "Forcefully uninstall Microsoft Edge. NOT RECOMMENDED!",
"Category": null,
"Action": "Force Remove Edge",
"RegistryKey": null,
"ApplyText": null,
"UndoAction": null,
"RegistryUndoKey": null,
"MinVersion": null,
"MaxVersion": null
},
{
"FeatureId": "HideIncludeInLibrary",
"Label": "'Include in library' option in the context menu",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Disable_Include_in_library_from_context_menu.reg",
"ApplyText": "> Hiding 'Include in library' in the context menu...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Include_in_library_in_context_menu.reg",
"MinVersion": null,
"MaxVersion": 21999
},
{
"FeatureId": "HideGiveAccessTo",
"Label": "'Give access to' option in the context menu",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Disable_Give_access_to_context_menu.reg",
"ApplyText": "> Hiding 'Give access to' in the context menu...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Give_access_to_context_menu.reg",
"MinVersion": null,
"MaxVersion": 21999
},
{
"FeatureId": "HideShare",
"Label": "'Share' option in the context menu",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Disable_Share_from_context_menu.reg",
"ApplyText": "> Hiding 'Share' in the context menu...",
"UndoAction": "Show",
"RegistryUndoKey": "Enable_Share_in_context_menu.reg",
"MinVersion": null,
"MaxVersion": 21999
},
{
"FeatureId": "HideOnedrive",
"Label": "'OneDrive' folder from navigation pane",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_Onedrive_Folder.reg",
"ApplyText": "> Hiding the OneDrive folder from the File Explorer navigation pane...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_Onedrive_Folder.reg",
"MinVersion": null,
"MaxVersion": 21999
},
{
"FeatureId": "Hide3dObjects",
"Label": "'3D objects' folder under 'This PC'",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_3D_Objects_Folder.reg",
"ApplyText": "> Hiding the 3D objects folder from the File Explorer navigation pane...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_3D_Objects_Folder.reg",
"MinVersion": null,
"MaxVersion": 21999
},
{
"FeatureId": "HideMusic",
"Label": "'Music' folder under 'This PC'",
"Category": "File Explorer",
"Action": "Hide",
"RegistryKey": "Hide_Music_Folder.reg",
"ApplyText": "> Hiding the music folder from the File Explorer navigation pane...",
"UndoAction": "Show",
"RegistryUndoKey": "Show_Music_Folder.reg",
"MinVersion": null,
"MaxVersion": 21999
},
{
"FeatureId": "DisableBraveBloat",
"Label": "bloat in Brave browser (AI, Crypto, etc.)",
"Category": "Other",
"Action": "Disable",
"RegistryKey": "Disable_Brave_Bloat.reg",
"ApplyText": "> Disabling Brave AI, Crypto, News, Rewards, Talk and VPN in Brave browser...",
"UndoAction": "Enable",
"RegistryUndoKey": "Enable_Brave_Bloat.reg",
"MinVersion": null,
"MaxVersion": null
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 KiB

View File

@@ -1,825 +0,0 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Win11Debloat"
Width="1024" Height="768"
ResizeMode="NoResize"
SnapsToDevicePixels="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Foreground="{DynamicResource FgColor}">
<Window.Resources>
<!-- ScrollBar Style -->
<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Width" Value="8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid>
<Track Name="PART_Track" IsDirectionReversed="true">
<Track.Thumb>
<Thumb>
<Thumb.Style>
<Style TargetType="Thumb">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbColor}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Background="{TemplateBinding Background}" CornerRadius="4"/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbHoverColor}"/>
</Trigger>
</Style.Triggers>
</Style>
</Thumb.Style>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ComboBox Style -->
<Style TargetType="ComboBox">
<Setter Property="Background" Value="{DynamicResource ComboBgColor}"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="0,4,0,8"/>
<Setter Property="MinHeight" Value="33"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<!-- Left accent line -->
<Border x:Name="ClosedAccentLine" Width="3" Height="18" HorizontalAlignment="Left" VerticalAlignment="Stretch" Background="{DynamicResource ButtonBg}" CornerRadius="1.5" Panel.ZIndex="2"/>
<ToggleButton x:Name="ToggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Focusable="False" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4">
<TextBlock x:Name="Arrow"
Text="&#xE70D;"
FontFamily="Segoe MDL2 Assets"
FontSize="10"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="0,0,8,0"
Foreground="{DynamicResource FgColor}"
RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<RotateTransform x:Name="ArrowRotation" Angle="0"/>
</TextBlock.RenderTransform>
</TextBlock>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ComboHoverColor}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" To="180" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" To="0" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
</ToggleButton>
<ContentPresenter x:Name="ContentPresenter"
IsHitTestVisible="False"
Margin="10,0,20,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"/>
<Popup x:Name="Popup"
Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True"
Focusable="False"
PopupAnimation="Fade"
StaysOpen="False"
PlacementTarget="{Binding ElementName=ToggleButton}"
VerticalOffset="1"
HorizontalOffset="0">
<Grid x:Name="DropDown" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder"
Background="{DynamicResource ComboItemBgColor}"
BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1"
CornerRadius="4"
Padding="5,4,5,1">
<ScrollViewer Margin="0,2,0,0"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled">
<ItemsPresenter Margin="0,0,0,1"/>
</ScrollViewer>
</Border>
</Grid>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="SelectedIndex" Value="0">
<Setter TargetName="ClosedAccentLine" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="SelectedIndex" Value="-1">
<Setter TargetName="ClosedAccentLine" Property="Visibility" Value="Collapsed"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ComboBoxItem Style -->
<Style TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="10,8"/>
<Setter Property="Margin" Value="0,0,0,4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Grid>
<Border x:Name="ItemBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<!-- Left accent line -->
<Border x:Name="AccentLine"
Width="3"
Height="15"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Background="{DynamicResource ButtonBg}"
CornerRadius="1.5"
Margin="0"
Visibility="Collapsed"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="AccentLine" Property="Visibility" Value="Visible"/>
<Setter TargetName="ItemBorder" Property="Background" Value="{DynamicResource ComboItemSelectedColor}"/>
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="{DynamicResource ComboItemHoverColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- TextBlock Label Style -->
<Style x:Key="LabelStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="0,0,0,3"/>
</Style>
<!-- Category card border style -->
<Style x:Key="CategoryCardBorderStyle" TargetType="Border">
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Background" Value="{DynamicResource CardBgColor}"/>
<Setter Property="Padding" Value="16,12"/>
<Setter Property="Margin" Value="0,0,0,16"/>
</Style>
<!-- Category header text style -->
<Style x:Key="CategoryHeaderTextBlock" TargetType="TextBlock">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Margin" Value="0,0,0,10"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
</Style>
<!-- Overview changes text style -->
<Style x:Key="OverviewNoChangesTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="FontStyle" Value="Italic"/>
<Setter Property="Margin" Value="0,0,0,8"/>
</Style>
<Style x:Key="OverviewChangeBulletStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="Margin" Value="0,0,0,8"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<!-- TextBox Style for search -->
<Style TargetType="TextBox">
<Setter Property="CaretBrush" Value="{DynamicResource FgColor}"/>
</Style>
<!-- CheckBox Style -->
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="4,2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="4" Padding="{TemplateBinding Padding}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="CheckBoxBorder" Grid.Column="0" Width="18" Height="18" Background="{DynamicResource CheckBoxBgColor}" BorderBrush="{DynamicResource CheckBoxBorderColor}" BorderThickness="1" CornerRadius="4" Margin="0,0,8,0">
<TextBlock x:Name="CheckMark" Text="&#xE73E;" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
</Border>
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,1"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource CheckBoxHoverColor}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonBg}"/>
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
<Setter TargetName="CheckMark" Property="Foreground" Value="White"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
<Condition Property="IsChecked" Value="True"/>
</MultiTrigger.Conditions>
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonHover}"/>
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- CheckBox style for feature toggles -->
<Style x:Key="FeatureCheckboxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
<Setter Property="Margin" Value="0,0,0,10"/>
<Setter Property="Padding" Value="0,2"/>
</Style>
<!-- CheckBox style for apps panels -->
<Style x:Key="AppsPanelCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
<Setter Property="Margin" Value="2,3,2,3"/>
</Style>
<!-- Button Style -->
<Style x:Key="Win11Button" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonBg}"/>
<Setter Property="Foreground" Value="white"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDisabled}"/>
<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHover}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonPressed}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonPressed}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- Secondary Button Style -->
<Style x:Key="Win11ButtonSecondary" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonBg}"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,1"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
<Setter Property="Foreground" Value="{DynamicResource SecondaryButtonTextDisabled}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonPressed}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- Title Bar Button Style -->
<Style x:Key="TitleBarButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="46"/>
<Setter Property="Height" Value="32"/>
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="FontSize" Value="10"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="0,8,0,0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CloseButton" TargetType="Button" BasedOn="{StaticResource TitleBarButton}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource CloseHover}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="HelpButton" TargetType="Button" BasedOn="{StaticResource TitleBarButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,3"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonBg}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHover}"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Border BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1"
CornerRadius="8"
Background="{DynamicResource BgColor}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Custom Title Bar -->
<Grid Grid.Row="0" x:Name="TitleBar">
<Border Background="{DynamicResource BgColor}" CornerRadius="8,8,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Text="Win11Debloat"
Foreground="{DynamicResource FgColor}"
VerticalAlignment="Center"
Margin="12,0,0,0"
FontSize="12"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button x:Name="HelpBtn" Content="?" FontFamily="Segoe UI" FontSize="15" Style="{StaticResource HelpButton}" ToolTip="Open Wiki"/>
<Button x:Name="CloseBtn" Content="&#xE8BB;" Style="{StaticResource CloseButton}" ToolTip="Close"/>
</StackPanel>
</Grid>
</Border>
</Grid>
<!-- Main Content with Tabs -->
<TabControl Grid.Row="1" Background="Transparent" BorderThickness="0" Margin="0" Padding="0" Name="MainTabControl">
<TabControl.Resources>
<Style TargetType="TabItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Name="Border" Background="{DynamicResource SecondaryButtonBg}" BorderThickness="0" CornerRadius="0" Padding="10,10" Margin="0">
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ButtonBg}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TabControl.Resources>
<TabControl.ItemContainerStyle>
<Style TargetType="TabItem">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<!-- Home Tab -->
<TabItem Header="Home" x:Name="HomeTab">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="600">
<!-- Logo -->
<Viewbox Width="220" Height="220" Margin="0,32,0,10" HorizontalAlignment="Center">
<Grid Width="220" Height="220">
<!-- Windows logo style icon -->
<Path x:Name="LogoFallback" Data="M0,0 L80,0 L80,80 L0,80 Z M90,0 L170,0 L170,80 L90,80 Z M0,90 L80,90 L80,170 L0,170 Z M90,90 L170,90 L170,170 L90,170 Z"
Fill="{DynamicResource ButtonBg}" Stretch="Uniform" Margin="10"/>
<!-- Sparkle effects -->
<Canvas HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="45" Height="45" Margin="0,0,2,2">
<Path Canvas.Left="10" Canvas.Top="16" Data="M12,0 L14,10 L24,12 L14,14 L12,24 L10,14 L0,12 L10,10 Z"
Fill="{DynamicResource AccentColor}" Width="38" Height="38" Stretch="Uniform"/>
<Path Canvas.Left="0" Canvas.Top="0" Data="M6,0 L7,5 L12,6 L7,7 L6,12 L5,7 L0,6 L5,5 Z"
Fill="{DynamicResource AccentColor}" Width="20" Height="20" Stretch="Uniform"/>
<Path Canvas.Left="35" Canvas.Top="8" Data="M4,0 L5,3 L8,4 L5,5 L4,8 L3,5 L0,4 L3,3 Z"
Fill="{DynamicResource AccentColor}" Width="15" Height="15" Stretch="Uniform"/>
</Canvas>
<!-- Actual logo image if available -->
<Image x:Name="LogoImage" Stretch="Uniform"/>
</Grid>
</Viewbox>
<!-- Title -->
<TextBlock Text="Welcome to Win11Debloat" FontSize="28" FontWeight="Bold" Foreground="{DynamicResource FgColor}" HorizontalAlignment="Center" Margin="0,0,0,10"/>
<TextBlock TextWrapping="Wrap" Foreground="{DynamicResource FgColor}" FontSize="16" LineHeight="22" HorizontalAlignment="Center" Margin="0,0,0,30">
<Run Text="Your clean Windows experience is just a few clicks away!"/>
</TextBlock>
<!-- Start Button -->
<Button x:Name="HomeStartBtn" Width="200" Height="48" Style="{StaticResource Win11Button}" HorizontalAlignment="Center" Margin="0,50,0,0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="Start" VerticalAlignment="Center" FontSize="20" Margin="0,0,0,2"/>
<TextBlock Text="&#xE72A;" FontFamily="Segoe MDL2 Assets" FontSize="16" Margin="8,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</TabItem>
<!-- App Removal Tab -->
<TabItem Header="App Removal">
<DockPanel>
<Border DockPanel.Dock="Top" Padding="20,10,20,0">
<StackPanel>
<TextBlock Text="App Removal" FontWeight="Bold" FontSize="20" Margin="0,0,0,5" Foreground="{DynamicResource FgColor}"/>
<TextBlock Text="Select which apps you want to remove from your system" FontSize="13" Margin="0,0,0,20" Foreground="{DynamicResource FgColor}" TextWrapping="Wrap"/>
<!-- Filter Options -->
<Grid Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0">
<Button x:Name="DefaultAppsBtn" Content="Select Default Apps" ToolTip="Select the default selection of apps" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0"/>
<Button x:Name="LoadLastUsedAppsBtn" Content="Select Last Used Selection" ToolTip="Select the apps that were selected the last time Win11Debloat was run" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0"/>
<Button x:Name="ClearAppSelectionBtn" Content="Clear Selection" ToolTip="Clear all selected apps" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0"/>
</StackPanel>
<CheckBox x:Name="OnlyInstalledAppsBox" Grid.Column="2" Content="Only show installed apps" IsChecked="False" Foreground="{DynamicResource FgColor}" VerticalAlignment="Center"/>
<Border Grid.Column="4" BorderBrush="{DynamicResource ButtonBorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource ComboBgColor}" Width="300" Padding="8,6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="&#xE721;" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
<TextBlock x:Name="AppSearchPlaceholder" Grid.Column="1" Text="Search app" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
<TextBox x:Name="AppSearchBox" Grid.Column="1" Background="Transparent" Foreground="{DynamicResource FgColor}" BorderThickness="0" FontSize="13" Margin="1,0,0,1" VerticalAlignment="Center" Text=""/>
</Grid>
</Border>
</Grid>
</StackPanel>
</Border>
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="20,0">
<StackPanel>
<!-- Apps List -->
<Border BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="0,0,0,10" Background="{DynamicResource CardBgColor}" Height="510">
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="AppSelectionPanel" Margin="8"/>
</ScrollViewer>
<Border x:Name="LoadingAppsIndicator" CornerRadius="4" Background="{DynamicResource ScrollBarThumbColor}" Opacity="0.8" Visibility="Collapsed">
<TextBlock Text="Loading apps..." FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource FgColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
<!-- Status Info -->
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="AppSelectionStatus" Text="" Foreground="{DynamicResource FgColor}" Margin="10,0,0,0" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
</DockPanel>
</TabItem>
<!-- Tweaks Tab -->
<TabItem Header="Tweaks">
<DockPanel>
<Border DockPanel.Dock="Top" Padding="20,10,20,0" Background="{DynamicResource BgColor}">
<StackPanel>
<TextBlock Text="System Tweaks" FontWeight="Bold" FontSize="20" Margin="0,0,0,5" Foreground="{DynamicResource FgColor}"/>
<TextBlock Text="Select which tweaks you want to apply to your system" FontSize="13" Margin="0,0,0,20" Foreground="{DynamicResource FgColor}" TextWrapping="Wrap"/>
<!-- Filter Options -->
<Grid Margin="0,0,0,12">
<StackPanel Orientation="Horizontal">
<Button x:Name="LoadDefaultsBtn" Content="Select Default Settings" ToolTip="Select the settings that are recommended for most people" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0"/>
<Button x:Name="LoadLastUsedBtn" Content="Select Last Used Settings" ToolTip="Select the settings that were used the last time Win11Debloat was run" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0"/>
<Button x:Name="ClearAllTweaksBtn" Content="Clear Selection" ToolTip="Clear all selected tweaks" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0"/>
</StackPanel>
</Grid>
</StackPanel>
</Border>
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,-20,0,0" Padding="20,10,20,0">
<Grid Margin="0,10,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Column 1: Dynamically populated -->
<StackPanel Grid.Column="0" x:Name="Column0Panel" Margin="0,0,15,0"/>
<!-- Column 2: Dynamically populated -->
<StackPanel Grid.Column="1" x:Name="Column1Panel" Margin="0,0,15,0"/>
<!-- Column 3: Dynamically populated -->
<StackPanel Grid.Column="2" x:Name="Column2Panel"/>
</Grid>
</ScrollViewer>
<!-- Top fade gradient -->
<Border IsHitTestVisible="False" VerticalAlignment="Top" Height="10" Margin="0,-12,20,0" Background="{DynamicResource BgColor}">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="Black" Offset="0.5"/>
<GradientStop Color="Transparent" Offset="1"/>
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<!-- Bottom fade gradient -->
<Border IsHitTestVisible="False" VerticalAlignment="Bottom" Height="20" Margin="0,0,20,0" Background="{DynamicResource BgColor}">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Transparent" Offset="0"/>
<GradientStop Color="Black" Offset="1"/>
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
</Grid>
</DockPanel>
</TabItem>
<!-- Overview Tab -->
<TabItem Header="Overview" x:Name="OverviewTab">
<DockPanel>
<Border DockPanel.Dock="Top" Padding="20,10,20,0">
<StackPanel>
<TextBlock Text="Overview" FontWeight="Bold" FontSize="20" Margin="0,0,0,5" Foreground="{DynamicResource FgColor}"/>
<TextBlock Text="Review and confirm your choices before proceeding" FontSize="13" Margin="0,0,0,20" Foreground="{DynamicResource FgColor}" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,-20,0,0" Padding="20,10,20,0">
<StackPanel Margin="0,10,0,5">
<!-- Apply Changes To -->
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="20" Margin="0,0,0,16">
<StackPanel>
<TextBlock Text="Apply Changes To" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource FgColor}" Margin="0,0,0,8"/>
<ComboBox x:Name="UserSelectionCombo" Margin="0,0,0,12">
<ComboBoxItem Content="Current User" IsSelected="True"/>
<ComboBoxItem Content="Other User"/>
<ComboBoxItem Content="Windows Default User (Sysprep)"/>
</ComboBox>
<StackPanel x:Name="OtherUserPanel" Visibility="Collapsed" Margin="0,0,0,12">
<TextBlock x:Name="UsernameValidationMessage" Text="" FontStyle="Italic" Foreground="{DynamicResource CloseHover}" FontSize="11" Margin="3,0,0,4" TextWrapping="Wrap"/>
<Border BorderBrush="{DynamicResource ButtonBorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource ComboBgColor}" Padding="8,6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="&#xE77B;" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
<TextBlock x:Name="UsernameTextBoxPlaceholder" Grid.Column="1" Text="Enter username" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
<TextBox x:Name="OtherUsernameTextBox" Grid.Column="1" Background="Transparent" Foreground="{DynamicResource FgColor}" BorderThickness="0" FontSize="13" Margin="1,0,0,1" VerticalAlignment="Center" Text="" Padding="0"/>
</Grid>
</Border>
</StackPanel>
<TextBlock x:Name="UserSelectionDescription" Text="Changes will be applied to the currently logged-in user profile." Foreground="{DynamicResource FgColor}" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<!-- Selected Changes -->
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12" Margin="0,0,0,16">
<StackPanel>
<TextBlock Text="Selected Changes" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource FgColor}" Margin="0,0,0,12"/>
<StackPanel x:Name="OverviewChangesPanel"/>
</StackPanel>
</Border>
<!-- System Restore Point -->
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12" Margin="0,0,0,16">
<StackPanel>
<TextBlock Text="System Restore Point" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource FgColor}" Margin="0,0,0,8"/>
<TextBlock Text="A restore point will allow you to revert your system to a previous state using the built-in System Restore feature. (Recommended)" Foreground="{DynamicResource FgColor}" FontSize="12" Margin="0,0,0,10" TextWrapping="Wrap"/>
<CheckBox x:Name="RestorePointCheckBox" Content="Create system restore point" Foreground="{DynamicResource FgColor}"/>
</StackPanel>
</Border>
<!-- Apply Changes Button -->
<Button x:Name="OverviewApplyBtn" Style="{StaticResource Win11Button}" Padding="14,8" Margin="0,0,0,15" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="Apply Changes" VerticalAlignment="Center" FontSize="16" Margin="0,0,0,2"/>
<TextBlock Text="&#xE73E;" FontFamily="Segoe MDL2 Assets" FontSize="16" Margin="8,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
</ScrollViewer>
<!-- Top fade gradient -->
<Border IsHitTestVisible="False" VerticalAlignment="Top" Height="15" Margin="0,-15,20,0" Background="{DynamicResource BgColor}">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="Black" Offset="0.5"/>
<GradientStop Color="Transparent" Offset="1"/>
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<!-- Bottom fade gradient -->
<Border IsHitTestVisible="False" VerticalAlignment="Bottom" Height="20" Margin="0,0,20,0" Background="{DynamicResource BgColor}">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Transparent" Offset="0"/>
<GradientStop Color="Black" Offset="1"/>
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
</Grid>
</DockPanel>
</TabItem>
<!-- Apply Tab -->
<TabItem Header="Apply" x:Name="ApplyTab">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Header -->
<StackPanel Grid.Row="0" Margin="20,10,20,10">
<TextBlock Text="Applying Changes" FontWeight="Bold" FontSize="20" Margin="0,0,0,10" Foreground="{DynamicResource FgColor}"/>
<TextBlock Text="Sit back and relax while Win11Debloat applies your selected changes" FontSize="13" Margin="0,0,0,10" Foreground="{DynamicResource FgColor}" TextWrapping="Wrap"/>
</StackPanel>
<!-- Console Output -->
<Border Grid.Row="1" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="#0C0C0C" Margin="20,0">
<ScrollViewer x:Name="ConsoleScrollViewer" VerticalScrollBarVisibility="Auto" Padding="10">
<TextBlock x:Name="ConsoleOutput" FontFamily="Consolas" FontSize="12" Foreground="#CCCCCC" TextWrapping="Wrap" Text=""/>
</ScrollViewer>
</Border>
<!-- Progress and Finish Button -->
<Border Grid.Row="2" Background="{DynamicResource BgColor}" Padding="10,0" CornerRadius="0,0,8,8" Margin="20,16,20,16">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Status and Finish Button -->
<StackPanel Grid.Row="1" HorizontalAlignment="Center">
<Button x:Name="FinishBtn" Width="200" Height="48" Style="{StaticResource Win11Button}" Margin="0" IsEnabled="False">
<TextBlock x:Name="FinishBtnText" Text="Applying changes..." VerticalAlignment="Center" FontSize="16" Margin="0,0,0,1"/>
</Button>
</StackPanel>
</Grid>
</Border>
</Grid>
</TabItem>
</TabControl>
<!-- Bottom Navigation Buttons -->
<Grid Grid.Row="2" Height="56" x:Name="BottomNavGrid">
<Grid Margin="20,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="PreviousBtn" Grid.Column="0" Width="120" Height="36" Style="{StaticResource Win11ButtonSecondary}" Visibility="Collapsed" Margin="10,0,0,0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="&#xE72B;" FontFamily="Segoe MDL2 Assets" FontSize="12" Margin="0,0,8,0" VerticalAlignment="Center"/>
<TextBlock Text="Previous" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
</StackPanel>
</Button>
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="NextBtn" Width="120" Height="36" Margin="0,0,10,0" Style="{StaticResource Win11Button}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="Next" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
<TextBlock Text="&#xE72A;" FontFamily="Segoe MDL2 Assets" FontSize="12" Margin="8,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<!-- Progress Indicators - Centered independently -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Ellipse x:Name="ProgressIndicator1" Width="10" Height="10" Margin="4,0" Fill="#808080" ToolTip="App Removal"/>
<Ellipse x:Name="ProgressIndicator2" Width="10" Height="10" Margin="4,0" Fill="#808080" ToolTip="System Tweaks"/>
<Ellipse x:Name="ProgressIndicator3" Width="10" Height="10" Margin="4,0" Fill="#808080" ToolTip="Overview"/>
</StackPanel>
</Grid>
</Grid>
</Border>
</Window>

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,14 @@
"Name": "DisableBing",
"Value": true
},
{
"Name": "DisableStoreSearchSuggestions",
"Value": true
},
{
"Name": "DisableSearchHighlights",
"Value": true
},
{
"Name": "DisableCopilot",
"Value": true
@@ -37,6 +45,10 @@
"Name": "DisableClickToDo",
"Value": true
},
{
"Name": "DisableAISvcAutoStart",
"Value": true
},
{
"Name": "DisableWidgets",
"Value": true

1494
Config/Features.json Normal file

File diff suppressed because it is too large Load Diff

101
README.md
View File

@@ -1,26 +1,12 @@
<div align="center" markdown="1">
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://www.warp.dev/windebloat">
<img alt="Warp sponsorship" width="400" src="https://github.com/user-attachments/assets/c21102f7-bab9-4344-a731-0cf6b341cab2">
</a>
### [Warp, the intelligent terminal for developers](https://www.warp.dev/windebloat)
[Available for MacOS, Linux, & Windows](https://www.warp.dev/windebloat)<br>
</div>
<hr>
# Win11Debloat
[![GitHub Release](https://img.shields.io/github/v/release/Raphire/Win11Debloat?style=for-the-badge&label=Latest%20release)](https://github.com/Raphire/Win11Debloat/releases/latest)
[![Join the Discussion](https://img.shields.io/badge/Join-the%20Discussion-2D9F2D?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Raphire/Win11Debloat/discussions)
[![Static Badge](https://img.shields.io/badge/Documentation-_?style=for-the-badge&logo=bookstack&color=grey)](https://github.com/Raphire/Win11Debloat/wiki/)
Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and improve your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. No need to painstakingly go through all the settings yourself or remove apps one by one. Win11Debloat makes the process quick and easy!
Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. No need to painstakingly go through all the settings yourself or remove apps one by one. Win11Debloat makes the process quick and easy!
The script also includes many features that system administrators and power users will enjoy. Such as support for Windows Audit mode, the option to make changes to other Windows users and the ability to access all of Win11Debloat's features right from the command-line. Please refer to our [wiki](https://github.com/Raphire/Win11Debloat/wiki/) for more details.
The script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the option to make changes to other Windows users. Please refer to our [wiki](https://github.com/Raphire/Win11Debloat/wiki/) for more details.
![Win11Debloat Menu](/Assets/Images/menu.png)
@@ -47,7 +33,7 @@ Download & run the script automatically via PowerShell.
3. Wait for the script to automatically download Win11Debloat.
4. Carefully read through and follow the on-screen instructions.
This method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/How-To-Use#parameters) for more information.
This method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/Command%E2%80%90line-Interface#parameters) for more information.
### Traditional method
@@ -83,7 +69,7 @@ This method supports command-line parameters to customize the behaviour of the s
6. Carefully read through and follow the on-screen instructions.
This method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/How-To-Use#parameters) for more information.
This method supports command-line parameters to customize the behaviour of the script. Please click [here](https://github.com/Raphire/Win11Debloat/wiki/Command%E2%80%90line-Interface#parameters) for more information.
</details>
## Features
@@ -101,6 +87,8 @@ Below is an overview of the key features and functionality offered by Win11Deblo
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
- Disable tips, tricks, suggestions & ads across Windows.
- Disable Windows location services & app location access.
- Disable Find My Device location tracking.
- Disable 'Windows Spotlight' and tips & tricks on the lock screen.
- Disable 'Windows Spotlight' desktop background option.
- Disable ads, suggestions and the MSN news feed in Microsoft Edge.
@@ -109,20 +97,29 @@ Below is an overview of the key features and functionality offered by Win11Deblo
#### AI Features
- Disable & remove Microsoft Copilot.
- Disable Windows Recall. (W11 only)
- Disable Click to Do, AI text & image analysis tool. (W11 only)
- Disable AI Features in Edge. (W11 only)
- Disable AI Features in Paint. (W11 only)
- Disable AI Features in Notepad. (W11 only)
- Disable Windows Recall.
- Disable Click to Do, AI text & image analysis tool.
- Prevent AI service (WSAIFabricSvc) from starting automatically.
- Disable AI Features in Edge.
- Disable AI Features in Paint.
- Disable AI Features in Notepad.
#### System
- Disable the Drag Tray for sharing & moving files. (W11 only)
- Restore the old Windows 10 style context menu. (W11 only)
- Disable the Drag Tray for sharing & moving files.
- Restore the old Windows 10 style context menu.
- Turn off Enhance Pointer Precision, also known as mouse acceleration.
- Disable the Sticky Keys keyboard shortcut. (W11 only)
- Disable the Sticky Keys keyboard shortcut.
- Disable Storage Sense automatic disk cleanup.
- Disable fast start-up to ensure a full shutdown.
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
- Disable BitLocker automatic device encryption.
- Disable network connectivity during Modern Standby to reduce battery drain.
#### Windows Update
- Prevent Windows from getting updates as soon as they're available.
- Prevent automatic restarts after updates while signed in.
- Disable sharing of downloaded updates with other PCs, also known as Delivery Optimization.
#### Appearance
@@ -130,35 +127,51 @@ Below is an overview of the key features and functionality offered by Win11Deblo
- Disable transparency effects
- Disable animations and visual effects.
#### Start Menu
#### Start Menu & Search
- Remove or replace all pinned apps from start for the current user, or for all existing & new users. (W11 only)
- Disable the recommended section in the start menu. (W11 only)
- Remove or replace all pinned apps from the start menu.
- Hide the recommended section in the start menu.
- Hide the 'All Apps' section in the start menu.
- Disable the Phone Link mobile devices integration in the start menu.
- Disable Bing web search & Copilot integration in Windows search.
- Disable the Phone Link mobile devices integration in the start menu. (W11 only)
- Disable Microsoft Store app suggestions in Windows search.
- Disable Search Highlights (dynamic/branded content) in the taskbar search box.
- Disable local Windows search history.
#### Taskbar
- Align taskbar icons to the left. (W11 only)
- Hide or change the search icon/box on the taskbar. (W11 only)
- Hide the taskview button from the taskbar. (W11 only)
- Align taskbar icons to the left.
- Hide or change the search icon/box on the taskbar.
- Hide the taskview button from the taskbar.
- Disable widgets on the taskbar & lock screen.
- Hide the chat (meet now) icon from the taskbar. (W10 only)
- Enable the 'End Task' option in the taskbar right click menu. (W11 only)
- Hide the chat (meet now) icon from the taskbar.
- Enable the 'End Task' option in the taskbar right click menu.
- Enable the 'Last Active Click' behavior in the taskbar app area. This allows you to repeatedly click on an application's icon in the taskbar to switch focus between the open windows of that application.
- Choose how app icons are shown on the taskbar when using multiple monitors. (W11 only)
- Choose combine mode for taskbar buttons and labels. (W11 only)
- Choose how app icons are shown on the taskbar when using multiple monitors.
- Choose combine mode for taskbar buttons and labels.
#### File Explorer
- Change the default location that File Explorer opens to.
- Show file extensions for known file types.
- Show hidden files, folders and drives.
- Hide the Home or Gallery section from the File Explorer navigation pane. (W11 only)
- Hide the Home or Gallery section from the File Explorer navigation pane.
- Hide duplicate removable drive entries from the File Explorer navigation pane, so only the entry under 'This PC' remains.
- Add all common folders (Desktop, Downloads, etc.) back to 'This PC' in File Explorer. (W11 only)
- Hide the 3D objects, music or OneDrive folder from the File Explorer navigation pane. (W10 only)
- Hide the 'Include in library', 'Give access to' and 'Share' options from the context menu. (W10 only)
- Add all common folders (Desktop, Downloads, etc.) back to 'This PC' in File Explorer.
- Hide the 3D objects, music or OneDrive folder from the File Explorer navigation pane.
- Hide the 'Include in library', 'Give access to' and 'Share' options from the context menu.
#### Multi-tasking
- Disable window snapping.
- Disable Snap Assist suggestions when snapping a window.
- Disable Snap Layout suggestions when dragging windows to the top of screen and when hovering on the maximize button.
- Change if tabs are shown when snapping or pressing Alt+Tab.
#### Optional Windows Features
- Enable Windows Sandbox, a lightweight desktop environment for safely running applications in isolation.
- Enable Windows Subsystem for Linux which allows you to run a Linux environment directly on Windows.
#### Other
@@ -170,6 +183,10 @@ Below is an overview of the key features and functionality offered by Win11Deblo
- Option to [apply changes to a different user](https://github.com/Raphire/Win11Debloat/wiki/Advanced-Features#running-as-another-user), instead of the currently logged in user.
- [Sysprep mode](https://github.com/Raphire/Win11Debloat/wiki/Advanced-Features#sysprep-mode) to apply changes to the Windows Default user profile. Which ensures, all new users will have the changes automatically applied to them.
## Contributing
We welcome contributions of all kinds! Please see our [Contributing Guidelines](/.github/CONTRIBUTING.md) for detailed instructions on how to get started and best practices for contributing.
## License
Win11Debloat is licensed under the MIT license. See the LICENSE file for more information.

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSAIFabricSvc]
"Start"=dword:00000003

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLocker]
"PreventDeviceEncryption"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable sharing downloaded updates with other PCs (Delivery Optimization)
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings]
"DownloadMode"=dword:00000000

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Find My Device location tracking
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FindMyDevice]
"AllowFindMyDevice"=dword:00000000

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors]
"DisableLocation"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Search Highlights (dynamic/branded content in Windows search box)
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings]
"IsDynamicSearchBoxEnabled"=dword:00000000

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Windows search history
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings]
"IsDeviceSearchHistoryEnabled"=dword:00000000

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStartMenuMorePrograms"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Storage Sense
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy]
"01"=dword:00000000

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Turn Off "Get the latest updates as soon as they're available"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
"IsContinuousInnovationOptedIn"=dword:00000000

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WindowArrangementActive"="0"

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000003

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Prevent automatic restarts after updates while signed in
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000000

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000002

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000001

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSAIFabricSvc]
"Start"=dword:00000003

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLocker]
"PreventDeviceEncryption"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable sharing downloaded updates with other PCs (Delivery Optimization)
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings]
"DownloadMode"=dword:00000000

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Find My Device location tracking
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FindMyDevice]
"AllowFindMyDevice"=dword:00000000

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors]
"DisableLocation"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Search Highlights (dynamic/branded content in Windows search box)
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\SearchSettings]
"IsDynamicSearchBoxEnabled"=dword:00000000

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Windows search history
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\SearchSettings]
"IsDeviceSearchHistoryEnabled"=dword:00000000

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStartMenuMorePrograms"=dword:00000001

View File

@@ -0,0 +1,6 @@
Windows Registry Editor Version 5.00
; Disable Storage Sense
[HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy]
"01"=dword:00000000

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Turn Off "Get the latest updates as soon as they're available"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
"IsContinuousInnovationOptedIn"=dword:00000000

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\Control Panel\Desktop]
"WindowArrangementActive"="0"

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000003

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Prevent automatic restarts after updates while signed in
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000000

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000002

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[hkey_users\default\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"MultiTaskingAltTabFilter"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Allow automatic restarts after updates while signed in
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=-

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSAIFabricSvc]
"Start"=dword:00000002

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLocker]
"PreventDeviceEncryption"=-

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Enable sharing downloaded updates with other PCs (Delivery Optimization)
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings]
"DownloadMode"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Restore Find My Device to Windows default
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FindMyDevice]
"AllowFindMyDevice"=-

View File

@@ -17,4 +17,4 @@ Windows Registry Editor Version 5.00
"URL Protocol"=""
"NoOpenWith"=-
[-HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
[-HKEY_CLASSES_ROOT\ms-gamebarservices\shell\open\command]

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors]
"DisableLocation"=-

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Re-enable Search Highlights (dynamic/branded content in Windows search box)
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings]
"IsDynamicSearchBoxEnabled"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Disable Windows search history
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings]
"IsDeviceSearchHistoryEnabled"=dword:00000001

Binary file not shown.

Binary file not shown.

View 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"=-

View File

@@ -0,0 +1,6 @@
Windows Registry Editor Version 5.00
; Enable Storage Sense
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy]
"01"=dword:00000001

View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; Turn On "Get the latest updates as soon as they're available"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
"IsContinuousInnovationOptedIn"=dword:00000001

View File

@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WindowArrangementActive"="1"

View File

@@ -4,7 +4,10 @@ setlocal EnableDelayedExpansion
:: Set Windows Terminal installation paths. (Default and Scoop installation)
set "wtDefaultPath=%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe"
set "wtScoopPath=%USERPROFILE%\scoop\apps\windows-terminal\current\wt.exe"
set "logFile=%~dp0Win11Debloat.log"
set "logFile=%~dp0Logs\Win11Debloat-Run.log"
:: Ensure Logs folder exists
if not exist "%~dp0Logs" mkdir "%~dp0Logs"
:: Determine which terminal exists
if exist "%wtDefaultPath%" (

170
Schemas/AboutWindow.xaml Normal file
View File

@@ -0,0 +1,170 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="About Win11Debloat"
Width="500"
SizeToContent="Height"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Topmost="True"
ShowInTaskbar="False">
<Border BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1"
CornerRadius="8"
Background="{DynamicResource CardBgColor}"
Margin="25">
<Border.Effect>
<DropShadowEffect Color="Black"
Opacity="0.15"
BlurRadius="20"
ShadowDepth="0"
Direction="0"/>
</Border.Effect>
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Title Bar -->
<Grid Grid.Row="0" x:Name="TitleBar" Height="48" Background="Transparent">
<TextBlock Text="About Win11Debloat"
Foreground="{DynamicResource FgColor}"
FontSize="18"
FontWeight="SemiBold"
VerticalAlignment="Center"
Margin="20,0,0,0"/>
</Grid>
<!-- Message Content -->
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Message Text -->
<Grid Grid.Row="0" Margin="24,12,24,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Version -->
<TextBlock Grid.Row="0" Grid.Column="0"
Text="Version:"
FontSize="14"
Foreground="{DynamicResource FgColor}"
FontWeight="SemiBold"
Margin="0,0,16,8"/>
<TextBlock x:Name="VersionText"
Grid.Row="0" Grid.Column="1"
Text="0.0.0"
FontSize="14"
Foreground="{DynamicResource FgColor}"
Margin="0,0,0,8"/>
<!-- Author -->
<TextBlock Grid.Row="1" Grid.Column="0"
Text="Author:"
FontSize="14"
Foreground="{DynamicResource FgColor}"
FontWeight="SemiBold"
Margin="0,0,16,8"/>
<TextBlock Grid.Row="1" Grid.Column="1"
Text="Raphire"
FontSize="14"
Foreground="{DynamicResource FgColor}"
Margin="0,0,0,8"/>
<!-- Project Link -->
<TextBlock Grid.Row="2" Grid.Column="0"
Text="Project:"
FontSize="14"
Foreground="{DynamicResource FgColor}"
FontWeight="SemiBold"
Margin="0,0,16,0"/>
<TextBlock x:Name="ProjectLink"
Grid.Row="2" Grid.Column="1"
Text="https://github.com/Raphire/Win11Debloat"
FontSize="14"
Style="{DynamicResource HyperlinkStyle}"
Margin="0,0,0,0"/>
</Grid>
<!-- Separator -->
<Border Grid.Row="1"
Height="1"
Background="{DynamicResource BorderColor}"
Margin="10,0"/>
<!-- Content -->
<StackPanel Grid.Row="2" Margin="24,20">
<!-- Donation Message -->
<TextBlock Text="Win11Debloat is a passion project that I maintain in my free time. If you've found this tool useful, please consider making a small donation to support its development. I really appreciate it!"
FontSize="14"
Foreground="{DynamicResource FgColor}"
TextWrapping="Wrap"
Margin="0,0,0,15"/>
<!-- Ko-fi Link -->
<Grid HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="KofiLinkIcon"
Grid.Column="0"
FontSize="16"
Style="{DynamicResource HyperlinkStyle}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="SemiBold"
FontFamily="Segoe Fluent Icons"
Text="&#xEB52;"
Foreground="{DynamicResource CloseHover}"
Margin="0,0,8,0"/>
<TextBlock x:Name="KofiLink"
Grid.Column="1"
FontSize="16"
Style="{DynamicResource HyperlinkStyle}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="SemiBold"
Text="Support me on Ko-fi"/>
</Grid>
</StackPanel>
</Grid>
<!-- Button Panel -->
<Border Grid.Row="2"
Background="{DynamicResource BgColor}"
BorderBrush="{DynamicResource BorderColor}"
BorderThickness="0,1,0,0"
Padding="16,12"
CornerRadius="0,0,8,8">
<StackPanel x:Name="ButtonPanel"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button x:Name="CloseButton"
Content="Close"
Height="32" MinWidth="80" Margin="4,0"
Style="{DynamicResource SecondaryButtonStyle}"/>
</StackPanel>
</Border>
</Grid>
</Border>
</Window>

View File

@@ -9,43 +9,6 @@
Background="Transparent"
Foreground="{DynamicResource FgColor}">
<Window.Resources>
<!-- ScrollBar Style -->
<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Width" Value="8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid>
<Track Name="PART_Track" IsDirectionReversed="true">
<Track.Thumb>
<Thumb>
<Thumb.Style>
<Style TargetType="Thumb">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbColor}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Background="{TemplateBinding Background}" CornerRadius="4"/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbHoverColor}"/>
</Trigger>
</Style.Triggers>
</Style>
</Thumb.Style>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- CheckBox Style -->
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
@@ -95,84 +58,6 @@
<Setter Property="Margin" Value="2,3,2,3"/>
</Style>
<!-- Button Style -->
<Style x:Key="Win11Button" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonBg}"/>
<Setter Property="Foreground" Value="white"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDisabled}"/>
<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHover}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonPressed}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonPressed}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- Secondary Button Style -->
<Style x:Key="Win11ButtonSecondary" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonBg}"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,1"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
<Setter Property="Foreground" Value="{DynamicResource SecondaryButtonTextDisabled}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonPressed}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- Title Bar Button Style -->
<Style x:Key="TitleBarButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
@@ -205,7 +90,15 @@
<Border BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1"
CornerRadius="8"
Background="{DynamicResource BgColor}">
Background="{DynamicResource BgColor}"
Margin="25">
<Border.Effect>
<DropShadowEffect Color="Black"
Opacity="0.15"
BlurRadius="20"
ShadowDepth="0"
Direction="0"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
@@ -227,7 +120,7 @@
Margin="12,0,0,0"
FontSize="12"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button x:Name="CloseBtn" Content="&#xE8BB;" Style="{StaticResource CloseButton}" ToolTip="Close" IsCancel="True"/>
<Button x:Name="CloseBtn" Content="&#xE8BB;" Style="{StaticResource CloseButton}" ToolTip="Close" IsCancel="True" AutomationProperties.Name="Close"/>
</StackPanel>
</Grid>
</Border>
@@ -250,7 +143,7 @@
Margin="0,0,0,10"/>
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,8">
<CheckBox x:Name="CheckAllBox" Content="Check/Uncheck all" Margin="8,0,15,0" Foreground="{DynamicResource FgColor}"/>
<CheckBox x:Name="CheckAllBox" Content="Check/Uncheck all" Margin="8,0,15,0" Foreground="{DynamicResource FgColor}" AutomationProperties.Name="Check or Uncheck all"/>
</StackPanel>
<Border Grid.Row="2" BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="0,0,0,10" Background="{DynamicResource CardBgColor}">
@@ -266,13 +159,23 @@
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
<Grid Margin="0,8,10,10">
<CheckBox x:Name="OnlyInstalledBox" Content="Only show installed apps" Foreground="{DynamicResource FgColor}" />
<CheckBox x:Name="OnlyInstalledBox" Content="Only show installed apps" Foreground="{DynamicResource FgColor}" AutomationProperties.Name="Only show installed apps"/>
</Grid>
<Button x:Name="ConfirmBtn" Width="80" Height="32" Margin="0,0,10,0" Content="Confirm" Style="{StaticResource Win11Button}"/>
<Button x:Name="CancelBtn" Width="80" Height="32" Content="Cancel" Style="{StaticResource Win11ButtonSecondary}" IsCancel="True"/>
<Button x:Name="ConfirmBtn" Width="80" Height="32" Margin="0,0,10,0" Content="Confirm" Style="{DynamicResource PrimaryButtonStyle}" AutomationProperties.Name="Confirm"/>
<Button x:Name="CancelBtn" Width="80" Height="32" Content="Cancel" Style="{DynamicResource SecondaryButtonStyle}" IsCancel="True" AutomationProperties.Name="Cancel"/>
</StackPanel>
</Grid>
</Grid>
<!-- Modal Overlay for MessageBoxes -->
<Rectangle x:Name="ModalOverlay"
Grid.RowSpan="2"
Fill="#80000000"
Visibility="Collapsed"
Panel.ZIndex="1000"
RadiusX="8"
RadiusY="8"
Margin="-1"/>
</Grid>
</Border>
</Window>

View File

@@ -0,0 +1,203 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Apply Changes"
Width="500"
SizeToContent="Height"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Topmost="True"
ShowInTaskbar="False">
<Border BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1"
CornerRadius="8"
Background="{DynamicResource CardBgColor}"
Margin="25">
<Border.Effect>
<DropShadowEffect Color="Black"
Opacity="0.15"
BlurRadius="20"
ShadowDepth="0"
Direction="0"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Close/Cancel button (top right) -->
<Button x:Name="ApplyCancelBtn" Grid.Row="0"
HorizontalAlignment="Right" VerticalAlignment="Top"
Width="36" Height="32"
BorderThickness="0"
Cursor="Hand"
ToolTip="Cancel"
AutomationProperties.Name="Cancel">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="0,8,0,0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Button.Template>
<Button.Style>
<Style TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource CloseHover}"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<TextBlock Text="&#xE8BB;" FontFamily="Segoe Fluent Icons" FontSize="10"/>
</Button>
<StackPanel Grid.Row="0" Grid.RowSpan="2">
<!-- In-progress content -->
<StackPanel x:Name="ApplyInProgressPanel">
<StackPanel Margin="32,24">
<!-- Loading icon (spinning) -->
<TextBlock x:Name="ApplySpinnerIcon"
Text="&#xE895;"
FontFamily="Segoe Fluent Icons"
FontSize="36"
Foreground="{DynamicResource ButtonBg}"
HorizontalAlignment="Center"
Margin="0,0,0,16"
RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<RotateTransform x:Name="SpinnerRotation" Angle="0"/>
</TextBlock.RenderTransform>
<TextBlock.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="SpinnerRotation"
Storyboard.TargetProperty="Angle"
From="0" To="360"
Duration="0:0:1.5"
RepeatBehavior="Forever"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</TextBlock.Triggers>
</TextBlock>
<TextBlock Text="Applying Changes"
Style="{DynamicResource ModalTitleStyle}"/>
<!-- Current step name -->
<TextBlock x:Name="ApplyStepName"
Text="Preparing..."
Style="{DynamicResource ModalSubtextStyle}"
TextTrimming="CharacterEllipsis"
MaxWidth="430"/>
</StackPanel>
<Border Background="{DynamicResource BgColor}"
BorderBrush="{DynamicResource BorderColor}"
BorderThickness="0,1,0,0"
Padding="16,12"
CornerRadius="0,0,8,8">
<StackPanel>
<!-- Progress bar -->
<ProgressBar x:Name="ApplyProgressBar"
Style="{DynamicResource ApplyProgressBarStyle}"
Minimum="0" Maximum="100" Value="0"
Margin="0,2,0,8"/>
<!-- Step counter -->
<TextBlock x:Name="ApplyStepCounter"
Text="Step 0 of 0"
FontSize="12"
Foreground="{DynamicResource FgColor}"
HorizontalAlignment="Right"
Opacity="0.8"/>
</StackPanel>
</Border>
</StackPanel>
<!-- Completion content -->
<StackPanel x:Name="ApplyCompletionPanel" Visibility="Collapsed">
<StackPanel Margin="32,24">
<!-- Success icon -->
<TextBlock x:Name="ApplyCompletionIcon"
Text="&#xE73E;"
FontFamily="Segoe Fluent Icons"
FontSize="40"
Foreground="{DynamicResource ButtonBg}"
HorizontalAlignment="Center"
Margin="0,0,0,12"/>
<TextBlock x:Name="ApplyCompletionTitle"
Text="Changes Applied"
Style="{DynamicResource ModalTitleStyle}"/>
<TextBlock x:Name="ApplyCompletionMessage"
Text="Please note that some changes will only take effect after a reboot. Thanks for using Win11Debloat!"
TextWrapping="Wrap"
Style="{DynamicResource ModalSubtextStyle}"/>
</StackPanel>
<!-- Reboot required section -->
<Border x:Name="ApplyRebootPanel"
Visibility="Collapsed"
BorderBrush="{DynamicResource BorderColor}"
HorizontalAlignment="Center"
BorderThickness="0,1,0,1"
Padding="24,12,24,14">
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
<TextBlock Text="&#xE7BA;"
FontFamily="Segoe Fluent Icons"
FontSize="14"
Foreground="#e8912d"
VerticalAlignment="Center"
Margin="0,0,8,0"/>
<TextBlock Text="A reboot is required for these changes to take effect:"
FontSize="13"
FontWeight="SemiBold"
Foreground="{DynamicResource FgColor}"
VerticalAlignment="Center"/>
</StackPanel>
<StackPanel x:Name="ApplyRebootList" Margin="22,0,0,0"/>
</StackPanel>
</Border>
<!-- Button Panel -->
<Border Background="{DynamicResource BgColor}"
BorderBrush="{DynamicResource BorderColor}"
BorderThickness="0,1,0,0"
Padding="16,12"
CornerRadius="0,0,8,8">
<StackPanel x:Name="ButtonPanel"
Orientation="Horizontal"
HorizontalAlignment="Center">
<Button x:Name="ApplyKofiBtn" Width="210" Height="32"
Style="{DynamicResource SecondaryButtonStyle}"
Margin="0,0,12,0"
AutomationProperties.Name="Support the creator">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="&#xEB52;" FontFamily="Segoe Fluent Icons" FontSize="14" VerticalAlignment="Center" Margin="0,0,8,-1"/>
<TextBlock Text="Support the creator" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
</StackPanel>
</Button>
<Button x:Name="ApplyCloseBtn" Width="100" Height="32"
Style="{DynamicResource PrimaryButtonStyle}"
AutomationProperties.Name="Close">
<TextBlock Text="Close" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
</Button>
</StackPanel>
</Border>
</StackPanel>
</StackPanel>
</Grid>
</Border>
</Window>

41
Schemas/BubbleHint.xaml Normal file
View File

@@ -0,0 +1,41 @@
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="BubblePanel"
SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Name="BubbleBorder"
Grid.Row="0"
Background="{DynamicResource CardBgColor}"
BorderBrush="{DynamicResource ButtonBorderColor}"
BorderThickness="1"
CornerRadius="8"
Padding="10,7,10,7">
<TextBlock Name="BubbleText"
Text="View the selected changes here"
TextWrapping="Wrap"
MaxWidth="260"
Foreground="{DynamicResource FgColor}"/>
</Border>
<Grid Grid.Row="1"
HorizontalAlignment="Center"
Margin="0,-1,0,0"
Width="12"
Height="8">
<Polygon Name="BubblePointer"
Points="0,0 12,0 6,7"
Fill="{DynamicResource CardBgColor}"
Stroke="{DynamicResource ButtonBorderColor}"
StrokeThickness="1"
Stretch="Fill"/>
<Rectangle VerticalAlignment="Top"
Height="2"
Margin="1,-1,1,0"
Fill="{DynamicResource CardBgColor}"/>
</Grid>
</Grid>

1214
Schemas/MainWindow.xaml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,99 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MessageBox"
Width="440"
SizeToContent="Height"
MaxHeight="501"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Topmost="True"
ShowInTaskbar="False">
<Border BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1"
CornerRadius="8"
Background="{DynamicResource CardBgColor}"
Margin="25">
<Border.Effect>
<DropShadowEffect Color="Black"
Opacity="0.15"
BlurRadius="20"
ShadowDepth="0"
Direction="0"/>
</Border.Effect>
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Title Bar -->
<Grid Grid.Row="0" x:Name="TitleBar" Height="40" Background="Transparent">
<TextBlock x:Name="TitleText"
Text="Message"
Foreground="{DynamicResource FgColor}"
FontSize="16"
FontWeight="SemiBold"
VerticalAlignment="Center"
Margin="16,0,0,0"/>
</Grid>
<!-- Message Content -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" MaxHeight="500" Padding="0" Margin="20,12,1,20">
<Grid Margin="0,0,20,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Icon -->
<TextBlock x:Name="IconText"
Grid.Column="0"
FontFamily="Segoe Fluent Icons"
FontSize="24"
Foreground="{DynamicResource FgColor}"
VerticalAlignment="Center"
Margin="4,2,14,0"
Visibility="Collapsed"/>
<!-- Message Text -->
<TextBlock x:Name="MessageText"
Grid.Column="1"
Text="Message content goes here"
TextWrapping="Wrap"
FontSize="14"
LineHeight="20"
Foreground="{DynamicResource FgColor}"
VerticalAlignment="Center"/>
</Grid>
</ScrollViewer>
<!-- Button Panel -->
<Border Grid.Row="2"
Background="{DynamicResource BgColor}"
BorderBrush="{DynamicResource BorderColor}"
BorderThickness="0,1,0,0"
Padding="16,12"
CornerRadius="0,0,8,8">
<StackPanel x:Name="ButtonPanel"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button x:Name="Button1"
Content="OK"
Height="32" MinWidth="80" Margin="4,0"
Style="{DynamicResource PrimaryButtonStyle}"/>
<Button x:Name="Button2"
Content="Cancel"
Height="32" MinWidth="80" Margin="4,0"
Style="{DynamicResource SecondaryButtonStyle}"
Visibility="Collapsed"/>
</StackPanel>
</Border>
</Grid>
</Border>
</Window>

165
Schemas/SharedStyles.xaml Normal file
View File

@@ -0,0 +1,165 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Primary Button Style -->
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonBg}"/>
<Setter Property="Foreground" Value="white"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDisabled}"/>
<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHover}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonPressed}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonPressed}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- Secondary Button Style -->
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonBg}"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,1"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
<Setter Property="Foreground" Value="{DynamicResource SecondaryButtonTextDisabled}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonPressed}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- Hyperlink Style -->
<Style x:Key="HyperlinkStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource ButtonBg}"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource ButtonHover}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ProgressBar Style -->
<Style x:Key="ApplyProgressBarStyle" TargetType="ProgressBar">
<Setter Property="Background" Value="{DynamicResource ButtonBorderColor}"/>
<Setter Property="Foreground" Value="{DynamicResource ButtonBg}"/>
<Setter Property="Height" Value="6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<Grid>
<Border x:Name="PART_Track" Background="{TemplateBinding Background}" CornerRadius="3" Height="{TemplateBinding Height}"/>
<Border x:Name="PART_Indicator" Background="{TemplateBinding Foreground}" CornerRadius="3" HorizontalAlignment="Left" Height="{TemplateBinding Height}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Modal Title Style -->
<Style x:Key="ModalTitleStyle" TargetType="TextBlock">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,0,8"/>
</Style>
<!-- Modal Subtext Style -->
<Style x:Key="ModalSubtextStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="13"/>
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
<Setter Property="Opacity" Value="0.8"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<!-- ScrollBar Style -->
<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Width" Value="8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid>
<Track Name="PART_Track" IsDirectionReversed="true">
<Track.Thumb>
<Thumb>
<Thumb.Style>
<Style TargetType="Thumb">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbColor}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Background="{TemplateBinding Background}" CornerRadius="4"/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ScrollBarThumbHoverColor}"/>
</Trigger>
</Style.Triggers>
</Style>
</Thumb.Style>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,57 @@
# Forcefully removes Microsoft Edge using its uninstaller
# Credit: Based on work from loadstring1 & ave9858
function ForceRemoveEdge {
Write-Host "> Forcefully uninstalling Microsoft Edge..."
$regView = [Microsoft.Win32.RegistryView]::Registry32
$hklm = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView)
$hklm.CreateSubKey('SOFTWARE\Microsoft\EdgeUpdateDev').SetValue('AllowUninstall', '')
# Create stub (This somehow allows uninstalling Edge)
$edgeStub = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
New-Item $edgeStub -ItemType Directory | Out-Null
New-Item "$edgeStub\MicrosoftEdge.exe" | Out-Null
# Remove edge
$uninstallRegKey = $hklm.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge')
if ($null -ne $uninstallRegKey) {
Write-Host "Running uninstaller..."
$uninstallString = $uninstallRegKey.GetValue('UninstallString') + ' --force-uninstall'
Invoke-NonBlocking -ScriptBlock {
param($cmd)
Start-Process cmd.exe "/c $cmd" -WindowStyle Hidden -Wait
} -ArgumentList $uninstallString
Write-Host "Removing leftover files..."
$edgePaths = @(
"$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk",
"$env:APPDATA\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk",
"$env:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Microsoft Edge.lnk",
"$env:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Tombstones\Microsoft Edge.lnk",
"$env:PUBLIC\Desktop\Microsoft Edge.lnk",
"$env:USERPROFILE\Desktop\Microsoft Edge.lnk",
"$edgeStub"
)
foreach ($path in $edgePaths) {
if (Test-Path -Path $path) {
Remove-Item -Path $path -Force -Recurse -ErrorAction SilentlyContinue
Write-Host " Removed $path" -ForegroundColor DarkGray
}
}
Write-Host "Cleaning up registry..."
# Remove MS Edge from autostart
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "MicrosoftEdgeAutoLaunch_A9F6DCE4ABADF4F51CF45CD7129E3C6C" /f *>$null
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "Microsoft Edge Update" /f *>$null
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" /v "MicrosoftEdgeAutoLaunch_A9F6DCE4ABADF4F51CF45CD7129E3C6C" /f *>$null
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" /v "Microsoft Edge Update" /f *>$null
Write-Host "Microsoft Edge was uninstalled"
}
else {
Write-Host "Unable to forcefully uninstall Microsoft Edge, uninstaller could not be found" -ForegroundColor Red
}
}

View File

@@ -0,0 +1,31 @@
# Run winget list and return installed apps.
# Use -NonBlocking to keep the UI responsive (GUI mode) via Invoke-NonBlocking.
function GetInstalledAppsViaWinget {
param (
[int]$TimeOut = 10,
[switch]$NonBlocking
)
if (-not $script:WingetInstalled) { return $null }
$fetchBlock = {
param($timeOut)
$job = Start-Job { return winget list --accept-source-agreements --disable-interactivity }
$done = $job | Wait-Job -Timeout $timeOut
if ($done) {
$result = Receive-Job -Job $job
Remove-Job -Job $job -ErrorAction SilentlyContinue
return $result
}
Remove-Job -Job $job -Force -ErrorAction SilentlyContinue
return $null
}
if ($NonBlocking) {
return Invoke-NonBlocking -ScriptBlock $fetchBlock -ArgumentList $TimeOut
}
else {
return & $fetchBlock $TimeOut
}
}

View File

@@ -0,0 +1,111 @@
# Removes apps specified during function call based on the target scope.
function RemoveApps {
param (
$appslist
)
# Determine target from script-level params, defaulting to AllUsers
$targetUser = GetTargetUserForAppRemoval
$appIndex = 0
$appCount = @($appsList).Count
Foreach ($app in $appsList) {
if ($script:CancelRequested) {
return
}
$appIndex++
# Update step name and sub-progress to show which app is being removed (only for bulk removal)
if ($script:ApplySubStepCallback -and $appCount -gt 1) {
& $script:ApplySubStepCallback "Removing apps ($appIndex/$appCount)" $appIndex $appCount
}
Write-Host "Attempting to remove $app..."
# Use WinGet only to remove OneDrive and Edge
if (($app -eq "Microsoft.OneDrive") -or ($app -eq "Microsoft.Edge")) {
if ($script:WingetInstalled -eq $false) {
Write-Host "WinGet is either not installed or is outdated, $app could not be removed" -ForegroundColor Red
continue
}
$appName = $app -replace '\.', '_'
# Uninstall app via WinGet, or create a scheduled task to uninstall it later
if ($script:Params.ContainsKey("User")) {
ImportRegistryFile "Adding scheduled task to uninstall $app for user $(GetUserName)..." "Uninstall_$($appName).reg"
}
elseif ($script:Params.ContainsKey("Sysprep")) {
ImportRegistryFile "Adding scheduled task to uninstall $app after for new users..." "Uninstall_$($appName).reg"
}
else {
# Uninstall app via WinGet
$wingetOutput = Invoke-NonBlocking -ScriptBlock {
param($appId)
winget uninstall --accept-source-agreements --disable-interactivity --id $appId
} -ArgumentList $app
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
Write-Host "Unable to uninstall Microsoft Edge via WinGet" -ForegroundColor Red
if ($script:GuiWindow) {
$result = Show-MessageBox -Message 'Unable to uninstall Microsoft Edge via WinGet. Would you like to forcefully uninstall it? NOT RECOMMENDED!' -Title 'Force Uninstall Microsoft Edge?' -Button 'YesNo' -Icon 'Warning'
if ($result -eq 'Yes') {
Write-Host ""
ForceRemoveEdge
}
}
elseif ($( Read-Host -Prompt "Would you like to forcefully uninstall Microsoft Edge? NOT RECOMMENDED! (y/n)" ) -eq 'y') {
Write-Host ""
ForceRemoveEdge
}
}
}
continue
}
# Use Remove-AppxPackage to remove all other apps
$appPattern = '*' + $app + '*'
try {
switch ($targetUser) {
"AllUsers" {
# Remove installed app for all existing users, and from OS image
Invoke-NonBlocking -ScriptBlock {
param($pattern)
Get-AppxPackage -Name $pattern -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction Continue
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $pattern } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }
} -ArgumentList $appPattern
}
"CurrentUser" {
# Remove installed app for current user only
Invoke-NonBlocking -ScriptBlock {
param($pattern)
Get-AppxPackage -Name $pattern | Remove-AppxPackage -ErrorAction Continue
} -ArgumentList $appPattern
}
default {
# Target is a specific username - remove app for that user only
Invoke-NonBlocking -ScriptBlock {
param($pattern, $user)
$userAccount = New-Object System.Security.Principal.NTAccount($user)
$userSid = $userAccount.Translate([System.Security.Principal.SecurityIdentifier]).Value
Get-AppxPackage -Name $pattern -User $userSid | Remove-AppxPackage -User $userSid -ErrorAction Continue
} -ArgumentList @($appPattern, $targetUser)
}
}
}
catch {
if ($DebugPreference -ne "SilentlyContinue") {
Write-Host "Something went wrong while trying to remove $app" -ForegroundColor Yellow
Write-Host $psitem.Exception.StackTrace -ForegroundColor Gray
}
}
}
Write-Host ""
}

View File

@@ -0,0 +1,11 @@
function AwaitKeyToExit {
# Suppress prompt if Silent parameter was passed
if (-not $Silent) {
Write-Output ""
Write-Output "Press any key to exit..."
$null = [System.Console]::ReadKey()
}
Stop-Transcript
Exit
}

View File

@@ -0,0 +1,20 @@
# Prints the header for the script
function PrintHeader {
param (
$title
)
$fullTitle = " Win11Debloat Script - $title"
if ($script:Params.ContainsKey("Sysprep")) {
$fullTitle = "$fullTitle (Sysprep mode)"
}
else {
$fullTitle = "$fullTitle (User: $(GetUserName))"
}
Clear-Host
Write-Host "-------------------------------------------------------------------------------------------"
Write-Host $fullTitle
Write-Host "-------------------------------------------------------------------------------------------"
}

View File

@@ -0,0 +1,66 @@
# Prints all pending changes that will be made by the script
function PrintPendingChanges {
Write-Output "Win11Debloat will make the following changes:"
if ($script:Params['CreateRestorePoint']) {
Write-Output "- $($script:Features['CreateRestorePoint'].Label)"
}
foreach ($parameterName in $script:Params.Keys) {
if ($script:ControlParams -contains $parameterName) {
continue
}
# Print parameter description
switch ($parameterName) {
'Apps' {
continue
}
'CreateRestorePoint' {
continue
}
'RemoveApps' {
$appsList = GenerateAppsList
if ($appsList.Count -eq 0) {
Write-Host "No valid apps were selected for removal" -ForegroundColor Yellow
Write-Output ""
continue
}
Write-Output "- Remove $($appsList.Count) apps:"
Write-Host $appsList -ForegroundColor DarkGray
continue
}
'RemoveAppsCustom' {
$appsList = LoadAppsFromFile $script:CustomAppsListFilePath
if ($appsList.Count -eq 0) {
Write-Host "No valid apps were selected for removal" -ForegroundColor Yellow
Write-Output ""
continue
}
Write-Output "- Remove $($appsList.Count) apps:"
Write-Host $appsList -ForegroundColor DarkGray
continue
}
default {
if ($script:Features -and $script:Features.ContainsKey($parameterName)) {
$action = $script:Features[$parameterName].Action
$message = $script:Features[$parameterName].Label
Write-Output "- $action $message"
}
else {
# Fallback: show the parameter name if no feature description is available
Write-Output "- $parameterName"
}
continue
}
}
}
Write-Output ""
Write-Output ""
Write-Output "Press enter to execute the script or press CTRL+C to quit..."
Read-Host | Out-Null
}

View File

@@ -0,0 +1,28 @@
# Shows the CLI app removal menu and prompts the user to select which apps to remove.
function ShowCLIAppRemoval {
PrintHeader "App Removal"
Write-Output "> Opening app selection form..."
$result = Show-AppSelectionWindow
if ($result -eq $true) {
Write-Output "You have selected $($script:SelectedApps.Count) apps for removal"
AddParameter 'RemoveAppsCustom'
SaveSettings
# Suppress prompt if Silent parameter was passed
if (-not $Silent) {
Write-Output ""
Write-Output ""
Write-Output "Press enter to remove the selected apps or press CTRL+C to quit..."
Read-Host | Out-Null
PrintHeader "App Removal"
}
}
else {
Write-Host "Selection was cancelled, no apps have been removed" -ForegroundColor Red
Write-Output ""
}
}

View File

@@ -0,0 +1,33 @@
# Shows the CLI default mode app removal options. Loops until a valid option is selected.
function ShowCLIDefaultModeAppRemovalOptions {
PrintHeader 'Default Mode'
Write-Host "Please note: The default selection of apps includes Microsoft Teams, Spotify, Sticky Notes and more. Select option 2 to verify and change what apps are removed by the script" -ForegroundColor DarkGray
Write-Host ""
Do {
Write-Host "Options:" -ForegroundColor Yellow
Write-Host " (n) Don't remove any apps" -ForegroundColor Yellow
Write-Host " (1) Only remove the default selection of apps" -ForegroundColor Yellow
Write-Host " (2) Manually select which apps to remove" -ForegroundColor Yellow
$RemoveAppsInput = Read-Host "Do you want to remove any apps? Apps will be removed for all users (n/1/2)"
# Show app selection form if user entered option 3
if ($RemoveAppsInput -eq '2') {
$result = Show-AppSelectionWindow
if ($result -ne $true) {
# User cancelled or closed app selection, change RemoveAppsInput so the menu will be shown again
Write-Host ""
Write-Host "Cancelled application selection, please try again" -ForegroundColor Red
$RemoveAppsInput = 'c'
}
Write-Host ""
}
}
while ($RemoveAppsInput -ne 'n' -and $RemoveAppsInput -ne '0' -and $RemoveAppsInput -ne '1' -and $RemoveAppsInput -ne '2')
return $RemoveAppsInput
}

View File

@@ -0,0 +1,55 @@
# Show CLI default mode options for removing apps, or set selection if RunDefaults or RunDefaultsLite parameter was passed
function ShowCLIDefaultModeOptions {
if ($RunDefaults) {
$RemoveAppsInput = '1'
}
elseif ($RunDefaultsLite) {
$RemoveAppsInput = '0'
}
else {
$RemoveAppsInput = ShowCLIDefaultModeAppRemovalOptions
if ($RemoveAppsInput -eq '2' -and ($script:SelectedApps.contains('Microsoft.XboxGameOverlay') -or $script:SelectedApps.contains('Microsoft.XboxGamingOverlay')) -and
$( Read-Host -Prompt "Disable Game Bar integration and game/screen recording? This also stops ms-gamingoverlay and ms-gamebar popups (y/n)" ) -eq 'y') {
$DisableGameBarIntegrationInput = $true;
}
}
PrintHeader 'Default Mode'
# Add default settings based on user input
try {
# Select app removal options based on user input
switch ($RemoveAppsInput) {
'1' {
AddParameter 'RemoveApps'
AddParameter 'Apps' 'Default'
}
'2' {
AddParameter 'RemoveAppsCustom'
if ($DisableGameBarIntegrationInput) {
AddParameter 'DisableDVR'
AddParameter 'DisableGameBarIntegration'
}
}
}
# Load settings from DefaultSettings.json and add to params
LoadSettings -filePath $script:DefaultSettingsFilePath -expectedVersion "1.0"
}
catch {
Write-Error "Failed to load settings from DefaultSettings.json file: $_"
AwaitKeyToExit
}
SaveSettings
# Skip change summary if Silent parameter was passed
if ($Silent) {
return
}
PrintPendingChanges
PrintHeader 'Default Mode'
}

View File

@@ -0,0 +1,16 @@
# Shows the CLI last used settings from LastUsedSettings.json file, displays pending changes and prompts the user to apply them.
function ShowCLILastUsedSettings {
PrintHeader 'Custom Mode'
try {
# Load settings from LastUsedSettings.json and add to params
LoadSettings -filePath $script:SavedSettingsFilePath -expectedVersion "1.0"
}
catch {
Write-Error "Failed to load settings from LastUsedSettings.json file: $_"
AwaitKeyToExit
}
PrintPendingChanges
PrintHeader 'Custom Mode'
}

View File

@@ -0,0 +1,30 @@
# Shows the CLI menu options and prompts the user to select one. Loops until a valid option is selected.
function ShowCLIMenuOptions {
Do {
$ModeSelectionMessage = "Please select an option (1/2)"
PrintHeader 'Menu'
Write-Host "(1) Default mode: Quickly apply the recommended changes"
Write-Host "(2) App removal mode: Select & remove apps, without making other changes"
# Only show this option if SavedSettings file exists
if (Test-Path $script:SavedSettingsFilePath) {
Write-Host "(3) Quickly apply your last used settings"
$ModeSelectionMessage = "Please select an option (1/2/3)"
}
Write-Host ""
Write-Host ""
$Mode = Read-Host $ModeSelectionMessage
if (($Mode -eq '3') -and -not (Test-Path $script:SavedSettingsFilePath)) {
$Mode = $null
}
}
while ($Mode -ne '1' -and $Mode -ne '2' -and $Mode -ne '3')
return $Mode
}

View File

@@ -0,0 +1,95 @@
function CreateSystemRestorePoint {
$SysRestore = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "RPSessionInterval"
$failed = $false
if ($SysRestore.RPSessionInterval -eq 0) {
# In GUI mode, skip the prompt and just try to enable it
if ($script:GuiWindow -or $Silent -or $( Read-Host -Prompt "System restore is disabled, would you like to enable it and create a restore point? (y/n)") -eq 'y') {
try {
$enableResult = Invoke-NonBlocking -TimeoutSeconds 20 -ScriptBlock {
try {
Enable-ComputerRestore -Drive "$env:SystemDrive"
return $null
}
catch {
return "Error: Failed to enable System Restore: $_"
}
}
}
catch {
$enableResult = "Error: Failed to enable System Restore: $_"
}
if ($enableResult) {
Write-Host $enableResult -ForegroundColor Red
$failed = $true
}
}
else {
Write-Host ""
$failed = $true
}
}
if (-not $failed) {
try {
$result = Invoke-NonBlocking -TimeoutSeconds 20 -ScriptBlock {
try {
$recentRestorePoints = Get-ComputerRestorePoint | Where-Object { (Get-Date) - [System.Management.ManagementDateTimeConverter]::ToDateTime($_.CreationTime) -le (New-TimeSpan -Hours 24) }
}
catch {
return [PSCustomObject]@{ Success = $false; Message = "Error: Unable to retrieve existing restore points: $_" }
}
if ($recentRestorePoints.Count -eq 0) {
try {
Checkpoint-Computer -Description "Restore point created by Win11Debloat" -RestorePointType "MODIFY_SETTINGS"
return [PSCustomObject]@{ Success = $true; Message = "System restore point created successfully" }
}
catch {
return [PSCustomObject]@{ Success = $false; Message = "Error: Unable to create restore point: $_" }
}
}
else {
return [PSCustomObject]@{ Success = $true; Message = "A recent restore point already exists, no new restore point was created" }
}
}
}
catch {
$result = [PSCustomObject]@{ Success = $false; Message = "Error: Failed to create system restore point: $_" }
}
if ($result -and $result.Success) {
Write-Host $result.Message
}
elseif ($result) {
Write-Host $result.Message -ForegroundColor Red
$failed = $true
}
else {
Write-Host "Error: Failed to create system restore point" -ForegroundColor Red
$failed = $true
}
}
# Ensure that the user is aware if creating a restore point failed, and give them the option to continue without a restore point or cancel the script
if ($failed) {
if ($script:GuiWindow) {
$result = Show-MessageBox "Failed to create a system restore point. Do you want to continue without a restore point?" "Restore Point Creation Failed" "YesNo" "Warning"
if ($result -ne "Yes") {
$script:CancelRequested = $true
return
}
}
elseif (-not $Silent) {
Write-Host "Failed to create a system restore point. Do you want to continue without a restore point? (y/n)" -ForegroundColor Yellow
if ($( Read-Host ) -ne 'y') {
$script:CancelRequested = $true
return
}
}
Write-Host "Warning: Continuing without restore point" -ForegroundColor Yellow
}
}

View File

@@ -0,0 +1,52 @@
# Disables Microsoft Store search suggestions in the start menu for all users by denying access to the Store app database file for each user
function DisableStoreSearchSuggestionsForAllUsers {
# Get path to Store app database for all users
$userPathString = GetUserDirectory -userName "*" -fileName "AppData\Local\Packages"
$usersStoreDbPaths = get-childitem -path $userPathString
# Go through all users and disable start search suggestions
ForEach ($storeDbPath in $usersStoreDbPaths) {
DisableStoreSearchSuggestions ($storeDbPath.FullName + "\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db")
}
# Also disable start search suggestions for the default user profile
$defaultStoreDbPath = GetUserDirectory -userName "Default" -fileName "AppData\Local\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db" -exitIfPathNotFound $false
DisableStoreSearchSuggestions $defaultStoreDbPath
}
# Disables Microsoft Store search suggestions in the start menu by denying access to the Store app database file
function DisableStoreSearchSuggestions {
param (
$StoreAppsDatabase = "$env:LocalAppData\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db"
)
# Change path to correct user if a user was specified
if ($script:Params.ContainsKey("User")) {
$StoreAppsDatabase = GetUserDirectory -userName "$(GetUserName)" -fileName "AppData\Local\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db" -exitIfPathNotFound $false
}
$userName = [regex]::Match($StoreAppsDatabase, '(?:Users\\)([^\\]+)(?:\\AppData)').Groups[1].Value
# This file doesn't exist in EEA (No Store app suggestions).
if (-not (Test-Path -Path $StoreAppsDatabase))
{
Write-Host "Unable to find Store app database for user $userName, creating it now to prevent Windows from creating it later..." -ForegroundColor Yellow
$storeDbDir = Split-Path -Path $StoreAppsDatabase -Parent
if (-not (Test-Path -Path $storeDbDir)) {
New-Item -Path $storeDbDir -ItemType Directory -Force | Out-Null
}
New-Item -Path $StoreAppsDatabase -ItemType File -Force | Out-Null
}
$AccountSid = [System.Security.Principal.SecurityIdentifier]::new('S-1-1-0') # 'EVERYONE' group
$Acl = Get-Acl -Path $StoreAppsDatabase
$Ace = [System.Security.AccessControl.FileSystemAccessRule]::new($AccountSid, 'FullControl', 'Deny')
$Acl.SetAccessRule($Ace) | Out-Null
Set-Acl -Path $StoreAppsDatabase -AclObject $Acl | Out-Null
Write-Host "Disabled Microsoft Store search suggestions for user $userName"
}

View File

@@ -0,0 +1,16 @@
# Enables a Windows optional feature and pipes its output to the console
function EnableWindowsFeature {
param (
[string]$FeatureName
)
$result = Invoke-NonBlocking -ScriptBlock {
param($name)
Enable-WindowsOptionalFeature -Online -FeatureName $name -All -NoRestart
} -ArgumentList $FeatureName
$dismResult = @($result) | Where-Object { $_ -is [Microsoft.Dism.Commands.ImageObject] }
if ($dismResult) {
Write-Host ($dismResult | Out-String).Trim()
}
}

View File

@@ -0,0 +1,196 @@
# Executes a single parameter/feature based on its key
# Parameters:
# $paramKey - The parameter name to execute
function ExecuteParameter {
param (
[string]$paramKey
)
# Check if this feature has metadata in Features.json
$feature = $null
if ($script:Features.ContainsKey($paramKey)) {
$feature = $script:Features[$paramKey]
}
# If feature has RegistryKey and ApplyText, use dynamic ImportRegistryFile
if ($feature -and $feature.RegistryKey -and $feature.ApplyText) {
ImportRegistryFile "> $($feature.ApplyText)" $feature.RegistryKey
# Handle special cases that have additional logic after ImportRegistryFile
switch ($paramKey) {
'DisableBing' {
# Also remove the app package for Bing search
RemoveApps 'Microsoft.BingSearch'
}
'DisableCopilot' {
# Also remove the app package for Copilot
RemoveApps 'Microsoft.Copilot'
}
'DisableWidgets' {
# Also remove the app package for Widgets
RemoveApps 'Microsoft.StartExperiencesApp'
}
}
return
}
# Handle features without RegistryKey or with special logic
switch ($paramKey) {
'RemoveApps' {
Write-Host "> Removing selected apps for $(GetFriendlyTargetUserName)..."
$appsList = GenerateAppsList
if ($appsList.Count -eq 0) {
Write-Host "No valid apps were selected for removal" -ForegroundColor Yellow
Write-Host ""
return
}
Write-Host "$($appsList.Count) apps selected for removal"
RemoveApps $appsList
}
'RemoveAppsCustom' {
Write-Host "> Removing selected apps..."
$appsList = LoadAppsFromFile $script:CustomAppsListFilePath
if ($appsList.Count -eq 0) {
Write-Host "No valid apps were selected for removal" -ForegroundColor Yellow
Write-Host ""
return
}
Write-Host "$($appsList.Count) apps selected for removal"
RemoveApps $appsList
}
'RemoveCommApps' {
$appsList = 'Microsoft.windowscommunicationsapps', 'Microsoft.People'
Write-Host "> Removing Mail, Calendar and People apps..."
RemoveApps $appsList
return
}
'RemoveW11Outlook' {
$appsList = 'Microsoft.OutlookForWindows'
Write-Host "> Removing new Outlook for Windows app..."
RemoveApps $appsList
return
}
'RemoveGamingApps' {
$appsList = 'Microsoft.GamingApp', 'Microsoft.XboxGameOverlay', 'Microsoft.XboxGamingOverlay'
Write-Host "> Removing gaming related apps..."
RemoveApps $appsList
return
}
'RemoveHPApps' {
$appsList = 'AD2F1837.HPAIExperienceCenter', 'AD2F1837.HPJumpStarts', 'AD2F1837.HPPCHardwareDiagnosticsWindows', 'AD2F1837.HPPowerManager', 'AD2F1837.HPPrivacySettings', 'AD2F1837.HPSupportAssistant', 'AD2F1837.HPSureShieldAI', 'AD2F1837.HPSystemInformation', 'AD2F1837.HPQuickDrop', 'AD2F1837.HPWorkWell', 'AD2F1837.myHP', 'AD2F1837.HPDesktopSupportUtilities', 'AD2F1837.HPQuickTouch', 'AD2F1837.HPEasyClean', 'AD2F1837.HPConnectedMusic', 'AD2F1837.HPFileViewer', 'AD2F1837.HPRegistration', 'AD2F1837.HPWelcome', 'AD2F1837.HPConnectedPhotopoweredbySnapfish', 'AD2F1837.HPPrinterControl'
Write-Host "> Removing HP apps..."
RemoveApps $appsList
return
}
"EnableWindowsSandbox" {
Write-Host "> Enabling Windows Sandbox..."
EnableWindowsFeature "Containers-DisposableClientVM"
Write-Host ""
return
}
"EnableWindowsSubsystemForLinux" {
Write-Host "> Enabling Windows Subsystem for Linux..."
EnableWindowsFeature "VirtualMachinePlatform"
EnableWindowsFeature "Microsoft-Windows-Subsystem-Linux"
Write-Host ""
return
}
'ClearStart' {
Write-Host "> Removing all pinned apps from the start menu for user $(GetUserName)..."
ReplaceStartMenu
Write-Host ""
return
}
'ReplaceStart' {
Write-Host "> Replacing the start menu for user $(GetUserName)..."
ReplaceStartMenu $script:Params.Item("ReplaceStart")
Write-Host ""
return
}
'ClearStartAllUsers' {
ReplaceStartMenuForAllUsers
return
}
'ReplaceStartAllUsers' {
ReplaceStartMenuForAllUsers $script:Params.Item("ReplaceStartAllUsers")
return
}
'DisableStoreSearchSuggestions' {
if ($script:Params.ContainsKey("Sysprep")) {
Write-Host "> Disabling Microsoft Store search suggestions in the start menu for all users..."
DisableStoreSearchSuggestionsForAllUsers
Write-Host ""
return
}
Write-Host "> Disabling Microsoft Store search suggestions for user $(GetUserName)..."
DisableStoreSearchSuggestions
Write-Host ""
return
}
}
}
# Executes all selected parameters/features
function ExecuteAllChanges {
# Build list of actionable parameters (skip control params and data-only params)
$actionableKeys = @()
foreach ($paramKey in $script:Params.Keys) {
if ($script:ControlParams -contains $paramKey) { continue }
if ($paramKey -eq 'Apps') { continue }
if ($paramKey -eq 'CreateRestorePoint') { continue }
$actionableKeys += $paramKey
}
$totalSteps = $actionableKeys.Count
if ($script:Params.ContainsKey("CreateRestorePoint")) { $totalSteps++ }
$currentStep = 0
# Create restore point if requested (CLI only - GUI handles this separately)
if ($script:Params.ContainsKey("CreateRestorePoint")) {
$currentStep++
if ($script:ApplyProgressCallback) {
& $script:ApplyProgressCallback $currentStep $totalSteps "Creating system restore point"
}
Write-Host "> Attempting to create a system restore point..."
CreateSystemRestorePoint
Write-Host ""
}
# Execute all parameters
foreach ($paramKey in $actionableKeys) {
if ($script:CancelRequested) {
return
}
$currentStep++
# Get friendly name for the step
$stepName = $paramKey
if ($script:Features.ContainsKey($paramKey)) {
$feature = $script:Features[$paramKey]
if ($feature.ApplyText) {
# Prefer explicit ApplyText when provided
$stepName = $feature.ApplyText
} elseif ($feature.Label) {
# Fallback: construct a name from Action and Label, or just Label
if ($feature.Action) {
$stepName = "$($feature.Action) $($feature.Label)"
} else {
$stepName = $feature.Label
}
}
}
if ($script:ApplyProgressCallback) {
& $script:ApplyProgressCallback $currentStep $totalSteps $stepName
}
ExecuteParameter -paramKey $paramKey
}
}

View File

@@ -0,0 +1,69 @@
# Import & execute regfile
function ImportRegistryFile {
param (
$message,
$path
)
Write-Host $message
# Validate that the regfile exists in both locations
if (-not (Test-Path "$script:RegfilesPath\$path") -or -not (Test-Path "$script:RegfilesPath\Sysprep\$path")) {
Write-Host "Error: Unable to find registry file: $path" -ForegroundColor Red
Write-Host ""
return
}
# Reset exit code before running reg.exe for reliable success detection
$global:LASTEXITCODE = 0
if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User")) {
# Sysprep targets Default user, User targets the specified user
$hiveDatPath = if ($script:Params.ContainsKey("Sysprep")) {
GetUserDirectory -userName "Default" -fileName "NTUSER.DAT"
} else {
GetUserDirectory -userName $script:Params.Item("User") -fileName "NTUSER.DAT"
}
$regResult = Invoke-NonBlocking -ScriptBlock {
param($datPath, $regFilePath)
$global:LASTEXITCODE = 0
reg load "HKU\Default" $datPath | Out-Null
$output = reg import $regFilePath 2>&1
$code = $LASTEXITCODE
reg unload "HKU\Default" | Out-Null
return @{ Output = $output; ExitCode = $code }
} -ArgumentList @($hiveDatPath, "$script:RegfilesPath\Sysprep\$path")
}
else {
$regResult = Invoke-NonBlocking -ScriptBlock {
param($regFilePath)
$global:LASTEXITCODE = 0
$output = reg import $regFilePath 2>&1
return @{ Output = $output; ExitCode = $LASTEXITCODE }
} -ArgumentList "$script:RegfilesPath\$path"
}
$regOutput = $regResult.Output
$hasSuccess = $regResult.ExitCode -eq 0
if ($regOutput) {
foreach ($line in $regOutput) {
$lineText = if ($line -is [System.Management.Automation.ErrorRecord]) { $line.Exception.Message } else { $line.ToString() }
if ($lineText -and $lineText.Length -gt 0) {
if ($hasSuccess) {
Write-Host $lineText
}
else {
Write-Host $lineText -ForegroundColor Red
}
}
}
}
if (-not $hasSuccess) {
Write-Host "Failed importing registry file: $path" -ForegroundColor Red
}
Write-Host ""
}

View File

@@ -0,0 +1,83 @@
# Replace the startmenu for all users, when using the default startmenuTemplate this clears all pinned apps
# Credit: https://lazyadmin.nl/win-11/customize-windows-11-start-menu-layout/
function ReplaceStartMenuForAllUsers {
param (
$startMenuTemplate = "$script:AssetsPath/Start/start2.bin"
)
Write-Host "> Removing all pinned apps from the start menu for all users..."
# Check if template bin file exists
if (-not (Test-Path $startMenuTemplate)) {
Write-Host "Error: Unable to clear start menu, start2.bin file missing from script folder" -ForegroundColor Red
Write-Host ""
return
}
# Get path to start menu file for all users
$userPathString = GetUserDirectory -userName "*" -fileName "AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState"
$usersStartMenuPaths = get-childitem -path $userPathString
# Go through all users and replace the start menu file
ForEach ($startMenuPath in $usersStartMenuPaths) {
ReplaceStartMenu $startMenuTemplate "$($startMenuPath.Fullname)\start2.bin"
}
# Also replace the start menu file for the default user profile
$defaultStartMenuPath = GetUserDirectory -userName "Default" -fileName "AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState" -exitIfPathNotFound $false
# Create folder if it doesn't exist
if (-not (Test-Path $defaultStartMenuPath)) {
new-item $defaultStartMenuPath -ItemType Directory -Force | Out-Null
Write-Host "Created LocalState folder for default user profile"
}
# Copy template to default profile
Copy-Item -Path $startMenuTemplate -Destination $defaultStartMenuPath -Force
Write-Host "Replaced start menu for the default user profile"
Write-Host ""
}
# Replace the startmenu for all users, when using the default startmenuTemplate this clears all pinned apps
# Credit: https://lazyadmin.nl/win-11/customize-windows-11-start-menu-layout/
function ReplaceStartMenu {
param (
$startMenuTemplate = "$script:AssetsPath/Start/start2.bin",
$startMenuBinFile = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin"
)
# Change path to correct user if a user was specified
if ($script:Params.ContainsKey("User")) {
$startMenuBinFile = GetUserDirectory -userName "$(GetUserName)" -fileName "AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin" -exitIfPathNotFound $false
}
# Check if template bin file exists
if (-not (Test-Path $startMenuTemplate)) {
Write-Host "Error: Unable to replace start menu, template file not found" -ForegroundColor Red
return
}
if ([IO.Path]::GetExtension($startMenuTemplate) -ne ".bin" ) {
Write-Host "Error: Unable to replace start menu, template file is not a valid .bin file" -ForegroundColor Red
return
}
$userName = [regex]::Match($startMenuBinFile, '(?:Users\\)([^\\]+)(?:\\AppData)').Groups[1].Value
$backupBinFile = $startMenuBinFile + ".bak"
if (Test-Path $startMenuBinFile) {
# Backup current start menu file
Move-Item -Path $startMenuBinFile -Destination $backupBinFile -Force
}
else {
Write-Host "Unable to find original start2.bin file for user $userName, no backup was created for this user" -ForegroundColor Yellow
New-Item -ItemType File -Path $startMenuBinFile -Force
}
# Copy template file
Copy-Item -Path $startMenuTemplate -Destination $startMenuBinFile -Force
Write-Host "Replaced start menu for user $userName"
}

View File

@@ -0,0 +1,26 @@
# Restart the Windows Explorer process
function RestartExplorer {
Write-Host "> Attempting to restart the Windows Explorer process to apply all changes..."
if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User") -or $script:Params.ContainsKey("NoRestartExplorer")) {
Write-Host "Explorer process restart was skipped, please manually reboot your PC to apply all changes" -ForegroundColor Yellow
return
}
foreach ($paramKey in $script:Params.Keys) {
if ($script:Features.ContainsKey($paramKey) -and $script:Features[$paramKey].RequiresReboot -eq $true) {
$feature = $script:Features[$paramKey]
Write-Host "Warning: '$($feature.Action) $($feature.Label)' requires a reboot to take full effect" -ForegroundColor Yellow
}
}
# Only restart if the powershell process matches the OS architecture.
# Restarting explorer from a 32bit PowerShell window will fail on a 64bit OS
if ([Environment]::Is64BitProcess -eq [Environment]::Is64BitOperatingSystem) {
Write-Host "Restarting the Windows Explorer process... (This may cause your screen to flicker)"
Stop-Process -processName: Explorer -Force
}
else {
Write-Host "Unable to restart Windows Explorer process, please manually reboot your PC to apply all changes" -ForegroundColor Yellow
}
}

View File

@@ -0,0 +1,22 @@
# Read Apps.json and return the list of preset objects (Name + AppIds).
# Returns an empty array if the file cannot be read or contains no presets.
function LoadAppPresetsFromJson {
try {
$jsonContent = Get-Content -Path $script:AppsListFilePath -Raw | ConvertFrom-Json
}
catch {
Write-Warning "Failed to read Apps.json: $_"
return @()
}
if (-not $jsonContent.Presets) {
return @()
}
return @($jsonContent.Presets | ForEach-Object {
[PSCustomObject]@{
Name = $_.Name
AppIds = @($_.AppIds)
}
})
}

View File

@@ -0,0 +1,47 @@
# Read Apps.json and return list of app objects with optional filtering
function LoadAppsDetailsFromJson {
param (
[switch]$OnlyInstalled,
[string]$InstalledList = "",
[switch]$InitialCheckedFromJson
)
$apps = @()
try {
$jsonContent = Get-Content -Path $script:AppsListFilePath -Raw | ConvertFrom-Json
}
catch {
Write-Error "Failed to read Apps.json: $_"
return $apps
}
foreach ($appData in $jsonContent.Apps) {
$appId = $appData.AppId.Trim()
if ($appId.length -eq 0) { continue }
if ($OnlyInstalled) {
if (-not ($InstalledList -like ("*$appId*")) -and -not (Get-AppxPackage -Name $appId)) {
continue
}
if (($appId -eq "Microsoft.Edge") -and -not ($InstalledList -like "* Microsoft.Edge *")) {
continue
}
}
$friendlyName = if ($appData.FriendlyName) { $appData.FriendlyName } else { $appId }
$displayName = if ($appData.FriendlyName) { "$($appData.FriendlyName) ($appId)" } else { $appId }
$isChecked = if ($InitialCheckedFromJson) { $appData.SelectedByDefault } else { $false }
$apps += [PSCustomObject]@{
AppId = $appId
FriendlyName = $friendlyName
DisplayName = $displayName
IsChecked = $isChecked
Description = $appData.Description
SelectedByDefault = $appData.SelectedByDefault
Recommendation = $appData.Recommendation
}
}
return $apps
}

View File

@@ -0,0 +1,45 @@
# Returns list of apps from the specified file, it trims the app names and removes any comments
function LoadAppsFromFile {
param (
$appsFilePath
)
$appsList = @()
if (-not (Test-Path $appsFilePath)) {
return $appsList
}
try {
# Check if file is JSON or text format
if ($appsFilePath -like "*.json") {
# JSON file format
$jsonContent = Get-Content -Path $appsFilePath -Raw | ConvertFrom-Json
Foreach ($appData in $jsonContent.Apps) {
$appId = $appData.AppId.Trim()
$selectedByDefault = $appData.SelectedByDefault
if ($selectedByDefault -and $appId.length -gt 0) {
$appsList += $appId
}
}
}
else {
# Legacy text file format
Foreach ($app in (Get-Content -Path $appsFilePath | Where-Object { $_ -notmatch '^#.*' -and $_ -notmatch '^\s*$' } )) {
if (-not ($app.IndexOf('#') -eq -1)) {
$app = $app.Substring(0, $app.IndexOf('#'))
}
$app = $app.Trim()
$appString = $app.Trim('*')
$appsList += $appString
}
}
return $appsList
}
catch {
Write-Error "Unable to read apps list from file: $appsFilePath"
AwaitKeyToExit
}
}

View File

@@ -0,0 +1,32 @@
# Loads a JSON file from the specified path and returns the parsed object
# Returns $null if the file doesn't exist or if parsing fails
function LoadJsonFile {
param (
[string]$filePath,
[string]$expectedVersion = $null,
[switch]$optionalFile
)
if (-not (Test-Path $filePath)) {
if (-not $optionalFile) {
Write-Error "File not found: $filePath"
}
return $null
}
try {
$jsonContent = Get-Content -Path $filePath -Raw | ConvertFrom-Json
# Validate version if specified
if ($expectedVersion -and $jsonContent.Version -and $jsonContent.Version -ne $expectedVersion) {
Write-Error "$(Split-Path $filePath -Leaf) version mismatch (expected $expectedVersion, found $($jsonContent.Version))"
return $null
}
return $jsonContent
}
catch {
Write-Error "Failed to parse JSON file: $filePath"
return $null
}
}

View File

@@ -0,0 +1,31 @@
# Loads settings from a JSON file and adds them to script params
function LoadSettings {
param (
[string]$filePath,
[string]$expectedVersion = "1.0"
)
$settingsJson = LoadJsonFile -filePath $filePath -expectedVersion $expectedVersion
if (-not $settingsJson -or -not $settingsJson.Settings) {
throw "Failed to load settings from $(Split-Path $filePath -Leaf)"
}
# Get current Windows build version
$WinVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild
foreach ($setting in $settingsJson.Settings) {
if ($setting.Value -eq $false) {
continue
}
$feature = $script:Features[$setting.Name]
# Check version and feature compatibility using Features.json
if (($feature.MinVersion -and $WinVersion -lt $feature.MinVersion) -or ($feature.MaxVersion -and $WinVersion -gt $feature.MaxVersion) -or ($feature.FeatureId -eq 'DisableModernStandbyNetworking' -and (-not $script:ModernStandbySupported))) {
continue
}
AddParameter $setting.Name $setting.Value
}
}

View File

@@ -0,0 +1,15 @@
# Saves the provided appsList to the CustomAppsList file
function SaveCustomAppsListToFile {
param (
$appsList
)
$script:SelectedApps = $appsList
# Create file that stores selected apps if it doesn't exist
if (-not (Test-Path $script:CustomAppsListFilePath)) {
$null = New-Item $script:CustomAppsListFilePath -ItemType File
}
Set-Content -Path $script:CustomAppsListFilePath -Value $script:SelectedApps
}

View File

@@ -0,0 +1,26 @@
# Saves the current settings, excluding control parameters, to 'LastUsedSettings.json' file
function SaveSettings {
$settings = @{
"Version" = "1.0"
"Settings" = @()
}
foreach ($param in $script:Params.Keys) {
if ($script:ControlParams -notcontains $param) {
$value = $script:Params[$param]
$settings.Settings += @{
"Name" = $param
"Value" = $value
}
}
}
try {
$settings | ConvertTo-Json -Depth 10 | Set-Content $script:SavedSettingsFilePath
}
catch {
Write-Output ""
Write-Host "Error: Failed to save settings to LastUsedSettings.json file" -ForegroundColor Red
}
}

View File

@@ -0,0 +1,24 @@
# Returns a validated list of apps based on the provided appsList and the supported apps from Apps.json
function ValidateAppslist {
param (
$appsList
)
$supportedAppsList = (LoadAppsDetailsFromJson | ForEach-Object { $_.AppId })
$validatedAppsList = @()
# Validate provided appsList against supportedAppsList
Foreach ($app in $appsList) {
$app = $app.Trim()
$appString = $app.Trim('*')
if ($supportedAppsList -notcontains $appString) {
Write-Host "Removal of app '$appString' is not supported and will be skipped" -ForegroundColor Yellow
continue
}
$validatedAppsList += $appString
}
return $validatedAppsList
}

View File

@@ -0,0 +1,77 @@
# Applies settings from a JSON object to UI controls (checkboxes and comboboxes)
# Used by LoadDefaultsBtn and LoadLastUsedBtn in the UI
function ApplySettingsToUiControls {
param (
$window,
$settingsJson,
$uiControlMappings
)
if (-not $settingsJson -or -not $settingsJson.Settings) {
return $false
}
if (-not $uiControlMappings) {
return $true
}
# Build control cache and reverse index (featureId -> control info) in a single pass
$controlCache = @{}
$featureIdIndex = @{}
foreach ($comboName in $uiControlMappings.Keys) {
$control = $window.FindName($comboName)
if (-not $control) { continue }
$controlCache[$comboName] = $control
$mapping = $uiControlMappings[$comboName]
if ($mapping.Type -eq 'group') {
$i = 1
foreach ($val in $mapping.Values) {
foreach ($fid in $val.FeatureIds) {
$featureIdIndex[$fid] = @{ ComboName = $comboName; Control = $control; Index = $i; MappingType = 'group' }
}
$i++
}
}
elseif ($mapping.Type -eq 'feature') {
$featureIdIndex[$mapping.FeatureId] = @{ ComboName = $comboName; Control = $control; MappingType = 'feature' }
}
# Reset control to default state
if ($control -is [System.Windows.Controls.CheckBox]) {
$control.IsChecked = $false
}
elseif ($control -is [System.Windows.Controls.ComboBox]) {
$control.SelectedIndex = 0
}
}
# Apply settings using O(1) lookups
foreach ($setting in $settingsJson.Settings) {
if ($setting.Value -ne $true) { continue }
if ($setting.Name -eq 'CreateRestorePoint') { continue }
$entry = $featureIdIndex[$setting.Name]
if (-not $entry) { continue }
$control = $entry.Control
if (-not $control -or $control.Visibility -ne 'Visible') { continue }
if ($entry.MappingType -eq 'group') {
if ($control -is [System.Windows.Controls.ComboBox]) {
$control.SelectedIndex = $entry.Index
}
}
else {
if ($control -is [System.Windows.Controls.CheckBox]) {
$control.IsChecked = $true
}
elseif ($control -is [System.Windows.Controls.ComboBox]) {
$control.SelectedIndex = 1
}
}
}
return $true
}

View File

@@ -0,0 +1,71 @@
# Attaches shift-click selection behavior to a checkbox in an apps panel
# Parameters:
# - $checkbox: The checkbox to attach the behavior to
# - $appsPanel: The StackPanel containing checkbox items
# - $lastSelectedCheckboxRef: A reference to a variable storing the last clicked checkbox
# - $updateStatusCallback: Optional callback to update selection status
function AttachShiftClickBehavior {
param (
[System.Windows.Controls.CheckBox]$checkbox,
[System.Windows.Controls.StackPanel]$appsPanel,
[ref]$lastSelectedCheckboxRef,
[scriptblock]$updateStatusCallback = $null
)
# Use a closure to capture the parameters
$checkbox.Add_PreviewMouseLeftButtonDown({
param(
$sender,
$e
)
$isShiftPressed = [System.Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftShift) -or
[System.Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::RightShift)
if ($isShiftPressed -and $null -ne $lastSelectedCheckboxRef.Value) {
# Get all visible checkboxes in the panel
$visibleCheckboxes = @()
foreach ($child in $appsPanel.Children) {
if ($child -is [System.Windows.Controls.CheckBox] -and $child.Visibility -eq 'Visible') {
$visibleCheckboxes += $child
}
}
# Find indices of the last selected and current checkbox
$lastIndex = -1
$currentIndex = -1
for ($i = 0; $i -lt $visibleCheckboxes.Count; $i++) {
if ($visibleCheckboxes[$i] -eq $lastSelectedCheckboxRef.Value) {
$lastIndex = $i
}
if ($visibleCheckboxes[$i] -eq $sender) {
$currentIndex = $i
}
}
if ($lastIndex -ge 0 -and $currentIndex -ge 0 -and $lastIndex -ne $currentIndex) {
$startIndex = [Math]::Min($lastIndex, $currentIndex)
$endIndex = [Math]::Max($lastIndex, $currentIndex)
$shouldDeselect = $sender.IsChecked
# Set all checkboxes in the range to the appropriate state
for ($i = $startIndex; $i -le $endIndex; $i++) {
$visibleCheckboxes[$i].IsChecked = -not $shouldDeselect
}
if ($updateStatusCallback) {
& $updateStatusCallback
}
# Mark the event as handled to prevent the default toggle behavior
$e.Handled = $true
return
}
}
# Update the last selected checkbox reference for next time
$lastSelectedCheckboxRef.Value = $sender
}.GetNewClosure())
}

Some files were not shown because too many files have changed in this diff Show More