SET "RR2=%~dp0dunedynasty.exe"
reg query "%RR1%" /v "%RR2%"
returns
Code: Select all
W:\\Dune 2 - Remake\\dunedynasty.exe REG_SZ WINXPSP3
1 2 3 4 5 6
ECHO "%DUNE2dyn%"(WINXPSP3 is the string answer i need)
the problem with the TOKENS method i currently know is that getting the string which i need depends on the directory name, that is how many spaces are in there
***************************************************************************
another example - TOKENS=3 in this case
1>nul 2>nul reg query "HKCU\Control Panel\Desktop" /v "ScreenSaveActive"
FOR /F "TOKENS=3" %%%%V in ('reg query "HKCU\Control Panel\Desktop" /v "ScreenSaveActive"') DO (SET ScnSaverData=%%%%V)
is there a command or a way to get the string after "REG_SZ" or "REG_DWORD"?
aaa bbb ccc d e f 123 REG_DWORD x01
the answer is x01