Regedit delete switch...

Well, is there any way to delete a complete branch with all it's values of the registry?, like

regedit /<this is the question> HKEY_CURRENT_USER\Software\whatever_branch

Thanks a lot: Xavier Serra, Ibv
xserraAsked:
Who is Participating?
 
WinDudeConnect With a Mentor Commented:
Here is how I have done it:

Suppose the registry entry that I want to delete is:
HKEY_LOCAL_MACHINE\SOFTWARE\MyApp

create an INF file:

--begin my.inf--
[version]
signature="$CHICAGO$"

[SectionName]
DelReg=DelSection

[DelSection]
HKLM,SOFTWARE/MyApp

--end my.inf--

Now, from the command prompt or script or program make this call:
rundll setupx.dll,InstallHinfSection SectionName 128 c:\my.inf
You must have the path to the INF file at the end.

That's it!

The command is:
rundll setupx.dll,InstallHinfSection <section> <code> <path-inf>
where <section> is the name of the section in the INF file that you are calling and <code> is:
128=do not reboot
129=reboot without a prompt
130=reboot with a prompt (yes/no)
131=setup determines if it needs a reboot without a prompt
132=setup determines if it needs a reboot with a prompt (yes/no)

Hope this helps :)
0
 
cmcgeeCommented:
I know this may not help you, but NT has a resource called REGDEL that allows you to do this.

I have browsed around and have not found any command line switches that do what you are looking for.

Good Luck,

Craig
0
 
xu092098Commented:
Select the item and choose edit/delete.
It works!
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
cmcgeeCommented:
I belive he is looking for a Command Line switch

Craig
0
 
xserraAuthor Commented:
I need to delete the keys non interactively, I use them in a script that launches an application.
0
 
xserraAuthor Commented:
That was really a good solution!
Thanks a lot.
0
All Courses

From novice to tech pro — start learning today.