
@echo Copy files to system... >> CopyFilesToSystem.log

@echo off
if "%PROCESSOR_ARCHITECTURE%%PROCESSOR_ARCHITEW6432%" == "x86" GOTO x86

@echo 64bit system >> CopyFilesToSystem.log
@echo on >> CopyFilesToSystem.log
@echo copy to system32 >> CopyFilesToSystem.log
copy .\bin\x64\*.*  %systemroot%\system32\ >> CopyFilesToSystem.log

@echo on  >> CopyFilesToSystem.log
@echo copy to twain_32 >> CopyFilesToSystem.log
copy .\bin\twain32\*.*  %systemroot%\Twain_32\ >> CopyFilesToSystem.log

@echo on  >> CopyFilesToSystem.log
@echo copy to SysWow64 >> CopyFilesToSystem.log
copy .\bin\x86\*.*  %systemroot%\SysWow64\ >> CopyFilesToSystem.log

goto end

:x86

@echo 32bit system >> CopyFilesToSystem.log
@echo on >> CopyFilesToSystem.log

@echo Copy to twain_32 >> CopyFilesToSystem.log
copy .\bin\twain32\*.*  %systemroot%\Twain_32\ >> CopyFilesToSystem.log

@echo Copy to system32 >> CopyFilesToSystem.log
copy .\bin\x86\*.*  %systemroot%\system32\ >> CopyFilesToSystem.log


:end

@echo Copy files to system Finished >> CopyFilesToSystem.log

pause
