Jump to content

Launch Regedit with no open Keys


Recommended Posts

Regedit stores the last key that was open in the registry. This script clears the last remembered key from the registry and opens Regedit at the top with no open keys.

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 "%systemroot%\System32\regedt32"

Copy this code into a text file and save it as a .vbs file. (regedit.vbs, for example).

I put mine in the windows directory and created a shortcut to it on the taskbar. I don't really like the vbs icon. :)

Sorry If this is already on the site. I did search for it but there are a lot of tweaks



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...