Where Regedit Stores Settings and Last Key Location
The Windows Registry Editor (regedit.exe) saves its
user-specific state, including window dimensions, layout positions, and
the last viewed registry key, within the HKEY_CURRENT_USER
hive. Whenever you close Regedit, Windows writes your current session
details to this location so your workspace is restored the next time you
launch the utility.
The Registry Path for Regedit Settings
All interface settings, search preferences, and session states for Regedit are located in the following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit
Because these settings reside under HKEY_CURRENT_USER,
each user account on a Windows system maintains its own separate
configuration.
Key Values and What They Store
Inside the Regedit key, Windows manages several specific
values:
- LastKey (
REG_SZ): Contains the full path of the last registry key highlighted before the program was closed. On the next launch, Regedit reads this string and automatically expands the tree view to that exact key. - View (
REG_BINARY): Stores the window size, screen coordinates, column widths, and the position of the splitter bar dividing the navigation tree from the values pane. - FindFlags (
REG_DWORD): Remembers your search options (such as “Match whole string only”, “Keys”, “Values”, or “Data”) from the last search query.
Favorites Location
If you use the Favorites menu to bookmark frequently accessed paths, Regedit saves them in a dedicated subkey:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites
Each favorite entry is saved as a string value (REG_SZ),
where the value name is the label you assigned and the value data is the
target registry path.
How to Reset Regedit Interface Settings
To reset Regedit so that it opens at the root level (“Computer”) instead of your previous location:
- Close the Registry Editor.
- Open a Command Prompt or PowerShell window.
- Run the following command to clear the last viewed key:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v LastKey /t REG_SZ /d "" /f
To reset the window layout and all interface preferences to factory
defaults, delete the entire
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit
key. Windows will automatically recreate it with default values the next
time you open the Registry Editor.