×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Delete Registry Key by Command Line

Delete Registry Key by Command Line

Delete Registry Key by Command Line

(OP)
I am trying to delete a registry key from the command line.  The command runs correctly and will delete the key.  The problem is that I cannot force the command without a prompt being displayed.

here is my current command:
reg delete "HKCU\Software\Mercury Interactive\QuickTest Professional\" /va /f

The "/f" does not seem to be working.

Any ideas?

thanks,
Mike

RE: Delete Registry Key by Command Line

Possibly:
reg delete "HKCU\Software\Mercury Interactive\QuickTest Professional" /va /f

RE: Delete Registry Key by Command Line

(OP)
Thanks bcastner.

Removing the final '\' will delete all of the values under that key, but it will not delete the key or any of the subkeys.  (which is what I am trying to do)

On the bright side, it did not prompt me for deleting the key.

Mike

RE: Delete Registry Key by Command Line

reg delete "HKCU\Software\Mercury Interactive\QuickTest Professional" /v /f

RE: Delete Registry Key by Command Line

reg /?

gives you all kinds of options and the syntax to go along with it

Doh!!

RE: Delete Registry Key by Command Line

(OP)
I am sorry that I am not the expert user that you are Xavier2.  I did run the /? command but did not get a /v option that bcastner suggested, only a /ve and /va.

I will try to be more careful about the questions that I ask so that I don't take up too much of your precious time Xavier2.

RE: Delete Registry Key by Command Line

It was just a suggestion... didn't know it was such a sensitive issue...

Doh!!

RE: Delete Registry Key by Command Line

What I did a longtime ago was make a desktop shortcut with the following target line:

%Windir%\Help\ntcmds.chm

This places the entire XP version of Help for command line utilities right on my desktop.  I use it several times a week.  (I do a similar step for the XP Resource Kit Help file, and the Windows 2003 Resource Kit).  Recommended.

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close