mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
Fixed bug that caused some apps not to show up in the app selection UI Co-authored-by: loadstring1 <156520308+loadstring1@users.noreply.github.com>
This commit is contained in:
64
Get.ps1
Normal file
64
Get.ps1
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#Requires -RunAsAdministrator
|
||||||
|
|
||||||
|
param (
|
||||||
|
[switch]$Silent,
|
||||||
|
[switch]$RunAppConfigurator,
|
||||||
|
[switch]$RunDefaults, [switch]$RunWin11Defaults,
|
||||||
|
[switch]$RemoveApps,
|
||||||
|
[switch]$RemoveAppsCustom,
|
||||||
|
[switch]$RemoveGamingApps,
|
||||||
|
[switch]$RemoveCommApps,
|
||||||
|
[switch]$RemoveDevApps,
|
||||||
|
[switch]$RemoveW11Outlook,
|
||||||
|
[switch]$DisableTelemetry,
|
||||||
|
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||||
|
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||||
|
[switch]$DisableWindowsSuggestions, [switch]$DisableSuggestions,
|
||||||
|
[switch]$ShowHiddenFolders,
|
||||||
|
[switch]$ShowKnownFileExt,
|
||||||
|
[switch]$HideDupliDrive,
|
||||||
|
[switch]$TaskbarAlignLeft,
|
||||||
|
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||||
|
[switch]$HideTaskview,
|
||||||
|
[switch]$DisableCopilot,
|
||||||
|
[switch]$DisableWidgets,
|
||||||
|
[switch]$HideWidgets,
|
||||||
|
[switch]$DisableChat,
|
||||||
|
[switch]$HideChat,
|
||||||
|
[switch]$ClearStart,
|
||||||
|
[switch]$RevertContextMenu,
|
||||||
|
[switch]$DisableOnedrive, [switch]$HideOnedrive,
|
||||||
|
[switch]$Disable3dObjects, [switch]$Hide3dObjects,
|
||||||
|
[switch]$DisableMusic, [switch]$HideMusic,
|
||||||
|
[switch]$DisableIncludeInLibrary, [switch]$HideIncludeInLibrary,
|
||||||
|
[switch]$DisableGiveAccessTo, [switch]$HideGiveAccessTo,
|
||||||
|
[switch]$DisableShare, [switch]$HideShare
|
||||||
|
)
|
||||||
|
|
||||||
|
# Make sure winget is installed and is at least v1.4
|
||||||
|
if ((Get-AppxPackage -Name "*Microsoft.DesktopAppInstaller*") -and ((winget -v) -replace 'v','' -gt 1.4)) {
|
||||||
|
# Install git if it isn't already installed
|
||||||
|
winget install git.git --accept-package-agreements --accept-source-agreements --disable-interactivity --no-upgrade
|
||||||
|
|
||||||
|
# Navigate to user temp directory
|
||||||
|
cd $env:TEMP
|
||||||
|
|
||||||
|
# Add default install location of git to path
|
||||||
|
$env:Path += ';C:\Program Files\Git\cmd'
|
||||||
|
|
||||||
|
# Download Win11Debloat from github
|
||||||
|
git clone https://github.com/Raphire/Win11Debloat/
|
||||||
|
|
||||||
|
# Make list of arguments
|
||||||
|
$args = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"})
|
||||||
|
|
||||||
|
# Start & run script with the provided arguments
|
||||||
|
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File .\Win11Debloat\Win11Debloat.ps1 $args"
|
||||||
|
$debloatProcess.WaitForExit()
|
||||||
|
|
||||||
|
# Cleanup, remove Win11Debloat directory
|
||||||
|
Remove-Item -LiteralPath "Win11Debloat" -Force -Recurse
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Error "Unable to start script, Winget is not installed or outdated."
|
||||||
|
}
|
||||||
36
README.md
36
README.md
@@ -199,31 +199,51 @@ Win11Debloat has many options, but not all of these options are executed when ru
|
|||||||
> [!Warning]
|
> [!Warning]
|
||||||
> Great care went into making sure this script does not unintentionally break any OS functionality, but use at your own risk!
|
> Great care went into making sure this script does not unintentionally break any OS functionality, but use at your own risk!
|
||||||
|
|
||||||
### Easy method
|
### Quick method
|
||||||
|
|
||||||
|
Download & run the script automatically via powershell. Please note that this will install git if it's not already installed on your system.
|
||||||
|
|
||||||
|
1. Open powershell as an administrator.
|
||||||
|
2. Copy and paste the code below into powershell, press enter to run the script:
|
||||||
|
```
|
||||||
|
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Raphire/Win11Debloat/master/Get.ps1")))
|
||||||
|
```
|
||||||
|
3. Wait for the script to automatically install git and download Win11Debloat.
|
||||||
|
4. A new powershell window will open showing the Win11Debloat menu. Select either the default or custom mode to continue.
|
||||||
|
5. Carefully read through and follow the on-screen instructions.
|
||||||
|
|
||||||
|
This method supports [parameters](#parameters). To run the script with parameters simply execute the script as explained above, but add the parameters at the end with spaces in between. Example:
|
||||||
|
```
|
||||||
|
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Raphire/Win11Debloat/master/Get.ps1"))) -RunDefaults -Silent
|
||||||
|
```
|
||||||
|
|
||||||
|
### Traditional method
|
||||||
|
|
||||||
|
Manually download & run the script.
|
||||||
|
|
||||||
1. [Download the latest version of the script](https://github.com/Raphire/Win11Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
|
1. [Download the latest version of the script](https://github.com/Raphire/Win11Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
|
||||||
2. Navigate to the Win11Debloat folder
|
2. Navigate to the Win11Debloat folder
|
||||||
3. Double click the 'Run.bat' file to start the script. Note: If the console window immediately closes and nothing happens, try the advanced method below.
|
3. Double click the 'Run.bat' file to start the script. Note: If the console window immediately closes and nothing happens, try the advanced method below.
|
||||||
4. Accept the Windows UAC prompt to run the script as administrator, this is required for the script to function.
|
4. Accept the Windows UAC prompt to run the script as administrator, this is required for the script to function.
|
||||||
5. A new powershell window will now open, showing the Win11Debloat menu. Select either the default or custom mode to continue.
|
5. A new powershell window will now open showing the Win11Debloat menu. Select either the default or custom mode to continue.
|
||||||
6. Carefully read through and follow the on-screen instructions.
|
6. Carefully read through and follow the on-screen instructions.
|
||||||
|
|
||||||
After making the selected changes the Win11Debloat script will restart the Windows Explorer process to properly apply them. If Windows Explorer does not recover after running the script and your desktop stays black, don't worry. Just press Ctrl + Alt + Del and restart your PC.
|
|
||||||
|
|
||||||
### Advanced method
|
### Advanced method
|
||||||
|
|
||||||
This method gives you the option to run the script with certain parameters to tailor the behaviour of the script to your needs and it allows you to run the script without requiring any user input during runtime, making it quicker and easier to deploy on a large number of systems.
|
Manually download the script & run the script via powershell. Only recommended for advanced users.
|
||||||
|
|
||||||
1. [Download the latest version of the script](https://github.com/Raphire/Win11Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
|
1. [Download the latest version of the script](https://github.com/Raphire/Win11Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
|
||||||
2. Open powershell as an administrator.
|
2. Open powershell as an administrator.
|
||||||
3. Enable powershell execution by entering the following command: `Set-ExecutionPolicy Unrestricted -Scope Process`
|
3. Enable powershell execution by entering the following command: `Set-ExecutionPolicy Unrestricted -Scope Process`
|
||||||
4. In powershell, navigate to the directory where the files were extracted. Example: `cd c:\Win11Debloat`
|
4. In powershell, navigate to the directory where the files were extracted. Example: `cd c:\Win11Debloat`
|
||||||
5. Enter this into powershell to run the script: `.\Win11Debloat.ps1`
|
5. Now run the script by entering the following command: `.\Win11Debloat.ps1`
|
||||||
6. The Win11Debloat menu will now open. Select either the default or custom setup to continue.
|
6. The Win11Debloat menu will now open. Select either the default or custom setup to continue.
|
||||||
|
|
||||||
To run the script with parameters simply execute the script as explained above, but add the parameters at the end with spaces in between. Example: `.\Win11Debloat.ps1 -RemoveApps -DisableBing -Silent`
|
This method supports [parameters](#parameters). To run the script with parameters simply execute the script as explained above, but add the parameters at the end with spaces in between. Example: `.\Win11Debloat.ps1 -RemoveApps -DisableBing -Silent`
|
||||||
|
|
||||||
A full list of parameters and what they do can be found below.
|
### Parameters
|
||||||
|
|
||||||
|
The quick and advanced method support parameters to tailor the behaviour of the script to your needs. A list of all the supported parameters and what they do can be found below.
|
||||||
|
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| :-------: | ----------- |
|
| :-------: | ----------- |
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ function ShowAppSelectionForm {
|
|||||||
if ($appString.length -gt 0) {
|
if ($appString.length -gt 0) {
|
||||||
if ($onlyInstalledCheckBox.Checked) {
|
if ($onlyInstalledCheckBox.Checked) {
|
||||||
# onlyInstalledCheckBox is checked, check if app is installed before adding it to selectionBox
|
# onlyInstalledCheckBox is checked, check if app is installed before adding it to selectionBox
|
||||||
if ($listOfApps -like ("* " + $appString + " *")) {
|
if ($listOfApps -like ("*" + $appString + "*")) {
|
||||||
$installed = "installed"
|
$installed = "installed"
|
||||||
}
|
}
|
||||||
elseif (($appString -eq "Microsoft.Edge") -and ($listOfApps -like "* XPFFTQ037JWMHS *")) {
|
elseif (($appString -eq "Microsoft.Edge") -and ($listOfApps -like "* XPFFTQ037JWMHS *")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user