Clean up / Linting

This commit is contained in:
Raphire
2025-05-16 18:26:06 +02:00
parent 97a1642691
commit 46fbc9b46e
2 changed files with 25 additions and 26 deletions

View File

@@ -287,7 +287,7 @@ Download & run the script automatically via PowerShell. All files related to the
```
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 any option to continue.
5. Carefully read through and follow the on-screen instructions.
This method supports [parameters](#parameters). To use parameters simply run the script as explained above, but add the parameters at the end with spaces in between. Example:
@@ -304,7 +304,7 @@ Manually download & run the script.
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.
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.
4. A new PowerShell window will open showing the Win11Debloat menu, select any option to continue.
6. Carefully read through and follow the on-screen instructions.
### Advanced method
@@ -326,7 +326,7 @@ Set-ExecutionPolicy Unrestricted -Scope Process
.\Win11Debloat.ps1
```
6. The Win11Debloat menu will now open. Select either the default or custom mode to continue.
6. The Win11Debloat menu will now open, select any option to continue.
7. Carefully read through and follow the on-screen instructions.
This method supports [parameters](#parameters). To use parameters simply run the script as explained above, but add the parameters at the end with spaces in between. Example:

View File

@@ -1302,9 +1302,8 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
$Mode = Read-Host $ModeSelectionMessage
# Show information based on user input, Suppress user prompt if Silent parameter was passed
if ($Mode -eq '0') {
# Get & print script information from file
# Print information screen from file
PrintFromFile "$PSScriptRoot/Assets/Menus/Info" "Information"
Write-Output "Press any key to go back..."
@@ -1321,7 +1320,7 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
switch ($Mode) {
# Default mode, loads defaults after confirmation
'1' {
# Print the default settings & require userconfirmation, unless Silent parameter was passed
# Show the default settings with confirmation, unless Silent parameter was passed
if (-not $Silent) {
PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" "Default Mode"
@@ -1333,7 +1332,7 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
PrintHeader 'Default Mode'
# Add default parameters if they don't already exist
# Add default parameters, if they don't already exist
foreach ($ParameterName in $DefaultParameterNames) {
if (-not $script:Params.ContainsKey($ParameterName)) {
$script:Params.Add($ParameterName, $true)
@@ -1376,12 +1375,12 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
}
}
# Load custom options selection from the "SavedSettings" file
# Load custom options from the "SavedSettings" file
'4' {
PrintHeader 'Custom Mode'
Write-Output "Win11Debloat will make the following changes:"
# Get & print default settings info from file
# Print the saved settings info from file
Foreach ($line in (Get-Content -Path "$PSScriptRoot/SavedSettings" )) {
# Remove any spaces before and after the line
$line = $line.Trim()