Wie stellt man eine IF-Abfrage für einen DWORD Wert eines Registryeintrags in einem Batch Skript?
Hallo,
ich will in einem Batch Skript eine IF-Abfrage für einen DWORD Wert eines Registrieintrags starten. Wie mache ich das?
ich will in einem Batch Skript eine IF-Abfrage für einen DWORD Wert eines Registrieintrags starten. Wie mache ich das?
reg query "HKLM\SOFTWARE\..." /v "Example"
if %Example%=="0x1" ... else ...
Please also mark the comments that contributed to the solution of the article
Content-Key: 305000
Url: https://administrator.de/contentid/305000
Printed on: April 18, 2024 at 01:04 o'clock
2 Comments
Latest comment
z.B. so
oder auch
Gruß skybird
reg query "HKEY_CURRENT_USER\Software\...." /v "Example" | findstr /ic:"0x1" >nul 2>&1 && (
echo OK
) || (
echo Nicht OK
)
for /f "tokens=3" %%a in ('reg query "HKEY_CURRENT_USER\Software\..." /v "Example" ^| findstr /ic:"Example"') do set "wert=%%a"
if "%wert%" == "0x1" .....