diff --git a/winutil.ps1 b/winutil.ps1 index aa683a3b..88b8695d 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -8,7 +8,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.07.25 + Version : 24.07.31 #> param ( [switch]$Debug, @@ -45,7 +45,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.07.25" +$sync.version = "24.07.31" $sync.configs = @{} $sync.ProcessRunning = $false @@ -744,6 +744,15 @@ Function Get-WinUtilToggleStatus { return $true } } + if ($ToggleSwitch -eq "WPFToggleDetailedBSoD") { + $DetailedBSoD = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisplayParameters + if($DetailedBSoD -eq 0) { + return $false + } + else{ + return $true + } + } } function Get-WinUtilVariables { @@ -2012,6 +2021,40 @@ Function Invoke-WinUtilDarkMode { Write-Warning $psitem.Exception.StackTrace } } +Function Invoke-WinUtilDetailedBSoD { + <# + + .SYNOPSIS + Enables/Disables Detailed BSoD + (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'DisplayParameters').DisplayParameters + + + #> + Param($Enabled) + Try{ + if ($Enabled -eq $false){ + Write-Host "Enabling Detailed BSoD" + $value = 1 + } + else { + Write-Host "Disabling Detailed BSoD" + $value =0 + } + + $Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl" + Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value + } + Catch [System.Security.SecurityException] { + Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" + } + Catch [System.Management.Automation.ItemNotFoundException] { + Write-Warning $psitem.Exception.ErrorRecord + } + Catch{ + Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning $psitem.Exception.StackTrace + } +} function Invoke-WinUtilFeatureInstall { <# @@ -5309,6 +5352,7 @@ function Invoke-WPFToggle { "WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)} "WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $(Get-WinUtilToggleStatus WPFToggleHiddenFiles)} "WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $(Get-WinUtilToggleStatus WPFToggleTaskbarAlignment)} + "WPFToggleDetailedBSoD" {Invoke-WinUtilDetailedBSoD $(Get-WinUtilToggleStatus WPFToggleDetailedBSoD)} } } function Invoke-WPFTweakPS7{ @@ -12535,6 +12579,14 @@ $sync.configs.tweaks = '{ "Order": "a204_", "Type": "Toggle" }, + "WPFToggleDetailedBSoD": { + "Content": "Detailed BSoD", + "Description": "If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.", + "category": "Customize Preferences", + "panel": "2", + "Order": "a205_", + "Type": "Toggle" + }, "WPFOOSUbutton": { "Content": "Run OO Shutup 10", "category": "z__Advanced Tweaks - CAUTION", @@ -15001,6 +15053,10 @@ $inputXML = '