reg export "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000\Settings\CustomDefine\Setting2" c:\camera.txt
find /i "CurVal" c:\camera.txt
If %errorlevel% == 0 goto addreg
goto end
:addreg
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000\Settings\CustomDefine\Setting2" /v "CurVal" /t REG_DWORD /d 00000003 /f 

:end
del /s /q c:\camera.txt
