Quick method now downloads script without git

Fixed typo in README.md (Thanks to @eltociear)
This commit is contained in:
Raphire
2024-06-15 01:01:47 +02:00
parent fcd9d0da90
commit 00591766cb
2 changed files with 24 additions and 39 deletions

39
Get.ps1
View File

@@ -42,39 +42,28 @@ Write-Output "------------------------------------------------------------------
Write-Output " Win11Debloat Script - Get"
Write-Output "-------------------------------------------------------------------------------------------"
# 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)) {
# Check if git is installed. Install git if it isn't installed yet
try
{
git | Out-Null
}
catch [System.Management.Automation.CommandNotFoundException]
{
Write-Output "> Installing git..."
winget install git.git --accept-package-agreements --accept-source-agreements --disable-interactivity --no-upgrade
# Add default install location of git to path
$env:Path += ';C:\Program Files\Git\cmd'
Write-Output ""
}
# Navigate to user temp directory
cd $env:TEMP
# Download Win11Debloat from github
Write-Output "> Downloading Win11Debloat..."
git clone https://github.com/Raphire/Win11Debloat/
# Make list of arguments
# Download latest version of Win11Debloat from github as zip archive
wget http://github.com/raphire/win11debloat/archive/master.zip -O win11debloat-temp.zip
# Unzip archive to Win11Debloat folder
Expand-Archive win11debloat-temp.zip Win11Debloat
# Remove archive
rm win11debloat-temp.zip
# Make list of arguments to pass on to the script
$args = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"})
Write-Output ""
# Start & run script with the provided arguments
# Run Win11Debloat script with the provided arguments
Write-Output "> Running Win11Debloat..."
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File .\Win11Debloat\Win11Debloat.ps1 $args"
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File .\Win11Debloat\Win11Debloat-master\Win11Debloat.ps1 $args"
$debloatProcess.WaitForExit()
Write-Output ""
@@ -82,7 +71,3 @@ if ((Get-AppxPackage -Name "*Microsoft.DesktopAppInstaller*") -and ((winget -v)
# Cleanup, remove Win11Debloat directory
Write-Output "> Cleaning up..."
Remove-Item -LiteralPath "Win11Debloat" -Force -Recurse
}
else {
Write-Error "Unable to start script, WinGet is not installed or outdated."
}

View File

@@ -217,14 +217,14 @@ The default mode applies the changes that are recommended for most users, expand
### 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.
Download & run the script automatically via powershell.
1. Open powershell as an administrator.
2. Copy and paste the code below into powershell, press enter to run the script:
```powershell
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Raphire/Win11Debloat/master/Get.ps1")))
```
3. Wait for the script to automatically install git and download Win11Debloat.
3. Wait for the script to automatically 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.
@@ -278,7 +278,7 @@ The quick and advanced method support parameters to tailor the behaviour of the
| -RemoveApps | Remove the default selection of bloatware apps. |
| -RemoveAppsCustom | Remove all apps from the 'CustomAppsList' file. IMPORTANT: Run the script with the `-RunAppConfigurator` parameter to create this file first. No apps will be removed if this file does not exist! |
| -RunAppConfigurator | Run the app configurator to create a 'CustomAppsList' file. Run the script with the `-RemoveAppsCustom` parameter to remove these apps. |
| -RemoveCommApps | Remove the Mail, Calender, and People apps. |
| -RemoveCommApps | Remove the Mail, Calendar, and People apps. |
| -RemoveW11Outlook | Remove the new Outlook for Windows app. |
| -RemoveDevApps | Remove developer-related apps such as Remote Desktop, DevHome and Power Automate. |
| -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. |