Computing.Net > Forums > Windows 95/98 > Deleting registry keys with .reg files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Deleting registry keys with .reg files

Reply to Message Icon

Name: W9x Manual Registry Edito
Date: January 7, 2000 at 08:23:24 Pacific
Comment:

How do you delete registry keys by using .reg files?
What is the correct syntax for doing this?
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Bob
Date: January 7, 2000 at 08:55:09 Pacific
Reply:

Use a tool called REGEDIT. It should be on your hard drive.


0

Response Number 2
Name: Rob
Date: January 7, 2000 at 10:44:58 Pacific
Reply:

Start, Run, type REGEDIT (In case you didn't know)


0

Response Number 3
Name: Lee M
Date: January 7, 2000 at 12:11:16 Pacific
Reply:

You cannot delete a key with a .reg file. You can only alter an existing key or add a new one. Delete your key directly from the Registry via RegEdit.


0

Response Number 4
Name: Just Another W9x Registry
Date: January 8, 2000 at 17:34:14 Pacific
Reply:

In case you didn't know, you can add, edit or delete your registry entries by using .inf files. It is also possible to copy files, among other tasks, but this is not discussed here.
This mode of registry editing is suitable for automated tasks such as installing/uninstalling software or clearing known groups of keys such as the Run history or Recent Documents history.
Try to understand and adapt the following example to your particular needs to get rid of your registry editing nightmares.
It is supposed that you know what you are doing, you are on your own on this, and have at least an idea of how the registry performs its tasks.
The example works as-is, but the explanation is incomplete on purpose to make you think twice before editing the registry this way.


But first some guidelines for the proper syntax:

root-key, sub-key, [value name]

The value name is optional and is denoted by the [] brackets.
The comma place holder shown above must be included in this line.
Note that if the sub-key or Value name contains spaces you need to use quotes.
Registry entries between quotes may be case sensitive.
The value name entry allows the definition of a particular entry to be removed from a sub-key.

The root-key is represented by one of the following abbreviations:
HKCR is short for HKEY_CLASSES_ROOT
HKCU is short for HKEY_CURRENT_USER
HKLM is short for HKEY_LOCAL_MACHINE
HKU is short for HKEY_USERS

The sub-key is the continuation of the path to the value to be changed, for example:
HKLM,Software\Microsoft\Windows\currentVersion\Fonts removes the Fonts Key and all of its contents.


; Example of .inf file, name it as you wish.
; Use the ';' character to add comments in your code.
; .inf files have lots of distinct options, this is only a brief working example.

;This example adds and deletes the same key

[Version]
Signature="$CHICAGO$"

[DefaultInstall]
AddReg = List_of_HKEYs_to_Add
DelReg = List_of_HKEYs_to_Delete

[List_of_HKEYs_to_Add]
HKLM,Software\DynamoSound\0001,mondoStereo,

[List_of_HKEYs_to_Delete]
HKLM,Software\DynamoSound\0001,mondoStereo,


; We hope this helps!!


0

Response Number 5
Name: NetVicious
Date: August 4, 2000 at 09:40:58 Pacific
Reply:

You could delete keys with Reg files using this:

Look at this example...

-----------------------------------
REGEDIT4

[-HKEY_CURRENT_USER\Network\Recent]
<- Remember a line in blank

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

With this text saved as a Reg file you will delete the last Network connections make in your computer...

This is the effect of the "-" that is before the key of the Registry... It deletes the said key and their children keys... ((It's Recursive))

Sorry for my bad english, I'm spanish...
If you want something about this, please write it in this forum and send me an e-mail, I don't read this forum, sorry!!!


0

Related Posts

See More



Response Number 6
Name: Ethan Isenberg
Date: November 10, 2000 at 12:35:34 Pacific
Reply:

You could delete keys with Reg files using this:
Look at this example...

-----------------------------------
REGEDIT4

[-HKEY_CURRENT_USER\Network\Recent]
<- Remember a line in blank

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

With this text saved as a Reg file you will delete the last Network connections make in your computer...

This is the effect of the "-" that is before the key of the Registry... It deletes the said key and their children keys... ((It's Recursive

How would I then delete a value within the key?

thanks,
Ethan


0

Response Number 7
Name: Janelle
Date: January 12, 2001 at 10:07:54 Pacific
Reply:

The examples where you place the minus in front of the command for .reg files will *not* work in 95. The inf examples work best for 95


0

Response Number 8
Name: Gurubob
Date: April 18, 2001 at 19:26:17 Pacific
Reply:

Prefixing a registry key with a minus to delete it is great an it works well. Does anyone know how to go about handling permissions and such? I tried saving a key from regedt32 but the format is binary...?


0

Response Number 9
Name: David Byrne
Date: April 23, 2001 at 17:23:19 Pacific
Reply:

You can also use the reg.exe utility that comes with NT4 resource kit. This webpage has the syntax:
http://www.swynk.com/trent/articles/REGSyn.asp
It works with 95 as well.


0

Response Number 10
Name: Datschge
Date: May 12, 2001 at 03:12:33 Pacific
Reply:

>The examples where you place the minus in front of the command for .reg files will *not* work in 95.<

My Win95b works just fine with it, maybe only earlier versions are affected...?


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: Deleting registry keys with .reg files

Deleting registry key with .reg file www.computing.net/answers/windows-95/deleting-registry-key-with-reg-file/50915.html

Write/Delete Registry Keys... www.computing.net/answers/windows-95/writedelete-registry-keys/135359.html

Add, edit or delete registry entries with .inf files www.computing.net/answers/windows-95/add-edit-or-delete-registry-entries-with-inf-files/18904.html