-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Desktops
- Business PCs, Workstations and Point of Sale Systems
- Enable Num Lock automatically on a Thin Client T630

Create an account on the HP Community to personalize your profile and ask a question
04-26-2018 04:54 AM
Hello,
Somehow I cant figure out how to get Num Lock auto enabled on a Thin Client T630.
On other Thin Client device types like a T620 I get Num Lock auto enabled when I turn-on the function in the BIOS.
However, its not working probably on a T630.
It goes on at startup (logon screen) but when we arrive on the desktop (user interface) numlock turns off.
I also tried the following tricks in registry:
"Next, expand the “HKEY_USERS” folder. You’ll now need to repeat the above process several times, changing the InitialKeyboardIndicators value under each folder inside the HKEY_USERS folder.
Start by going to HKEY_USERS\.DEFAULT\Control Panel\Keyboard, and changing the InitialKeyboardIndicators value to 2. Next, repeat the process for the folder below the .DEFAULT folder–it’ll start with an “S-“.
Repeat this process for the remaining folders inside HKEY_USERS, changing the Control Panel\Keyboard\InitialKeyboardIndicators setting under each one."
But its still not working.
I have no clue what to do next.
Can someone help me out?
Thanks
06-14-2018 06:56 AM
1. Disable autologin of user accounts and reboot
2. run this powershell script when no user is logged in:
[CmdletBinding()] Param( [Parameter(Mandatory=$false)] [switch]$InformationOnly ) # Once CmdletBinding() is set up the script or function will now pick up two brand-new parameters: # -Verbose and -Debug #region Comments and Description <# .Name Keyboard_Reg_Setting.ps1 .Synopsis "Learn from the mistakes of others. You can never live long enough to make them all yourself." Groucho Marx .Description .History of Modifications 15-Jul-2016 A Stuckey .Notes Author : Andrew Stuckey <andrew.stuckey@hp.com> Blog : Not yet... Date : 15-Jul-2016 Version : 1.0 Beta # Requires Powershell -Version 2.0 or greater # WES7 Thin Clients have Powershell V2.0 .Example Powershell -ExecutionPolicy Unrestricted -file .\Keyboard_Reg_Setting.ps1 #> #endregion # ------------------- Start Here ---------------------------------------------------- #region Start $ScriptName = $MyInvocation.MyCommand.Name # Set default for Verbose message logging. .INI file processed later but we need a default # $VerbosePreference = "SilentlyContinue" # No Debug messages are displayed $VerbosePreference = "Continue" # Debug messages are displayed Write-Verbose "Powershell Script `"$ScriptName`" `n" # The directory the script is running from is $PSScriptRoot, but this variable does not seem to exist on a thin client (Powershell V2.0 issue) # So we must create our own variable pointing to the directory script is running from. $localScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition If ($localScriptRoot -match '^*.\\$') { $localScriptRoot = $localScriptRoot -replace ".{1}$" } # Setup variable for SYSTEM32 folder $WINDIR_SYSTEM32 = [environment]::SystemDirectory #endregion # ------------------------ Functions ----------------------------------------------- # Run a program, wait for completion and return exit code function funct_QK_Run_and_Return_Status { <# .Synopsis This function is used run and command and return and exit status from process This seems to work when run in function but not when run in line script #> Param( [Parameter(Mandatory=$True)] [string]$Executable, [Parameter(Mandatory=$True)] [string]$Arguments, [Parameter(Mandatory=$false)] [Boolean]$CheckExeExists=$True, [Parameter(Mandatory=$false)] [string]$Tempfolder, [Parameter(Mandatory=$false)] [switch]$DontErrorOnNonZeroReturnCode, [Parameter(Mandatory=$false)] [switch]$DisableVerboseLogging ) Begin { If ($DisableVerboseLogging.IsPresent -eq $False) { Write-Verbose "$($MyInvocation.MyCommand.Name):: Function started." Write-Verbose "Executable to run: `"$Executable`"" Write-Verbose "Arguments: `"$Arguments`"" } } Process { If ($CheckExeExists) { If ((Test-Path -Path $Executable) -eq $false) { Write-Warning "$Executable Not Found" funct_QK_ExitWithCode 99 } } # Sourced from http://stackoverflow.com/questions/10262231/obtaining-exitcode-using-start-process-and-waitforexit-instead-of-wait $pinfo = New-Object System.Diagnostics.ProcessStartInfo $pinfo.FileName = $Executable $pinfo.Arguments = $Arguments $pinfo.RedirectStandardError = $True $pinfo.RedirectStandardOutput = $True $pinfo.UseShellExecute = $false #$pinfo.WindowStyle = "Hidden" #$pinfo.WorkingDirectory = $Tempfolder $p = New-Object System.Diagnostics.Process $p.StartInfo = $pinfo $p.Start() | Out-Null #Do Other Stuff Here.... $p.WaitForExit() If (($($p.ExitCode) -ne 0) -and ($DontErrorOnNonZeroReturnCode -ne $true)) { Write-Warning "Running executable returned exit code: $($p.ExitCode)" } } End { If ($DisableVerboseLogging.IsPresent -eq $False) { Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended. `n " } Return [int]$($p.ExitCode) } } # ---------------- function funct_QK_Write_Reg { <# .Synopsis This function is used to create or overwrite registry entries This function handles the write filter issue of UFW not able to create reg keys but using REG.exe instead of Powershell native. #> param( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $True,Position=0)] [String] [ValidatePattern('^HKLM:\\')] $QK_RegPath, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $True,Position=1)] [String] $QK_RegName, [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $True,Position=2)] $QK_RegValue, [Parameter(Mandatory = $False, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $True,Position=3)] [String] [ValidateSet("String","DWord","Binary")] $QK_RegType = "String", [Parameter(Mandatory=$false,Position=4)] [Switch]$DeleteKey ) Begin {write-verbose "$($MyInvocation.MyCommand.Name):: Function started."} Process { # Create the base registry key # If (Test-Path -Path $QK_RegPath -erroraction silentlycontinue) { # write-verbose "Registry key `"$QK_RegPath`" already exists." } Else { If (($QK_Sysinfo.UWF_Present) -and ($QK_Sysinfo.UWF_Enabled)) { # Because New-Item does not work if UWF is on, we have to use REG.EXE. No idea why New-Item does not work :( $for_Reg = $QK_RegPath.Replace(":","") $Status = funct_QK_Run_and_Return_Status -Executable "C:\Windows\System32\Reg.exe" -Arguments "ADD `"$for_Reg`" /F" } else { If ($DeleteKey.IsPresent -eq $false) { New-Item -Path $QK_RegPath -ItemType Directory -Force | Out-Null If (Test-Path -Path $QK_RegPath) { write-verbose "Registry key `"$QK_RegPath`" created." } else { Write-Warning "Problem creating registry key `"$QK_RegPath`". " } } } } If (Get-ItemProperty -Path $QK_RegPath -Name $QK_RegName -erroraction silentlycontinue) { # Just in case the reg name is going to change type, we delete the key and recreate. # This is 10 milliseconds slower but always works. # Looked at trying to work out what type of registry it is but too hard. :( # $QK_CurrentRegValue = (Get-ItemProperty $QK_RegPath -name $QK_RegName).$QK_RegName # "The Reg key $QK_RegPath\$QK_RegName has a value of `"$QK_CurrentRegValue`"" Remove-ItemProperty -Path $QK_RegPath -Name $QK_RegName } # If we are deleting key, we are done. If ($DeleteKey.IsPresent) { write-verbose "Registry value `"$QK_RegPath\$QK_RegName`" deleted." } else { $Status = New-ItemProperty $QK_RegPath -Name $QK_RegName -Value $QK_RegValue -PropertyType $QK_RegType -ErrorAction SilentlyContinue If ($status -ne $null) { write-verbose "Registry value `"$QK_RegPath\$QK_RegName`" set to value `"$QK_RegValue`" of type `"$QK_RegType`"." } else { Write-Warning "ERROR: Could not set `"$QK_RegPath\$QK_RegName`" to value `"$QK_RegValue`"." } } } End {write-verbose "$($MyInvocation.MyCommand.Name):: Function ended. `n "} } # ---------------- function funct_QK_ExitWithCode { param ( [Parameter(Mandatory = $true)] [int] $exitcode ) $host.SetShouldExit($exitcode) [Environment]::Exit($exitcode) } # ---------------- function funct_QK_Write_Verbose { # Verbose message log out in color. Default="Green" Param( [Parameter(Mandatory = $true)] [String]$Message, [Parameter(Mandatory = $false)] [String]$Color = "Green" ) # Collect information on current formatting data for messages $PrivateData = (Get-Host).PrivateData # Save current VerboseForegroundColor $VFC_Save = $PrivateData.VerboseForegroundColor # Change VerboseForegroundColor to Green or other color supplied to this function $PrivateData.VerboseForegroundColor = $Color # Write Verbose message using selected color Write-Verbose $message -Verbose # Set VerboseForegroundColor back to saved color $PrivateData.VerboseForegroundColor = $VFC_save # End of Function } # Create or overwrite "User" registry entries Function funct_QK_Update_User_Registry ($QK_RegKey_Local, $QK_RegName_Local, $QK_RegValue_Local, $QK_RegType_Local) { <# .Synopsis This function is used to create or overwrite User registry entries .Description Mounts the NTUSER.DAT of the USER account as HKLM:User making it accessible to update/modify .Example funct_QK_Update_User_Registry "HKLM:\User\SOFTWARE\HP" "Test 1" 1 "DWord" funct_QK_Update_User_Registry "HKLM:\User\SOFTWARE\HP" "Test 2" "Two" "String" #> Begin { Write-Verbose "$($MyInvocation.MyCommand.Name):: Function started." } Process { # Set variable pointing to the "User" account registry hive $User_REG_File_Local = "C:\Users\User\NTUSER.DAT" # Because the REG utility and Powershell CMDLET's need different syntax, we need two variables $User_REG_MountPoint_Local = "HKLM\User" $User_REG_MountPoint_Local_PS = "HKLM:\User" # Check the Reg File that is the users registry hive exists If ((Test-Path -Path $User_REG_File_Local) -eq $True) { Write-Verbose "Mounting the registry hive of `"User`"." $REG_EXE_Local = "$WINDIR_SYSTEM32\Reg.exe" $REG_ARGS_Local = "LOAD $User_REG_MountPoint_Local $User_REG_File_Local" $Status = funct_QK_Run_and_Return_Status -Executable $REG_EXE_Local -Arguments $REG_ARGS_Local If ($Status -ne 0) { Write-Warning "Unable to mount the user registry hive `"$User_REG_File_Local`" at `"$User_REG_MountPoint_Local`"." funct_QK_ExitWithCode 99 } Else { Write-Verbose "Registry Hive `"$User_REG_File_Local`" mounted to `"$User_REG_MountPoint_Local`"" } } # Now call another function to do the work we need # Note: The NTUSER.DAT has been mounted as HKLM:\User so anything under this can now be modified funct_QK_Write_Reg -QK_RegPath $QK_RegKey_Local -QK_RegName $QK_RegName_Local -QK_RegValue $QK_RegValue_Local -QK_RegType $QK_RegType_Local # Now clean up/unload of the NTUSR.DAT Write-Verbose "Unload Reg Hive `"$User_REG_MountPoint_Local`"." $unloaded = $false $attempts_Local = 0 $Status = "" while (($Status -ne 0) -and ($attempts_Local -le 5)) { [GC]::Collect() # necessary call to be able to unload registry hive # [GC]::WaitForPendingFinalizers() # As suggested in a forum to wait for the flush to complete. Not yet tested. May be WES8+ only Write-Verbose "Attempting to dismount registry hive of `"User`"." $Status = funct_QK_Run_and_Return_Status -Executable $REG_EXE_Local -Arguments "UNLOAD $User_REG_MountPoint_Local" -CheckExeExists $False -DisableVerboseLogging $attempts_Local += 1 If ($attempts_Local -gt 1 ) { Write-Warning "Attempts = $attempts_Local" } } If ($Status -ne 0) { Write-Warning "Unable to dismount default user registry hive at `"$User_REG_MountPoint_Local`" - manual dismount required." Write-Warning "Script Exiting. `n`n" funct_QK_ExitWithCode 99 } } End { Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended.`n " } } # ------------------------ End Functions ----------------------------------------------- # -------------------- Start of real body of script ----------------------------------- # #region Add control of NumLock in User account funct_QK_write_verbose -Message "Setup NumLock in User profile." # http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/want-to-set-num-lock-to-be-on-and-active-at/7b48ae6f-fa9c-4bc2-8359-81e0c5e5d6a2?auth=1 # HKEY_CURRENT_USER\Control Panel\Keyboard # InitialKeyboardIndicators # 0 - Turn all indicators Off (NumLock, CapsLock, ScrollLock) # 2 - Turn NumLock On funct_QK_Update_User_Registry "HKLM:\User\Control Panel\Keyboard" "InitialKeyboardIndicators" "2" "String" # funct_QK_Update_User_Registry "HKLM:\User\Control Panel\Keyboard" "InitialKeyboardIndicators" "0" "String" funct_QK_write_verbose -Message "Setup NumLock in User profile complete. `n`n" #endregion # ------------------------------------------------------------------------------------------------