mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Add username to header in info and default mode overview screens
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user