I am trying to extract the key value of a registry entry. I only want the key which I have been trying to concatenate using FOR /F
, however had no luck.
Eg: the command
REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s /f chrome
returns
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{157F97DF-A001-36FB-A90C-55949FA130CA}
DisplayName REG_SZ Google Chrome
End of search: 1 match(es) found.
All that I want from this result is 157F97DF-A001-36FB-A90C-55949FA130CA
How can I do this using FOR /F
or other similar methods?
Many thanks!!
You can try to split the lines using
{}
as delimiters