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

55
Get.ps1
View File

@@ -42,47 +42,32 @@ Write-Output "------------------------------------------------------------------
Write-Output " Win11Debloat Script - Get" Write-Output " Win11Debloat Script - Get"
Write-Output "-------------------------------------------------------------------------------------------" Write-Output "-------------------------------------------------------------------------------------------"
# Make sure winget is installed and is at least v1.4 # Navigate to user temp directory
if ((Get-AppxPackage -Name "*Microsoft.DesktopAppInstaller*") -and ((winget -v) -replace 'v','' -gt 1.4)) { cd $env:TEMP
# 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 Write-Output "> Downloading Win11Debloat..."
$env:Path += ';C:\Program Files\Git\cmd'
Write-Output "" # Download latest version of Win11Debloat from github as zip archive
} wget http://github.com/raphire/win11debloat/archive/master.zip -O win11debloat-temp.zip
# Navigate to user temp directory # Unzip archive to Win11Debloat folder
cd $env:TEMP Expand-Archive win11debloat-temp.zip Win11Debloat
# Download Win11Debloat from github # Remove archive
Write-Output "> Downloading Win11Debloat..." rm win11debloat-temp.zip
git clone https://github.com/Raphire/Win11Debloat/
# Make list of arguments # Make list of arguments to pass on to the script
$args = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"}) $args = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"})
Write-Output "" Write-Output ""
# Start & run script with the provided arguments # Run Win11Debloat script with the provided arguments
Write-Output "> Running Win11Debloat..." 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() $debloatProcess.WaitForExit()
Write-Output "" Write-Output ""
# Cleanup, remove Win11Debloat directory # Cleanup, remove Win11Debloat directory
Write-Output "> Cleaning up..." Write-Output "> Cleaning up..."
Remove-Item -LiteralPath "Win11Debloat" -Force -Recurse 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 ### 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. 1. Open powershell as an administrator.
2. Copy and paste the code below into powershell, press enter to run the script: 2. Copy and paste the code below into powershell, press enter to run the script:
```powershell ```powershell
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Raphire/Win11Debloat/master/Get.ps1"))) & ([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. 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. 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. | | -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! | | -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. | | -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. | | -RemoveW11Outlook | Remove the new Outlook for Windows app. |
| -RemoveDevApps | Remove developer-related apps such as Remote Desktop, DevHome and Power Automate. | | -RemoveDevApps | Remove developer-related apps such as Remote Desktop, DevHome and Power Automate. |
| -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. | | -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. |