Delete registry keys that begins with, search pattern

I am reading manual that i should got to HKEY_CLASSES_ROOT and delete all keys that begins with:
ORAMMCPMON10
ORCLSSO.
source: https://docs.oracle.com/html/B13804_02/deinstall.htm

There are not exact keys listed, just only the starting pattern.

There must be a way to automatize the key search and deleting based on a specified search pattern.

Additional libraries are required:

Single pattern search:
This code will actually only list full key names based on search pattern.
If you really want to delete then just replace echo %%f with reg delete "%%f" /f

Substitute \ with \\ and
. with \. is really needed to convert keys like
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.3g to
HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\\.3g
This is needed for grep to understand the pattern.

grep -i means not case sensitive.

.* at the end in search pattern means that this may not be the end of pattern. There can be anything farther.

No comments: