Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add one liner method of launching windows 11 debloat script. #56

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ Win11Debloat has many options, but not all of these options are executed when ru
> [!Warning]
> Great care went into making sure this script does not unintentionally break any OS functionality, but use at your own risk!

### Quick method
1. Run powershell as admin.
2. Copy-paste below code and press enter.
```
irm https://raw.githubusercontent.com/loadstring1/Win11Debloat/master/get.ps1 | iex
```
3. That's all. You will see options on how you want to debloat your system.

### Easy method

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.
Expand Down
19 changes: 19 additions & 0 deletions get.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#Requires -RunAsAdministrator

$Script:showWindowAsync = Add-Type -MemberDefinition @"
[DllImport("user32.dll")]
public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
"@ -Name "Win32ShowWindowAsync" -Namespace Win32Functions -PassThru

Function Hide-Powershell()
{
$null = $showWindowAsync::ShowWindowAsync((Get-Process -Id $pid).MainWindowHandle, 2)
}

cd $env:TEMP
winget install git.git
git clone https://github.com/Raphire/Win11Debloat/
Hide-Powershell
Start-Process .\Win11Debloat\Run.bat -Wait
Remove-Item -LiteralPath "Win11Debloat" -Force -Recurse
Get-Process -Id $pid | Stop-Process