Prevent Regedit from Opening Last Viewed Key

By default, the Windows Registry Editor automatically saves the path of the last key you accessed and navigates directly back to it the next time the tool is launched. If you prefer Regedit to open cleanly with all root hives collapsed, you can prevent this behavior by restricting write permissions to the registry entry responsible for tracking your history.

Step-by-Step Guide to Disable the Last Viewed Key

  1. Open Registry Editor
    • Press Windows Key + R to open the Run dialog box.
    • Type regedit and press Enter (or click OK).
  2. Navigate to the Applet Configuration Key
    • Paste or browse to the following path in the address bar:

      HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit
  3. Reset the Last Key Value
    • In the right pane, double-click the LastKey string value.
    • Delete any text inside the Value data field to leave it blank (or set it to Computer).
    • Click OK.
  4. Lock Permissions to Prevent Updates
    • In the left pane, right-click the Regedit folder (key) and select Permissions.
    • Click the Advanced button near the bottom.
    • Click Add, then click Select a principal at the top.
    • Type your Windows username (or type Everyone) and click OK.
    • Change the Type dropdown at the top from Allow to Deny.
    • Click Show advanced permissions on the right side.
    • Check only the box for Set Value (leave all other permissions unchecked).
    • Click OK, then click Apply, and confirm any warning prompts that appear.
    • Click OK to close all remaining dialog boxes.

Once applied, Regedit will no longer have permission to update the LastKey value when you close it, forcing the application to open to the root level on every subsequent launch.