Merge to 'main' branch compiler-improvement/remove-trailing-whitespace

This commit is contained in:
Mr.k
2024-08-06 23:16:09 +03:00
7 changed files with 682 additions and 259 deletions

View File

@ -15,9 +15,12 @@ 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
} catch [System.Security.SecurityException] {
$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"
} catch [System.Management.Automation.ItemNotFoundException] {
Write-Warning $psitem.Exception.ErrorRecord