@echo off
setlocal
echo ************
echo cert setup starting
echo ************
set PFX_PASSWORD=111111
set SERVER_NAME=WCFQuickStartServer
set STS_NAME=WCFSecureTokenService
set ROOT_NAME=WCFQuickstartRoot
REM cleans up certs from previous runs.
call deleteAll.bat
REM Import server certificates on Windows 2003 - certutil is only on Windows 2003
echo ************
echo Server cert setup starting
echo Installing %SERVER_NAME% certificate into the LocalMachine/My store
echo ************
echo Importing root.pfx to LocalMachine/My store ...
echo ************
certutil -importpfx -p %PFX_PASSWORD% root.pfx
echo Importing sts.pfx to LocalMachine/My store ...
echo ************
certutil -importpfx -p %PFX_PASSWORD% sts.pfx
echo ************
echo copying server cert to CurrentUser store
echo ************
certmgr.exe -add -r LocalMachine -s My -c -n %ROOT_NAME% -r LocalMachine -s Root
certmgr.exe -add -r LocalMachine -s My -c -n %STS_NAME% -r CurrentUser -s My
certmgr.exe -add service.cer -r CurrentUser -s My
pause
GOTO :EOF
:end