Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
How do I use reg files to add keys and/or values to the registry?
How do I use reg files to remove keys and/or values from the registry?
Every time I try, I double-click the reg file, I get a message saying it worked, but no changes have taken place to the registry.
Thanks in advance to all the great posters on this board.

Once you have started the Regedit you will notice that on the left side there is a tree with folders, and on the right the contents (values) of the currently selected folder.
Like Windows explorer, to expand a certain branch (see the structure of the registry section), click on the plus sign [+] to the left of any folder, or just double-click on the folder. To display the contents of a key (folder), just click the desired key, and look at the values listed on the right side. You can add a new key or value by selecting New from the Edit menu, or by right-clicking your mouse. And you can rename any value and almost any key with the same method used to rename files; right-click on an object and click rename, or click on it twice (slowly), or just press F2 on the keyboard. Lastly, you can delete a key or value by clicking on it, and pressing Delete on the keyboard, or by right-clicking on it, and choosing Delete.
Note: it is always a good idea to backup your registry before making any changes to it. It can be intimidating to a new user, and there is always the possibility of changing or deleting a critical setting causing you to have to reinstall the whole operating system. It's much better to be safe than sorry!
Very good registry tutorial HERE

he knows more that I do, but I just Right click on the file, Left click on Register. seems to work. my host file gets updated that way.

