cd\gestor\todasempresas\dlls
copy *.dll .. 

if EXIST %windir%\SysWOW64 goto Win64

:Win32
ECHO *** GESTOR EMISSOR NF-e v.2.0 ***
ECHO *** Copiando as DLLs ***
copy capicom.dll  %windir%\System32
copy msxml5.dll   %windir%\System32
copy msxml5r.dll  %windir%\System32
copy libeay32.dll %windir%\System32
copy midas.dll    %windir%\System32
copy ssleay32.dll %windir%\System32

rem copy capicom.dll  \Gestor\TodasEmpresas
rem copy msxml5.dll   \Gestor\TodasEmpresas
rem copy msxml5r.dll  \Gestor\TodasEmpresas
rem copy libeay32.dll \Gestor\TodasEmpresas
rem copy midas.dll    \Gestor\TodasEmpresas
rem copy ssleay32.dll \Gestor\TodasEmpresas
rem copy qtintf70.dll \Gestor\TodasEmpresas

rem copy capicom.dll  \Gestor\TodasEmpresas-Retaguarda
rem copy msxml5.dll   \Gestor\TodasEmpresas-Retaguarda
rem copy msxml5r.dll  \Gestor\TodasEmpresas-Retaguarda
rem copy libeay32.dll \Gestor\TodasEmpresas-Retaguarda
rem copy midas.dll    \Gestor\TodasEmpresas-Retaguarda
rem copy ssleay32.dll \Gestor\TodasEmpresas-Retaguarda
rem copy qtintf70.dll \Gestor\TodasEmpresas-Retaguarda


ECHO *** Registrando as DLLs ***
regsvr32 %windir%\System32\capicom.dll /s
regsvr32 %windir%\System32\msxml5.dll /s
regsvr32 %windir%\System32\msxml5r.dll /s
regsvr32 %windir%\System32\libeay32.dll /s
regsvr32 %windir%\System32\midas.dll /s
regsvr32 %windir%\System32\ssleay32.dll  /s
goto end

:Win64
rem if not EXIST %windir%\SysWOW64 goto end
ECHO *** FOCUS   NF-e   v.2.0 ***
ECHO *** Copiando as DLLs x64 ***
copy capicom.dll  %windir%\SysWOW64
copy msxml5.dll   %windir%\SysWOW64
copy msxml5r.dll  %windir%\SysWOW64
copy libeay32.dll %windir%\SysWOW64
copy midas.dll    %windir%\SysWOW64
ECHO *** Registrando as DLLs x64 ***
regsvr32 %windir%\SysWOW64\capicom.dll /s
regsvr32 %windir%\SysWOW64\msxml5.dll /s
regsvr32 %windir%\SysWOW64\libeay32.dll /s
regsvr32 %windir%\SysWOW64\midas.dll /s
regsvr32 %windir%\SysWOW64\ssleay32.dll  /s
goto end

:end
echo off
echo Se ocorrerem erros, clique com o botão da direita e clique em EXECUTAR COMO ADMINISTRADOR
echo .
echo .
echo .
pause
echo on
