mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -06:00
fix get state & add disable emoticon (#2554)
This commit is contained in:
parent
0919e78693
commit
5d7d121e1f
@ -140,8 +140,9 @@ Function Get-WinUtilToggleStatus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleDetailedBSoD") {
|
if ($ToggleSwitch -eq "WPFToggleDetailedBSoD") {
|
||||||
$DetailedBSoD = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisplayParameters
|
$DetailedBSoD1 = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisplayParameters
|
||||||
if($DetailedBSoD -eq 0) {
|
$DetailedBSoD2 = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisableEmoticon
|
||||||
|
if (($DetailedBSoD1 -eq 0) -or ($DetailedBSoD2 -eq 0) -or !$DetailedBSoD1 -or !$DetailedBSoD2) {
|
||||||
return $false
|
return $false
|
||||||
} else {
|
} else {
|
||||||
return $true
|
return $true
|
||||||
|
@ -18,6 +18,10 @@ Function Invoke-WinUtilDetailedBSoD {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
|
$Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
|
||||||
|
$dwords = ("DisplayParameters", "DisableEmoticon")
|
||||||
|
foreach ($name in $dwords) {
|
||||||
|
Set-ItemProperty -Path $Path -Name $name -Value $value
|
||||||
|
}
|
||||||
Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value
|
Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value
|
||||||
} catch [System.Security.SecurityException] {
|
} catch [System.Security.SecurityException] {
|
||||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
Loading…
Reference in New Issue
Block a user