From b83d12c3b89c2dbf8c6b255e95a7daff0bd3b215 Mon Sep 17 00:00:00 2001 From: ThioJoe <12518330+ThioJoe@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:07:38 -0700 Subject: [PATCH] SandboxStartup - Fix console word wrap issue and reg force - Check if registry key already exists before creating it instead of blindly forcing, which overwrites all the data values. - Change the ScreenBufferSize value to the max integer allowed, because before it was keeping the "low value" of 120 width which for some reason was messing up the line wrapping. --- Startup Scripts/SandboxStartup.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Startup Scripts/SandboxStartup.ps1 b/Startup Scripts/SandboxStartup.ps1 index 607a257..bc0d8f4 100644 --- a/Startup Scripts/SandboxStartup.ps1 +++ b/Startup Scripts/SandboxStartup.ps1 @@ -43,11 +43,11 @@ try { Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -Err Set-ItemProperty -Path "HKCU:\Software\Microsoft\Clipboard" -Name "EnableClipboardHistory" -Value 1 -Type DWord -Force # Increase the output history of powershell / cmd to max number of lines -New-Item -Path "HKCU:\Console" -Force | Out-Null -Set-ItemProperty -Path "HKCU:\Console" -Name "ScreenBufferSize" -Value 2147418232 -Type DWord +If (!(Test-Path "HKCU:\Console")) { New-Item -Path "HKCU:\Console" -Force | Out-Null } +Set-ItemProperty -Path "HKCU:\Console" -Name "ScreenBufferSize" -Value 4294967295 -Type DWord # Disable spotlight wallpaper, and set the wallpaper to the default light theme wallpaper -New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DesktopSpotlight\Settings" -Force | Out-Null # Ensures the key exists +If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DesktopSpotlight\Settings")) { New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DesktopSpotlight\Settings" -Force | Out-Null } # Ensures the key exists Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DesktopSpotlight\Settings" -Name "EnabledState" -Value 0 -Type DWord Copy-Item -Path "C:\Windows\Web\Wallpaper\Windows\img0.jpg" -Destination "$env:APPDATA\Microsoft\Windows\Themes\TranscodedWallpaper" -Force # For dark theme wallpaper, use "img19.jpg" instead of img0.jpg reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{2cc5ca98-6485-489a-920e-b3e88a6ccce3}" /t REG_DWORD /d 1 /f # Removes the "about this picture" icon on desktop.