ghacks Technology News

Prevent Windows Registry from remembering last key viewed

“This is a guest post by Aseem Kishore, the lead blogger for HelpDeskGeek.com, which focuses on providing Help Desk tips to IT Professionals.”

One of the things that bothers me the most is when I open the Windows Registry to edit a key and it loads up showing me the last key I had viewed. I normally go into the Registry to make one change and that’s it. I never go back and edit the same key. Wouldn’t it be great if you could open the registry and all the hives would load up collapsed like you opened it for the first time ever?

Luckily, there’s a little shortcut you can create to the registry that will get rid of that annoying little feature. It’s actually a script with a few lines of code. Just open Notepad and paste in the following lines of code:

Dim objShell, RegKey, Q

Set objShell = CreateObject("WScript.Shell")

strQuote = chr(34)

RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"

RegKey = RegKey & "\LastKey"

objShell.RegWrite RegKey, ""

objShell.Run "regedit"

Save the file with a .VBS extension, which stands for Visual Basic Script. To do this in Notepad, choose All Files for the Save as type combo box and name the file “Registry.vbs” without the quotes.

registry

So now instead of opening the Registry and getting something that looks like this:

registry windows

You can easily start from the very top of the Registry hives like normal!

registry hives

If you want to make if more official, you can change the icon for the VBS script file to the Registry icon. In order to do this, you have to create a shortcut to the script. Just right-click on Registry.vbs, click on Send To, and then click on Desktop (create shortcut).

send to desktop

Now right-click on the shortcut icon and click on Rename. Name the shortcut Registry. Next right-click again and go to Properties. Click on the Change Icon button.

change icon

Choose the Registry icon from the list of icons. Finally you can copy your shortcut to the Start Menu for easy acce

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.

Related Articles:

Forensic Windows Registry Software Registry Report
Registry Life, Clean, Optimize And Backup The Windows Registry
Registry Commander, Advanced Windows Registry Editor
Windows Tip: Edit User Registry of other users
Disable Recent Documents Listing in Registry



About the Author:Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand. You can follow Martin on Facebook or Twitter.

Author: , Tuesday October 21, 2008 -
Tags:, , , , ,


Responses so far:

  1. Bill says:

    UHHHHHHH OR you could just collapse them yourself before you close regedit. stupid.

  2. Brian says:

    @Bill-that wastes time

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us