 
%systemroot%\system32\cmd.exe /V:ON /C files\cct\bin\findmiktex.bat

call ttfsetenv.bat  
if  "%localtexmf%A" == "A" goto errorinst
if  "%texmf%A" == "A" goto  errorinst

  
echo localtexmf=%localtexmf%>CCT.log
echo texmf=%texmf%>>CCT.log

%systemroot%\system32\xcopy files\*.*   "%localtexmf%" /s/y
if exist ttfsetenv.bat move ttfsetenv.bat "%localtexmf%\cct\bin"
EnvRegTool +path "%localtexmf%\cct\bin"
path=%localtexmf%\cct\bin;%localtexmf%\miktex\bin;%path%

copy "%localtexmf%\cct\doc\cctdiag.eps"
call cct-updt.bat
del  cctdiag.eps


if exist CCTLaTeX.pdf move CCTLaTeX.pdf "%localtexmf%\cct\doc"
if exist README.pdf move README.pdf "%localtexmf%\cct\doc"
 
goto end

:errorinst
pause

:end