Solved

Regedit delete switch...

Posted on 1998-10-20
6
247 Views
Last Modified: 2013-12-16
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
0
Comment
Question by:xserra
6 Comments
 
LVL 7

Expert Comment

by:cmcgee
ID: 1758833
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
 

Expert Comment

by:xu092098
ID: 1758834
Select the item and choose edit/delete.
It works!
0
 
LVL 7

Expert Comment

by:cmcgee
ID: 1758835
I belive he is looking for a Command Line switch

Craig
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:xserra
ID: 1758836
I need to delete the keys non interactively, I use them in a script that launches an application.
0
 
LVL 1

Accepted Solution

by:
WinDude earned 200 total points
ID: 1758837
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
 

Author Comment

by:xserra
ID: 1758838
That was really a good solution!
Thanks a lot.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Batch file to convert a xlsx file to csv 5 99
Recycle bin software for network mapped drives? 8 31
Free OST to PST converter 8 59
Windows Password recovery 7 35
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
An article on effective troubleshooting
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question