parsing reg query result is a pain. Here's how you can do it :
for /f "tokens=2,*" %%a in ('reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v "Hidden" ^| findstr Hidden') do set hiddenvalue=%%b
Question
I'm writing a batch file and I need to read the values Hidden and Showsuperhidden in the registry, and put them into variables i guess. I have this so far:
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced/vHidden
I'm not sure how all this works but I'm reading up on it as well.
Solution
parsing reg query result is a pain. Here's how you can do it :
for /f "tokens=2,*" %%a in ('reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v "Hidden" ^| findstr Hidden') do set hiddenvalue=%%b