post is that everything in the registry is a key, but
where do these "directories" (i dont know what else to
call them) exist so i can change them?
Like I said in my previous post, when I tried:
[HKEY_LOCAL_MACHINE\SOFTWARE\]
"MYPROGRAM"="MYPROGRAM2"
It didn't actually RENAME the tree to the new name. The
tree HKEY_LOCAL_MACHINE\SOFTWARE\MYPROGRAM was untouched,
and instead there was a key in
HKEY_LOCAL_MACHINE\SOFTWARE\ which was MYPROGRAM =
MYPROGRAM2.
Is this making sense? If it would be easier to discuss
over email, please email me. Thanks!
-----Original Message-----
So you're halfway there. Now all you need to do is delete the old key
If you want to remove a key and all it's underlying values then you'll need
to construct your .reg file with a - minus sign in front of the key you want
to remove.
An example file to remove a file association .zzz from HKCR
-----------------Begin File-----------
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.zzz]
----------------End File-------------
(note the minus sign in front of HKEY)
If you need to delete only certain values, for example the string value
"InfoTip"="Contains zzz files"
Then put a minus sign after the equals sign
without "quotes", something like
"InfoTip"=-
So your .reg file would look like
----------------Begin File------------
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.zzz]
"InfoTip"=-
----------------End File-------------
regedit /s filename.reg to import silently
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]
Lawrence Lu said:
Ok, sorry for the confusion. Let me give you an example
of what I'm trying to do. In the Windows Registry (as
seen from regedit.exe) there is a tree. Lets say there
is a tree "HKEY_LOCAL_MACHINE\SOFTWARE\MYPROGRAM". What
your saying is that this "tree" is a key? Anyways, what
I would like to do is change the tree's "name" to:
HKEY_LOCAL_MACHINE\SOFTWARE\MYPROGRAM2 . I called them
directories because thats what it looked like in
regedit.exe .
I tried doing this:
[HKEY_LOCAL_MACHINE\SOFTWARE\]
"MYPROGRAM"="MYPROGRAM2"
But that added a key to the \Software\ tree.
Thanks
.