@echo off

if EXIST %windir%\SysWOW64\x64 goto Win64

:Win32
ECHO Copiando as DLLs
copy "C:\MC Software\capicom.dll" %windir%\System32
copy "C:\MC Software\msxml5.dll"  %windir%\System32
copy "C:\MC Software\msxml5r.dll" %windir%\System32
ECHO *** Registrando as DLLs ***
regsvr32 %windir%\System32\capicom.dll /s
regsvr32 %windir%\System32\msxml5.dll /s
goto end

:Win64
ECHO Copiando as DLLs x64
copy "C:\MC Software\capicom.dll" %windir%\SysWOW64
copy "C:\MC Software\msxml5.dll"  %windir%\SysWOW64
copy "C:\MC Software\msxml5r.dll" %windir%\SysWOW64
copy "C:\MC Software\myodbc*.*" %windir%\SysWOW64
ECHO *** Registrando as DLLs x64 ***
regsvr32 %windir%\SysWOW64\capicom.dll /s
regsvr32 %windir%\SysWOW64\msxml5.dll /s
goto end

:end

ECHO Registrando midas.dll
regsvr32 "C:\MC Software\midas.dll" /s

exit
