I need to read a data from registry, add 1 to it and then rewrite the data back in registry
FOR /f "tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Looptest" /v "subcounter"') do set "subcounter=%%b" if %subcounter% EQU 6 ( set /a counter=%counter%+1 echo increasing value for counter %counter% >> abc.log reg add HKLM\Software\Looptest /f /v counter /t REG_SZ /d %counter% pause ) But,the problem in this code is that, it does not increase the data of COUNTER. Any explanation ?
Thanks !
/anot set\a