Extracting specific registry key from REG QUERY based on search string <p>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.</p> <p><strong>Eg: the command</strong></p> <p>REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s /f chrome</p> <p><strong>returns</strong></p> <p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{157F97DF-A001-36FB-A90C-55949FA130CA} DisplayName REG_SZ Google Chrome</p> <p>End of search: 1 match(es) found.</p> <hr> <p>All that I want from this result is <strong>157F97DF-A001-36FB-A90C-55949FA130CA</strong></p> <p>How can I do this using FOR /F or other similar methods?</p> <p>Many thanks!!</p>