mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-21 21:41:29 -06:00
Fix Numlock on startup
Fix Numlock on startup
This commit is contained in:
parent
ab6898aebc
commit
31aedcf684
@ -16,8 +16,10 @@ function Invoke-WinUtilNumLock {
|
||||
$value = 0
|
||||
}
|
||||
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
||||
$Path = "HKU:\.Default\Control Panel\Keyboard"
|
||||
Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value
|
||||
$HKUPath = "HKU:\.Default\Control Panel\Keyboard"
|
||||
$HKCUPath = "HKCU:\Control Panel\Keyboard"
|
||||
Set-ItemProperty -Path $HKUPath -Name InitialKeyboardIndicators -Value $value
|
||||
Set-ItemProperty -Path $HKCUPath -Name InitialKeyboardIndicators -Value $value
|
||||
}
|
||||
Catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
|
Loading…
Reference in New Issue
Block a user