I\'m trying to make a .bat toggler for certain Explorer settings. To do this I need the batch file to query the Registry key\'s data and then set the key accordingly. For ex
The Answer from Dennis is correct, but I thought id paste the whole batch file so you can see it all working.
REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" | Find "0x0"
IF %ERRORLEVEL% == 1 goto turnoff
If %ERRORLEVEL% == 0 goto turnon
goto end
:turnon
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v
HideFileExt /t REG_DWORD /f /D 1
goto end
:turnoff
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v
HideFileExt /t REG_DWORD /f /D 0
goto end
:end
@exit