How to delete several keys from windows registry in batch

February 27, 2013 at 06:21:50
Specs: Windows 7
Hi All,
Recently I came across with a problem when I was trying to remove Sketchup from my machine.
After removing the software through the control panel it appears that some keys are still nested somewhere in the registry and this issue is preventing me to install a different version of sketchup.
I've used different registry cleaners without success.
I was wondering if someone can help me to write a code to remove all the keys which contain a certain string value (in this case sketchup). I found several examples on how to remove a specific key, but in my case I have several keys and I can't delete them one by one because it would take me ages.. any thoughts?

See More: How to delete several keys from windows registry in batch

Report •

February 27, 2013 at 12:06:46
This might find them for you, but you might need to do some further refinement on the results. f/e: if "sketchup" is contained in several sub-keys under one key, you could just delete the upper-level key.
@echo off & setlocal
for %%a in (HKCR HKCU HKLM HKU HKCC) do (
reg query %%a /s | find /i "sketchup" > keylist
also, there may be "back-references" into classes, f/e:
where you might also need to clear {abcd-efab-cdef}, I don't know.
sketchup did you a major disservice if they did not include a complete uninstaller, or better yet in this case, as most packages do, an installer that automatically overwrites or removes any/all traces to earlier versions that might interfere with operations. You might contact them to see if they can help with this, because I have a strong suspicion that this manual registry-hacking won't fix the problem.

Report •

March 1, 2013 at 01:59:14
Hi nbrane,

Thanks for your reply.
I'll try to be in contact with the sketchup developer.
As you said probably this script won't resolve my issue, but I will give it a go :)

Report •

Related Solutions

Ask Question