@echo off :: This variable must be the path you copy WebkKitX from set SRC_PATH=%CD%\bin :: This variable must be the path you copy WebkitX to set DEST_PATH=C:\WebKitX\bin ::======================================================== :: Make sure WMIC is in the path set PATH=%SYSTEMROOT%\System32\wbem\;%PATH%; :: Find out if we are installing on 32-bit or 64-bit Windows. for /f %%a in ('wmic os get osarchitecture ^| find /i "bit"') do set "OS_ARCH=%%a" if "%OS_ARCH%"=="32-bit" goto :32bit if "%OS_ARCH%"=="64-bit" goto :64bit echo OS Architecture %OS_ARCH% is not supported! EXIT 1 ::======================================================== :32bit :: Use this line for 32-bit Windows and 32-bit ActiveX set REGISTER=%SYSTEMROOT%\System32\regsvr32.exe goto :INSTALL ::======================================================== :64bit :: Use this line for 64-bit Windows and 32-bit ActiveX set REGISTER=%SYSTEMROOT%\SysWow64\regsvr32.exe goto :INSTALL ::======================================================== :INSTALL :: Install Microsoft Visual C++ 2017 Redistributables %CD%\vc_redist.x86.exe /install /quiet /norestart : Copy WebKitX bin folder to destination xcopy %SRC_PATH%\*.* %DEST_PATH%\*.* /S /E /Y /I :: Register WebKitX %REGISTER% /s %DEST_PATH%\WebKitXCEF3.ocx