Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 8937

Dynamically search and delete multiple registry entries(both key and value) by batch script

$
0
0

I have uninstalled a recent game called "Wolfenstein 2009", but somehow I had to do it manually.

I was able to delete files very easily, but here comes the tricky part.

I have following command to query the Windows 7 64Bit OS Registry for getting all entries having "Wolf" in their key/value:

REG Query HKLM\Software /F "Wolf" /S

Now I want to delete all these entries either by for loop or a direct shortest command which can delete specific found multiple entries in shortest time.

I tried the following command but how to substitute variables in for loop is mystery as I don't do much batch scripting:

for /F "tokens=1,*" %%a in ('REG Query HKLM\Software /F "Wolf" /S') do (REG DELETE "%KEY%" /v %%a /f)

Can anyone help figuring this out ?


Viewing all articles
Browse latest Browse all 8937

Trending Articles