Made it easier to use the script;

The script no longer requires manually changing the Execution Policy to run.
This commit is contained in:
Raphire
2022-10-04 21:10:29 +02:00
parent 1fc3d398a7
commit 8436c8d81c
5 changed files with 8 additions and 39 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1 +1,2 @@
github: raphire
ko_fi: raphire

View File

@@ -33,11 +33,10 @@ Disclaimer: I believe this script to be completely safe to run, but use this scr
### Easy method:
1. [Download the latest version of the script](https://github.com/Raphire/Win10Debloat/archive/master.zip), and extract the .ZIP file to your desired location.
2. Open powershell as an administrator.
3. Enable powershell execution by entering the following command: <code>Set-ExecutionPolicy Unrestricted -Force</code>
4. Navigate to the Win10Debloat folder and run the script by right-clicking the 'Run.ps1' file and selecting the 'Run with Powershell' option.
5. Accept the windows UAC prompt to run the script as administrator, this is required for the script to function.
6. Select either default, or custom setup depending on what changes you want to make. Custom setup will allow you to choose exactly which changes you want to make, and which changes you want to skip.
2. Navigate to the Win10Debloat folder
3. Double click the 'Run.bat' file to start the script.
4. Accept the windows UAC prompt to run the script as administrator, this is required for the script to function.
5. Select either default, or custom setup depending on what changes you want to make. Custom setup will allow you to choose exactly which changes you want to make, and which changes you want to skip.
### Advanced method:
This method gives you the option to run the script with certain arguments to tailor the behaviour of the script to your needs without requiring any user input during runtime, making it quicker and easier to deploy on a large number of systems.

1
Run.bat Normal file
View File

@@ -0,0 +1 @@
PowerShell -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File "%~dp0Win10Debloat.ps1"' -Verb RunAs}"

34
Run.ps1
View File

@@ -1,34 +0,0 @@
Write-Output "Attempting to launch script with admin privileges..."
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Unrestricted -File ""$PSScriptRoot\Win10Debloat.ps1""' -Verb RunAs}";
<#------------------------------------------------------------------------------------------------------------------------------------------------>
It's possible to tweak the behaviour of the script by running the script with one or more of the arguments in the ArgumentList as shown below.
This allows you to tailor the behaviour of the script to your needs without any user input during runtime, making it quicker and easier to deploy.
The example below configures the script to only remove apps and disable bing in windows search:
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile
-ExecutionPolicy Unrestricted
-File ""$PSScriptRoot\Win10Debloat.ps1""
-RemoveApps
-DisableBing'
-Verb RunAs}";
Supported Arguments:
-RunDefaults | Run the script with windows 10 default settings.
-RunWin11Defaults | Run the script with windows 11 default settings.
-RemoveApps | Remove all bloatware apps from the list found in README.md.
-DisableTelemetry | Disable telemetry, diagnostic data & targeted ads.
-DisableBing | Disable bing & cortana in windows search.
-DisableLockscreenTips | Disable tips & tricks on the lockscreen.
-DisableWindowsSuggestions | Disable tips, tricks and suggestions in the startmenu and settings, and ads in windows explorer.
-DisableOnedrive | Hide the onedrive folder in the windows explorer sidepanel.
-DisableChat | Hide the chat icon on the taskbar.
-DisableWidgets | Hide the widget icon on the taskbar.
-Disable3dObjects | Hide the 3D objects folder under 'This pc' in windows explorer.
-DisableMusic | Hide the music folder under 'This pc' in windows explorer.
-DisableIncludeInLibrary | Disable the 'Include in library' option in the context menu.
-DisableGiveAccessTo | Disable the 'Give access to' option in the context menu.
-DisableShare | Disable the 'Share' option in the context menu.
<------------------------------------------------------------------------------------------------------------------------------------------------#>

View File

@@ -1,3 +1,5 @@
#Requires -RunAsAdministrator
[CmdletBinding(SupportsShouldProcess)]
param
(