mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -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
|
$value = 0
|
||||||
}
|
}
|
||||||
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
||||||
$Path = "HKU:\.Default\Control Panel\Keyboard"
|
$HKUPath = "HKU:\.Default\Control Panel\Keyboard"
|
||||||
Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value
|
$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] {
|
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