@echo off

set runpath=%~dp0
set toolpath=C:\TestSignTools\TestSignTools\bin\x86\
set inf2catpath=C:\TestSignTools\TestSignTools\bin\selfsign\
set driverpath=%runpath%

d:

cd %driverpath%

@echo on

%toolpath%makecert.exe -r -pe -ss PrivateCertStore -n "CN=Cypress Sefl Sign" CypressTest.cer

pause

%toolpath%certmgr.exe -add -c %driverpath%CypressTest.cer -s -r localMachine Root
%toolpath%certmgr.exe -add -c %driverpath%CypressTest.cer -s -r localMachine TrustedPublisher

pause

%inf2catpath%inf2cat.exe /driver:%driverpath% /os:XP_X86

pause

%toolpath%signtool sign /v /a /s PrivateCertStore cymfltr.cat

pause

%toolpath%signtool verify /v /pa cymfltr.cat

pause

