From 313c5f59de439447edf2c5ffb0e928f417ad01e9 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Sun, 28 Jul 2024 15:32:00 +0000 Subject: [PATCH 01/17] =?UTF-8?q?Deploying=20to=20main=20from=20@=20ChrisT?= =?UTF-8?q?itusTech/winutil@7de93ae20857cc30477f9da7b7dc48c15b8deb58=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4f4fc20e3..7db6f373a7 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win These are the sponsors that help keep this project alive with monthly contributions. -Gregory NavasarkianYusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattJan WilleOwenStefanthaddlDave Jones +Gregory NavasarkianYusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattJan WilleOwenStefanthaddlPaulDave Jones ## 🏅 Thanks to all Contributors Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. From 9f33cb1b82cfbbea1bfa954c5948367993a1eb3a Mon Sep 17 00:00:00 2001 From: MyDrift Date: Wed, 31 Jul 2024 03:50:50 +0200 Subject: [PATCH 02/17] add "Disable detailed BSoD Preference" (#2451) --- config/tweaks.json | 8 +++++ functions/private/Get-WinUtilToggleStatus.ps1 | 9 +++++ .../private/Invoke-WinUtilDetailedBSoD.ps1 | 34 +++++++++++++++++++ functions/public/Invoke-WPFToggle.ps1 | 1 + 4 files changed, 52 insertions(+) create mode 100644 functions/private/Invoke-WinUtilDetailedBSoD.ps1 diff --git a/config/tweaks.json b/config/tweaks.json index 1010071fc3..8916e1ef31 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -3152,6 +3152,14 @@ "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", diff --git a/functions/private/Get-WinUtilToggleStatus.ps1 b/functions/private/Get-WinUtilToggleStatus.ps1 index 76245f9b4b..56d8d14d2a 100644 --- a/functions/private/Get-WinUtilToggleStatus.ps1 +++ b/functions/private/Get-WinUtilToggleStatus.ps1 @@ -154,4 +154,13 @@ 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 + } + } } diff --git a/functions/private/Invoke-WinUtilDetailedBSoD.ps1 b/functions/private/Invoke-WinUtilDetailedBSoD.ps1 new file mode 100644 index 0000000000..ad871558fc --- /dev/null +++ b/functions/private/Invoke-WinUtilDetailedBSoD.ps1 @@ -0,0 +1,34 @@ +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 + } +} \ No newline at end of file diff --git a/functions/public/Invoke-WPFToggle.ps1 b/functions/public/Invoke-WPFToggle.ps1 index 539878c7d1..fa1868f204 100644 --- a/functions/public/Invoke-WPFToggle.ps1 +++ b/functions/public/Invoke-WPFToggle.ps1 @@ -32,5 +32,6 @@ 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)} } } From e38615b4b4695002a690b04bac110cd87ecb2d54 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Wed, 31 Jul 2024 01:51:18 +0000 Subject: [PATCH 03/17] Compile Winutil --- winutil.ps1 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index aa683a3b79..88b8695d9d 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 = '