Add a subkey entry to the registry from the command line?

R

roman

Hi, I can't seem to add a subkey (hope that's the right term) to the
registry from a command line.
Start/Run/regedit /s myfile.reg
I make a file in notepad like the one below and give it a reg
extension and merge it into the registry. If I run it without the /s
switch it tells me the information was sucessfully entered but it just
gets ignored, there's no entry when I check the registry. I have used
similar efforts to delete or change the values but I can't figure out
how to add something new. "AddThisHere"= - seems to delete an existing
field so I assumed "AddThisHere"=+ would add one but no. Please send
help, roman.

REGEDIT5
[HKEY_CURRENT_USER\Console]
"AddThisHere"=+
 
R

Ramesh [MVP]

Roman,

This adds a REG_SZ value named "AddThisHere" in the right-pane.
----------------------------------------
REGEDIT4

[HKEY_CURRENT_USER\Console]
"AddThisHere"=""

----------------------------------------


This adds a sub-key under Console. (Key is different from Value)
-------------------------------------------------------
REGEDIT4

[HKEY_CURRENT_USER\Console\AddThisHere]

-------------------------------------------------------

--
Ramesh - Microsoft MVP
Windows XP Shell
http://www.mvps.org/sramesh2k
---------------------------------------
What You Should Know About the Sasser Worm and It Variants:
http://www.microsoft.com/security/incident/sasser.asp
---------------------------------------


Hi, I can't seem to add a subkey (hope that's the right term) to the
registry from a command line.
Start/Run/regedit /s myfile.reg
I make a file in notepad like the one below and give it a reg
extension and merge it into the registry. If I run it without the /s
switch it tells me the information was sucessfully entered but it just
gets ignored, there's no entry when I check the registry. I have used
similar efforts to delete or change the values but I can't figure out
how to add something new. "AddThisHere"= - seems to delete an existing
field so I assumed "AddThisHere"=+ would add one but no. Please send
help, roman.

REGEDIT5
[HKEY_CURRENT_USER\Console]
"AddThisHere"=+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top