@echo OFF
set CERTMGR="%~dp0%certmgr.exe"
set CERTFILE="%~dp0%StlCert.spc"
set REGFILE="%~dp0%SentelicTestReg.reg"

rem %CERTMGR% -add %CERTFILE% -s -r localMachine root
%CERTMGR% -add %CERTFILE% -c -s -r localMachine trustedpublisher
echo The testsigning certificate has been installed. 

ver | find "6.0" > nul
if %ERRORLEVEL% == 0 goto ENABLE_TEST_SIGNING
goto END

:ENABLE_TEST_SIGNING
REM %WINDIR%\System32\bcdedit.exe /set testsigning ON
REM %WINDIR%\Sysnative\bcdedit.exe /set testsigning ON
echo The feature of testsigning has been turned on. 
echo Before you install the test driver, you have to reboot system first.
goto END

:END
regedit /s %REGFILE%
echo on
REM pause
