I'm writing a batch file that executes certain exes in a specified folder. The fact is that the directory of these files is not always the same so I need to read the registry key to set the correct path in a variable. I'm doing this with
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\SOMETHING" /v "Path exe"
And I get this output:
Path exe REG_SZ C:\Program Files (x86)\PROGRAM FOLDER
Is there any way to return only C:\Program Files (x86)\PROGRAM FOLDER without Path exe and REG_SZ?
Thanks in advance!