From 76d5b83ac18161a74f46ddd7bcea76ebf0411fed Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Wed, 7 May 2025 15:51:42 +0200 Subject: [PATCH] Add username to header in info and default mode overview screens --- Assets/Menus/DefaultSettings | 4 +--- Assets/Menus/Info | 4 +--- Win11Debloat.ps1 | 11 ++++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Assets/Menus/DefaultSettings b/Assets/Menus/DefaultSettings index 337fefb..e5e169b 100644 --- a/Assets/Menus/DefaultSettings +++ b/Assets/Menus/DefaultSettings @@ -1,6 +1,3 @@ -------------------------------------------------------------------------------------------- - Win11Debloat Script - Default Mode -------------------------------------------------------------------------------------------- Win11Debloat will make the following changes: - Remove the default selection of apps, the list can be found in the 'Appslist.txt' file. - Disable telemetry, diagnostic data, app-launch tracking & targeted ads. @@ -14,3 +11,4 @@ Win11Debloat will make the following changes: - Hide the Chat (meet now) icon from the taskbar. - Hide the 3D objects folder in Windows Explorer. (Windows 10 only) + diff --git a/Assets/Menus/Info b/Assets/Menus/Info index 131583b..4902fe4 100644 --- a/Assets/Menus/Info +++ b/Assets/Menus/Info @@ -1,6 +1,3 @@ -------------------------------------------------------------------------------------------- - Win11Debloat Script - Information -------------------------------------------------------------------------------------------- Win11Debloat is a simple, easy to use and lightweight PowerShell script that can remove pre-installed Windows bloatware apps, disable telemetry and declutter the experience by disabling or removing intrusive interface elements, ads and more. No need to go through @@ -68,3 +65,4 @@ The default mode applies the changes that are recommended for most users. This i - Hide the 3D objects folder under 'This pc' from File Explorer. (W10 only) - Hide the 'Include in library', 'Give access to' and 'Share' options from the context menu. (W10 only) + diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 620133f..d1cfc73 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -711,11 +711,14 @@ function PrintHeader { function PrintFromFile { param ( - $path + $path, + $title ) Clear-Host + PrintHeader $title + # Get & print script menu from file Foreach ($line in (Get-Content -Path $path )) { Write-Output $line @@ -1299,9 +1302,8 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS # Show information based on user input, Suppress user prompt if Silent parameter was passed if ($Mode -eq '0') { # Get & print script information from file - PrintFromFile "$PSScriptRoot/Assets/Menus/Info" + PrintFromFile "$PSScriptRoot/Assets/Menus/Info" "Information" - Write-Output "" Write-Output "Press any key to go back..." $null = [System.Console]::ReadKey() } @@ -1318,9 +1320,8 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS '1' { # Print the default settings & require userconfirmation, unless Silent parameter was passed if (-not $Silent) { - PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" + PrintFromFile "$PSScriptRoot/Assets/Menus/DefaultSettings" "Default Mode" - Write-Output "" Write-Output "Press enter to execute the script or press CTRL+C to quit..." Read-Host | Out-Null }