views:

3375

answers:

6

How to launch windows regedit with certain path located, like "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0", so I don't have to do the clicking. What's the command line argument to do this? Or Any place to find the explanation of regedit switches?

A: 

This seems horribly out of date, but claims that it doesn't support this: http://support.microsoft.com/kb/82821

Simon Buchan
That's a whole different regedit... What we call regedit now is not the same as the Win3.x regedit. http://support.microsoft.com/kb/141377/en-us
Chris Charabaruk
+5  A: 

There's a program called RegJump, by Mark Russinovich, that does just what you want. It'll launch regedit and move it to the key you want from the command line.

RegJump uses (or at least used to) use the same regedit window on each invoke, so if you want multiple regedit sessions open, you'll still have to do things the old fashioned way for all but the one RegJump has adopted. A minor caveat, but one to keep note of, anyway.

Chris Charabaruk
As Matt Dillard pointed out in another answer here, there's also Favorites in regedit, so you can quickly jump to different keys of your choice within regedit itself.
Chris Charabaruk
+1  A: 

I don't think its possible with GUI regedit, http://winhlp.com/node/75 explains parameters.

You could use 'reg' from command prompt.

reg query HKLM\Software\Microsoft\VisualStudio\8.0

this will output everything under that location, Quite handy for batch files

I hope this helps your situation

PostMan
+2  A: 

As Chris mentions, RegJump will do the trick.

Also, if you find yourself jumping back and forth between several different paths, don't forget that you can set "Favorites" in Regedit. It's quite convenient, and you won't need a separate desktop icon for each one (as you might with RegJump).

Matt Dillard
+2  A: 

From http://windowsxp.mvps.org/jumpreg.htm (I have not tried any of these):

When you start Regedit, it automatically opens the last key that was viewed. (Registry Editor in Windows XP saves the last viewed registry key in a separate location). If you wish to jump to a particular registry key directly without navigating the paths manually, you may use any of these methods / tools.

Option 1 Using a VBScript: Copy these lines to a Notepad document as save as registry.vbs

'Launches Registry Editor with the chosen branch open automatically

'Author  : Ramesh Srinivasan

'Website: http://windowsxp.mvps.org



Set WshShell = CreateObject("WScript.Shell")

Dim MyKey

MyKey = Inputbox("Type the Registry path")

MyKey = "My Computer\" & MyKey

WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Lastkey",MyKey,"REG_SZ"

WshShell.Run "regedit", 1,True

Set WshShell = Nothing

Double-click Registry.vbs and then type the full registry path which you want to open. [ Example: HKEY_CLASSES_ROOT.MP3 ]

Limitation: The above method does not help if Regedit is already open.

Option 2 Regjump from Sysinternals.com

This little command-line applet takes a registry path and makes Regedit open to that path. It accepts root keys in standard (e.g. HKEY_LOCAL_MACHINE) and abbreviated form (e.g. HKLM).

Usage: regjump [path]

Example: C:\Regjump HKEY_CLASSES_ROOT.mp3

Option 3 12Ghosts JumpReg from 12ghosts.com

Jump to registry keys from a tray icon! This is a surprisingly useful tool. You can manage and directly jump to frequently accessed registry keys. Unlimited list size, jump to keys and values, get current key with one click, jump to key in clipboard, jump to same in key in HKCU or HKLM. Manage and sort keys with comments in an easy-to-use tray icon menu. Create shortcuts for registry keys.

The Hoss
+1  A: 

I'd also like to note that you can view and edit the registry from within PowerShell. Launch it, and use set-location to open the registry location of your choice. The short name of an HKEY is used like a drive letter in the file system (so to go to HKEY_LOCAL_MACHINE\Software, you'd say: set-location hklm:\Software).

More details about managing the registry in PowerShell can be found by typing get-help Registry at the PowerShell command prompt.

Chris Charabaruk