How to Prevent Regedit.exe from Using the Last State

ID: Q244004


The information in this article applies to:
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

By default, when you start Regedit.exe, it displays the last key you accessed the last time you ran Regedit. This article describes how to prevent this behavior.


MORE INFORMATION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

To prevent Regedit from displaying the last key you accessed when you start Regedit:

  1. Start Regedt32.exe.


  2. Locate the following registry key:


  3. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit
  4. Double-click the LastKey value, clear the entry in the String box, and then click OK.


  5. Click the Regedit key, and then click Permissions on the Security menu.


  6. Remove Full Control access for any user who does not want Regedit to display the last key the user accessed in the previous Regedit session, and then click OK.

    Please note that if permissions cannot be removed, they may need to be denied.


  7. Quit Regedt32.exe.


If you do not want to deny access to users, there is an easy way to close all keys and hives after you start Regedit. After you start Regedit, press and hold down SHIFT+LEFT ARROW to collapse all the entries back to the My Computer entry. You must do this each time you start Regedit.

Note that Regedt32.exe does not exhibit the behavior noted above.

Additional query words:

Keywords : kbtool
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 11, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.