../Msgboard/Modding your system/Can I use a dos command to remove a registry entry?
starla - 12 Jun. 2005 - 18:47:
Can I use a dos command to remove a registry entry?
I like to start a program of mine with completely blank settings, and at the moment I have to physically remove its registry entry when I close the program. Is there a DOS command that I could write into a batch file to do this automatically?
Thanks for any help.
12 Jun. 2005 - 20:27
henrik
I do not know of any, but you can use dos commands to write text to a text file named text.reg. From dos, run the file and afterwards delete it.
echo Windows Registry Editor Version 5.00 > Settings.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Proggy] > Settings.reg
echo "Setting1"="BlaBlaBla" > Settings.reg
Start Settings.reg
Del Settings.reg
But it will ask the user if it is ok to install the registry settings...
12 Jun. 2005 - 21:41
beaker
You can remove entries within a *.reg file.
[-HKEY_LOCAL_MACHINE\SOFTWARE\Proggy]
Will remove the entire branch, while
[HKEY_LOCAL_MACHINE\SOFTWARE\Proggy]
-"SettingName"
will remove the setting. To bypass the "Are you sure" dialog, just use the following command:
regedit /s regfile.reg
HTH
13 Jun. 2005 - 17:53
undefined
Also, newer versions of Windows have the "reg delete" command:reg delete HKLM\Software\App
Please log-in to post.
You need to be logged in to post. To log-in, or to register an account go -
there.
Options
../Msgboard/Modding your system/Can I use a dos command to remove a registry entry?