Rob van der Woude's Scripting Pages

Solutions found in alt.msdos.batch

and alt.msdos.batch.nt

Remove registry entries in Windows 95

Also posted to alt.msdos.batch by Bill James, this message tells you how to remove Windows 95 registry entries with batch files, using RUNDLL.EXE and *.INF files.

You need an .inf file for this, which you can create and run from a batch
file.  There doesn't seem to be much clear information on .inf file
construction, but here are some notes I put together previously:

There are 2 different processes involved, depending on whether you want to
delete an entire key, or just delete a Value within a key.

To delete an entire key, you create an .inf file that looks like this.


For HKEY, substitute:


The command to process the .inf file is "C:\WINDOWS\rundll.exe
setupx.dll,InstallHinfSection DefaultInstall 132 Path\FileName.inf" (w/o
quotes).  You would echo each line from the batch file to create the .inf
file, run it, then delete the .inf file.  You must specify the full path to
the .inf file.

For example, a harmless little batch file which will remove the MRU List for
Wordpad (key will be recreated the next time you use WordPad).

   @echo off
   ::This batch files clears the most recently used list for WordPad.
   echo [Version] > %temp%\WpadMRU.inf
   echo Signature="$CHICAGO$"  >> %temp%\WpadMRU.inf
   echo [DefaultInstall] >> %temp%\WpadMRU.inf
   echo DelReg=DeleteMe >> %temp%\WpadMRU.inf
   echo [DeleteMe] >> %temp%\WpadMRU.inf
HKCU,"Software\Microsoft\Windows\CurrentVersion\Applets\WordPad\Recent File
List" >> %temp%\WpadMRU.inf
   C:\WINDOWS\rundll.exe setupx.dll,InstallHinfSection DefaultInstall 132
   del %temp%\WpadMRU.inf

Watch out for wrapping of the long lines.  The indentation is your clue.

To delete just a Value from a key, you use AddReg, with ",4," (no quotes).


All commas and quotes must be included - don't miss the comma after 4 at the

There is also some information on .inf files in this MS Knowledge Base

When learning/testing, make sure you have a good backup of system.dat and
user.dat (Windows Registry), and know how to restore those from DOS boot if
you screw up.

Bill James

Brandon wrote in message <01bed494$81c2d3f0$a65a0baa@3555nt>...
>Is there a way I can remove selected Windows 95 Registry keys from a batch
>I would like to create a batch file that will allow me to remove selected
>IE4 registry keys.  I know what keys I would like to delete, although
>creating a program for others to use would be nice.
>Thank You,

page last uploaded: 2015-08-24, 21:09