문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top