Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Registry Key by Command Line 1

Status
Not open for further replies.

MikeWarner

Programmer
Oct 7, 2004
7
US
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
 
Possibly:
reg delete "HKCU\Software\Mercury Interactive\QuickTest Professional" /va /f

 
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
 
reg delete "HKCU\Software\Mercury Interactive\QuickTest Professional" /v /f

 
reg /?

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

Doh!!
 
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.

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

Doh!!
 
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.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top