Skip to content

Commit b26e640

Browse files
committed
Add title to PowerShell window
- Fix wrong location warning color - Make last Personal Tweak one line
1 parent 9884c16 commit b26e640

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

WinDebloatTools.ps1

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function Main() {
1414
$Script:NeedRestart = $false
1515
$Script:DoneTitle = "Information"
1616
$Script:DoneMessage = "Process Completed!"
17+
$Host.UI.RawUI.WindowTitle = '🚀 Win Debloat Tools'
1718
}
1819

1920
Process {
@@ -41,19 +42,20 @@ function Main() {
4142
Import-Module -DisableNameChecking "$PSScriptRoot\src\utils\Individual-Tweaks.psm1" -Force
4243
Import-Module -DisableNameChecking "$PSScriptRoot\src\utils\Install-Individual-System-Apps.psm1" -Force
4344

45+
Set-ConsoleStyle
46+
4447
If ("$pwd" -notlike "$PSScriptRoot") {
45-
Write-Host "Wrong location detected, changing to script folder!" -BackgroundColor Yellow
48+
Write-Style "Wrong location detected, changing to script folder! ($pwd)" -Color Yellow -BackColor Black -Style Bold
4649
Set-Location -Path "$PSScriptRoot"
4750
}
4851

49-
Set-ConsoleStyle
5052
$CurrentFileName = (Split-Path -Path $PSCommandPath -Leaf).Split('.')[0]
5153
$CurrentFileLastModified = (Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy.MM.dd"
52-
(Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy-MM-dd"
54+
(Get-Item "$(Split-Path -Path $PSCommandPath -Leaf)").LastWriteTimeUtc | Get-Date -Format "yyyy.MM.dd"
5355
Start-Logging -File "$CurrentFileName-$(Get-Date -Format "yyyy-MM")"
5456
Write-Caption "$CurrentFileName v$CurrentFileLastModified"
55-
Write-Host "Your Current Folder $pwd"
56-
Write-Host "Script Root Folder $PSScriptRoot"
57+
Write-Style "Your Current Folder $pwd" -Color Cyan -BackColor Black -Style Bold
58+
Write-Style "Script Root Folder $PSScriptRoot" -Color Cyan -BackColor Black -Style Bold
5759
Write-ScriptLogo
5860

5961
If ($args) {

src/scripts/Register-PersonalTweaksList.ps1

+1-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ function Register-PersonalTweaksList() {
4747
$PathToLMRemovableDevices = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\DelegateFolders\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}"
4848

4949
Write-Title "My Personal Tweaks"
50-
If (!$Revert) {
51-
$Scripts = @("enable-photo-viewer.reg")
52-
} Else {
53-
$Scripts = @("disable-photo-viewer.reg")
54-
}
50+
If (!$Revert) { $Scripts = @("enable-photo-viewer.reg") } Else { $Scripts = @("disable-photo-viewer.reg") }
5551
Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts $Scripts -NoDialog
5652

5753
If ((Get-SystemSpec)[2] -like '*Windows 10*') {

0 commit comments

Comments
 (0)