How To Open Regkey

The Windows Registry Editor window should open and look similar to the example shown below. Tip: If you have restricted access to the Windows computer you're logged into, you may not be able to access the Windows registry. Nov 11, 2016 - You can directly jump to your desired Registry Key in the Windows. When you want to open Registry Editor to any desired key path, the idea.

Tip

If you're attempting to edit the registry from the command line because you're unable to get into normal Windows, try first booting into Windows Safe Mode and run Regedit from Safe Mode.

Microsoft Windows XP, Vista, and 7 users

Microsoft Windows XP users can view, edit, and modify their registry from the MS-DOS command prompt by using the reg command. See the reg command page for additional information and examples.

Windows XP users can also use the following solution to edit and modify their registry from the command prompt.

Microsoft Windows 95, 98, ME, and 2000 users

By default, Microsoft Windows 95, 98, ME, and 2000 users can import registry files from the command prompt using the Regedit command. Using this command and a registry file that contains the proper commands, a user can add, remove, and otherwise edit the registry from the command line.

If you want to import a registry file from the command line, you can use the Regedit command and the name of the file you want to import. For example, if the name of the file was hope.reg, you would type the following command at the prompt to import that file into the registry.

The file hope.reg could contain the commands necessary to add and remove registry values. Below are some examples of registry files to create entries, delete single entries as well as a complete folder. To create these files yourself, copy the following examples into an empty .reg file or use notepad or the edit command to create a file using the following commands.

Note

Users running earlier versions of Windows may want to substitute Windows Registry Editor Version 5.00 with REGEDIT4.

Open

The following example addsa ComputerHope folder into the HKEY_LOCAL_MACHINESoftware directory with a string example that has a data value of data here.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREComputerHope]
'example'='data here'

To delete a single entry in the registry, add a hyphen (minus) key after the equal sign. For example, if we wanted to delete our string value 'example' we created with the above example, we would create the following .reg file.

Finally, to delete the folder and all its continents, create a .reg file similar to the following example.

Available Regedit command switches and syntax that can be used

/SThe /s or -s Regedit commands can be added to the command to suppress the confirmation box 'Are you sure want to add the information in hope.reg to the registry?' when running the command at the command line. For example, using the same command used earlier you can type: Regedit /s hope.reg and have that registry file immediately imported into the registry.
/EExport the full registry to a file. For example, typing: Regedit /e full.reg would export the full registry to the full.reg file.
This switch can also be used to export individual registry keys. For example, typing: Regedit /e software.reg 'HKEY_LOCAL_MACHINESoftware' would export all the values in this folder to the software.reg file.
This switch is not case sensitive.
/DMicrosoft Windows 95, 98, and ME users can delete registry keys using this switch. For example, typing: Regedit /d '<registry_key>' where registry_key is replaced with the registry key you want to delete would delete that registry key.
/L:SystemSpecify the location of the system.dat registry file under Microsoft Windows 95, 98, and ME. For example, Regedit /L:c:windowssystem.dat c:system.dat
/R:userSpecify the location of the user.dat registry file under Microsoft Windows 95, 98, and ME. For example, Regedit /L:c:windowssystem.dat c:system.dat
/CCompress registry file. This switch only works in Windows 98.

Additional information

  • See our registry definition for further information and related links.

How do I launch Windows' RegEdit with certain path located, like 'HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio8.0', so I don't have to do the clicking?

What's the command line argument to do this? Or is there a place to find the explanation of RegEdit's switches?

XTLXTL

12 Answers

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 CharabarukChris Charabaruk

Use the following batch file (add to filename.bat):

to replace:

with your registry path.

Byron PersinoByron Persino

How To Open Regkey Fl Studio

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

The actor his next major hit in 2008 as he starred in family romantic drama, Santosh Subramaniam. Tamil movie jayam ravi movies.

How To Open Regkey

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.

Note: For Windows 7, you need to replace the line MyKey = 'My Computer' & MyKey with MyKey = 'Computer' & MyKey (remove the string My). For a German Windows XP the string 'My Computer' must be replaced by 'Arbeitsplatz'.

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 HossThe Hoss

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_MACHINESoftware, 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 CharabarukChris Charabaruk

Here is one more batch file solution with several enhancements in comparison to the other batch solutions posted here.

It also sets string value LastKey updated by Regedit itself on every exit to show after start the same key as on last exit.

The enhancements are:

Regkey
  1. Registry path can be passed also as command line parameter to the batch script.

  2. Registry path can be entered or pasted with or without surrounding double quotes.

  3. Registry path can be entered or pasted or passed as parameter with or without surrounding square brackets.

  4. Registry path can be entered or pasted or passed as parameter also with an abbreviated hive name (HKCC, HKCU, HKCR, HKLM, HKU).

  5. Batch script checks for already running Regedit as registry key is not shown when starting Regedit while Regedit is running already. The batch user is asked if running instance should be killed to restart it for showing entered registry path. If the batch user chooses not to kill Regedit, Regedit is started without setting entered path resulting (usually) in just getting Regedit window to foreground.

  6. The batch file tries to automatically get name of registry root which is on English Windows XP My Computer, on German Windows XP, Arbeitsplatz, and on Windows 7 just Computer. This could fail if the value LastKey of Regedit is missing or empty in registry. For this case please set the right root name in third line of the batch code.

MofiMofi

Copy the below text and save it as a batch file and run

Input the path of the registry key you wish to open when the batch file prompts for it, and press Enter. Regedit opens to the key defined in that value.

thelionkingrafikithelionkingrafiki

I thought this C# solution might help:

How To Open Regkey

By making use of an earlier suggestion, we can trick RegEdit into opening the key we want even though we can't pass the key as a parameter.

In this example, a menu option of 'Registry Settings' opens RegEdit to the node for the program that called it.

Program's form:

MyCommonFunctions.Registry

Of course, you could put it all in one method of the form, but I like reusablity.

Clint StLaurentClint StLaurent

Create a BAT file using clipboard.exe and regjump.exeto jump to the key in the clipboard:

( %~dp0 means 'the path to the BAT file' )

JackJack

Building on lionkingrafiki's answer, here's a more robust solution that will accept a reg key path as an argument and will automatically translate HKLM to HKEY_LOCAL_MACHINE or similar as needed. If no argument, the script checks the clipboard using the htmlfile COM object invoked by a JScript hybrid chimera. The copied data will be split and tokenized, so it doesn't matter if it's not trimmed or even among an entire paragraph of copied dirt. And finally, the key's existence is verified before LastKey is modified. Key paths containing spaces must be within double quotes.

Community
rojorojo

Here is a simple PowerShell function based off of this answer above https://stackoverflow.com/a/12516008/1179573

The answer above doesn't actually explain very well what it does. When you close RegEdit, it saves your last known position in HKCU:SoftwareMicrosoftWindowsCurrentVersionAppletsRegedit, so this merely replaces the last known position with where you want to jump, then opens it.

Community
Alex KwitnyAlex Kwitny

This seems horribly out of date, but Registration Info Editor (REGEDIT) Command-Line Switches claims that it doesn't support this.

Simon BuchanSimon Buchan

You can make it appear like regedit does this behaviour by creating a batch file (from the submissions already given) but call it regedit.bat and put it in the C:WINDOWSsystem32 folder. (you may want it to skip editting the lastkey in the registry if no command line args are given, so 'regedit' on its own works as regedit always did) Then 'regedit HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio8.0' will do what you want.

This uses the fact that the order in PATH is usually C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem; etc

martskimartski

Not the answer you're looking for? Browse other questions tagged command-lineregedit or ask your own question.

Posted :