@echo off
cd /d "%~dp0"

rem 获取locale.txt第一行内容给变量locale_name
set /p locale_name=<"%~dp0locale.txt"

IF "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (IF EXIST "%SystemRoot%\SysWOW64\SeeyonActivexInstall.dll" (DEL /f /q "%SystemRoot%\SysWOW64\SeeyonActivexInstall.dll")) ELSE (IF EXIST "%SystemRoot%\System32\SeeyonActivexInstall.dll" (DEL /f /q "%SystemRoot%\System32\SeeyonActivexInstall.dll"))

IF "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (COPY SeeyonActivexInstall.dll /V /Y "%SystemRoot%\SysWOW64\SeeyonActivexInstall.dll") ELSE (COPY SeeyonActivexInstall.dll /V /Y "%SystemRoot%\System32\SeeyonActivexInstall.dll")

IF "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (REGSVR32 /s "%SystemRoot%\SysWOW64\SeeyonActivexInstall.dll") ELSE (REGSVR32 /s "%SystemRoot%\System32\SeeyonActivexInstall.dll")

echo.
REG IMPORT IE.reg
regsvr32  /s  scrrun.dll

IF EXIST A6\OfflineSetup.exe CD A6
IF EXIST G6\OfflineSetup.exe CD G6
IF EXIST A8\OfflineSetup.exe CD A8
start OfflineSetup.exe %locale_name%