Hi Hap Rhodehamel, broni, sonnysandiego, hi everyone,Below's a reg file to create (here restore) the "Open with..." function that some malware destroy:
-----
REGEDIT4[HKEY_CLASSES_ROOT\Unknown\shell\openas\command]
@="c:\\windows\\rundll32.exe shell32.dll,OpenAs_RunDLL %1 %2"-----
As you can guess it, you have to create a text file with, say, Notepad:
-> REGEDIT4 defines the format of the file (there's another format for 2000 and XP)
-> [HKEY_CLASSES_ROOT\Unknown\shell\openas\command] this line adds each level of the tree if it doesn't exist: Unknown, shell, openas, command
-> @="c:\\windows\\rundll32.exe shell32.dll,OpenAs_RunDLL %1 %2" this line creates a value (@ standing for (Default) ie no value) and its data (here string data).
Note the empty lines between keys and also at the end of the file.To change data, it's exactly the same!
To delete a key and all of the Subkeys, Values and Data attached:
-> [-HKEY_CLASSES_ROOT\Unknown] this line deletes the Subkeys Unknown, shell, openas and command and any Value and Data
(just a dash at the beginning of the line!)
(of course, the .reg file also contains the REGEDIT4 header and blank lines we talked about above).To delete a Value and Data attached:
-> [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
-> "AutoConfigURL"=-
(a line with the key; another line with the Value followed by equal then a dash)
(of course, the .reg file also contains the REGEDIT4 header and blank lines we taled about above).HTH
Have a good day,
Gérard from Paris, France

Thanks all,
But still, when I double-click the reg file, I get a message saying the changes were incorporated, but when I check the registry, nothing's changed.

Hap
Are you talking about some exterior "xxxx.reg" file, which you try to implement into your registry?
If so, maybe there is an error in that file. Could you post that file? What kind of changes are you trying to achieve?

Try deleting all your regfiles and try to re-install them
If u dont know about reg files you should stay out

Thanks broni,
Here's my exterior reg file. Just playing around, but gaining experience, and becoming more knowledgable about Windows.
-----------------------
REGEDIT4[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar]
"BrandBitmap"="C:\My Documents\Hap's Area\downloads\throbber\t1.bmp"
"SmBrandBitmap"="C:\My Documents\Hap's Area\downloads\throbber\t2.bmp"
"BigBitmap"="C:\My Documents\Hap's Area\downloads\throbber\t3.bmp"
"SmallBitmap"="C:\My Documents\Hap's Area\downloads\throbber\t4.bmp"
-------------------------PS - Joe, what reg files are you talking about?

Hap
I hope, someone with better knowledge of reg files will chip in, but your file doesn't look correct to me.
For instance "names" like "BrandBitmap" should have "values", not path assigned.
Paths start with @ = whatever path, and a path should be written with double backslashes, instead of single ones.

Ensure that the last line is followed by a carriage return.
Position the cursor at the end of the last line, and hit ENTER.

Ah WhitPhil,
I had great hope in your suggestion (it's arcane enough to be a Windows solution!), but alas, no dice - my reg file still doesn't get incorporated into the registry (even though a message box says it has).

Hi Hap Rhodehamel, broni, sonnysandiego, Joe, WhitPhil, hi everyone,Is only this .reg not working or any .reg?
If no .reg file can be merged, then think of a possible virus damage and run REGfile.inf
Have a good day,
Gérard from Paris, France

... just a tid bit, even if your .reg file has an error in it you will still get that message which says it has been entered. Confusing, but if it can't make sense of it then it is totally ignored, despite the message.
So any error could cause this. Lack of that final Return (as already mentioned) is a common error with .reg files.
Note, you don't need a Return on a batch (.bat) file - just in case you ever go that way. I have known it cause minor problems.
On the general point that Joe made, well the trick is to know how to back up and restore your registry before you start. It is a good way to learn if you are brave enough and "really want to". It's exactly what I did after I first formatted this machine on 12th Nov 1999. I am still on the same Windows load and it is very reliable.
I wonder how Joe learned.Derek

Gérard,
I think my registry's fine; I run anti-virus, HiJackThis, AdAware, SpyBot, etc. and think my system's clean (although I got MiMail.I (the one with the counterfit PayPal notice) the day it came out before my anti-virus updated for it - but it cleaned easily (I think!), and no damage was done).
I don't have many other reg files, and don't feel like using them until I'm more confident at reg edits (feels kind'a dangerous to be mucking around in there, know what I mean?).
I am able to do direct edits and achieve the results I want with regedit, but it's cumbersome, and I wanted the convienence of *.reg files.
And they don't work!?!
I may try another reg file per your suggestion, thanks, but now I'm out'a here for a while.
Thanks to everybody, this is a great board!

Question,
In my .reg file to add values to an existant key: Do I need to include the values that are already there, or just have the values I'm adding?
Hap

Hi Hap, hi everyone,>In my .reg file to add values to an
>existant key: Do I need to include the
>values that are already there, or just have
>the values I'm adding?
... only the value you're adding.Have a good day,
Gérard from Paris, France

Hi Hap, hi everyone,To be sure you are not having problems with .reg file updates, I suggest an easy example:
Create a .reg file to change your IE start page
-----
REGEDIT4[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Start Page"="http://computing.net"-----
Copy and paste the 5 above lines (a single line from [ to ]) into Notepad (including the blank line at the end), save the file to IEStartP.reg
Double click
Start IE
CheckPost back,
Have a good day,
Gérard from Paris, France

The following should work:
---
REGEDIT4[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar]
"BrandBitmap"="C:\\My Documents\\Hap's Area\\downloads\\throbber\\t1.bmp"
"SmBrandBitmap"="C:\\My Documents\\Hap's Area\\downloads\\throbber\\t2.bmp"
"BigBitmap"="C:\\My Documents\\Hap's Area\\downloads\\throbber\\t3.bmp"
"SmallBitmap"="C:\\My Documents\\Hap's Area\\downloads\\throbber\\t4.bmp"-

Double success!!
Thanks Gérard,
That .reg worked (as of course it must, it came from Gérard!) which proved nothing fundamentally wrong with system (just me).Then broni and WhitPhil set me straight on the need for double backslashes in the path name (I wonder if I need DOS (8 character) names in the path - I tested it with an assigment to the root???).
All fixed here! Thanks everybody

I expect you know this already but if you export from the registry this can be a useful facility in terms of regfile writing.
It will give you the format for whatever you exported, including the double \\ where appropriate.
Glad you got it working thanks to our two "kings", WhitPhil & Gérard.
Derek

Derek said,
>Glad you got it working thanks to our
>two "kings", WhitPhil & Gérard.
... "three" kings, include Derek.Hap

Hi Hap, hi everyone,Good thread! everyone worked fine!
From November 22, 2003 at 22:32:22 Pacific
to November 23, 2003 at 18:44:55 Pacific... 20 hours 12 minutes! We can do better!
... but with Rugby World Championship in Australia, celebrations for Rubgy championship victory in England, G.W.Bush's visit to England, Federation Cup victory for the French female team in tennis, etc. didn't help solve quickly the problem! ;-)We can do better next time! c'mon guys!
Have a good day,
Gérard from Paris, France

Frenchie
You didn't say a word about football (called soccer on this side of a big pond)...LOL...My sport number 1!

Hi broni, hi everyone,>You didn't say a word about football
I won't speak about soccer any more on Computing.Net!!! ;-) let me tell you why!About one year ago, someone on this forum, told me he was sure I was a girl... because soccer was just for girls! :-(
Have a good day,
Gérard from Paris, France

Frenchie
Even in America, it started to be guys sport...
Originally, I came from Poland, so I'm watching these guys here, concerning football/soccer...LOL

![]() |
Slow or Stopped Internet ...
|
Kazaa Lite K++ Problems
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |