From 5e108835479fe8b10570efcdd904630ff7e1aaf4 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 6 Jun 2024 11:33:39 -0500 Subject: [PATCH] Fix Numlock toggle (#2044) * Fix Numlock at login * Compile Winutil --------- Co-authored-by: ChrisTitusTech --- functions/private/Invoke-WinUtilNumLock.ps1 | 2 +- winutil.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/private/Invoke-WinUtilNumLock.ps1 b/functions/private/Invoke-WinUtilNumLock.ps1 index 9f62b22a..64fe4110 100644 --- a/functions/private/Invoke-WinUtilNumLock.ps1 +++ b/functions/private/Invoke-WinUtilNumLock.ps1 @@ -15,7 +15,7 @@ function Invoke-WinUtilNumLock { Write-Host "Disabling Numlock on startup" $value = 0 } - $Path = "HKCU:\Control Panel\Keyboard" + $Path = "HKU:\.Default\Control Panel\Keyboard" Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value } Catch [System.Security.SecurityException] { diff --git a/winutil.ps1 b/winutil.ps1 index d8d080c6..ab162c15 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -1987,7 +1987,7 @@ function Invoke-WinUtilNumLock { Write-Host "Disabling Numlock on startup" $value = 0 } - $Path = "HKCU:\Control Panel\Keyboard" + $Path = "HKU:\.Default\Control Panel\Keyboard" Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value } Catch [System.Security.SecurityException] {