Windows operating systems use the
Windows Registery as an hierarchical database to store low-level configuration and settings about operating system and applications. The
HKEY_CURRENT_USER which is also expressed as
HKCU registery hive is used to store configuration about the current user for the Windows operating system and applications.
Open HKEY_CURRENT_USER (HKCU)
The HKEY_CURRENT_USER (HKCU) can be opened via the
Registry Editor . First we opend the registery editor via the Start Menu. Type
registry into the Start menu and click to it.
In the registry editor click to the
HKEY_CURRENT_USER like below which opens the subkeys.
As we can see that the HKEY_CURRENT_USER has subkeys but do not contains a direct key except
Subkeys and Contents of HKEY_CURRENT_USER (HKCU)
The HKEY_CURRENT_USER is a user-specific registry key where its contains may change according to the different user. But in general, it provides the following subkeys and contents.
- Control Panel
- Keyboard Layout
- Volatile Environment
List Subkeys of HKEY_CURRENT_USER (HKCU)
Get-ChildItem command can be used to list subkeys of the HKEY_CURRENT_USER (HKCU). Following command lists subkeys and keys in the HKEY_CURRENT_USER.
Get-ChildItem -Path HKCU:\
Also only yhe names of the HKCU can be listed by filtering the keys like below.
Get-ChildItem -Path HKCU:\ | Select-Object Name
List All Subkeys of HKEY_CURRENT_USER (HKCU) Recursively
The HKEY_CURRENT_USER (HKCU) provides a lot of subkeys in a parent-child manner. All of these subkeys and keys can be listed recursively by using the Get-ChildItem PowerShell command with
Get-ChildItem -Path HKCU:\ -Recursive | Select-Object Name