@echo.
@echo Be sure you're RUNNING THIS AS ADMINISTRATOR!
@echo.
@pause
@echo.
@echo.
@echo off


if exist "%WINDIR%\SysWOW64\" goto useSysWOW64

if exist "%WINDIR%\system32\SYSINFO.OCX" goto doNotCopySysinfo
@echo:
echo copying SYSINFO.OCX
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0SYSINFO.OCX" %WINDIR%\system32\SYSINFO.OCX
copy "%~dp0SYSINFO.oca" %WINDIR%\system32\SYSINFO.oca
:doNotCopySysinfo

rem pause

if exist "%WINDIR%\system32\RICHTX32.OCX" goto doNotCopyRICHTX32
@echo:
echo copying RICHTX32.OCX
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0RICHTX32.OCX" %WINDIR%\system32\RICHTX32.OCX
copy "%~dp0RICHTX32.oca" %WINDIR%\system32\RICHTX32.oca
:doNotCopyRICHTX32

rem pause

if exist "%WINDIR%\system32\mscomctl.ocx" goto doNotCopyMscomctl
@echo:
echo copying mscomctl.ocx
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0mscomctl.ocx" %WINDIR%\system32\mscomctl.ocx
copy "%~dp0mscomctl.oca" %WINDIR%\system32\mscomctl.oca
:doNotCopyMscomctl

rem pause

@echo off
if exist "%WINDIR%\system32\msstdfmt.dll" goto doNotCopyMsstdfmt
@echo:

echo copying msstdfmt.dll
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0msstdfmt.dll" %WINDIR%\system32\msstdfmt.dll
:doNotCopyMsstdfmt

rem pause

@echo off

"%WINDIR%\system32\regsvr32" "%WINDIR%\system32\SYSINFO.OCX"
"%WINDIR%\system32\regsvr32" "%WINDIR%\system32\RICHTX32.OCX"
"%WINDIR%\system32\regsvr32" "%WINDIR%\system32\mscomctl.ocx"
"%WINDIR%\system32\regsvr32" "%WINDIR%\system32\msstdfmt.dll"

goto exitNow




:useSysWOW64

rem if exist "%WINDIR%\SysWOW64\SYSINFO.OCX" goto doNotCopySysinfo_64
@echo:

rem pause

echo copying SYSINFO.OCX
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0SYSINFO.OCX" %WINDIR%\SysWOW64\SYSINFO.OCX
copy "%~dp0SYSINFO.oca" %WINDIR%\SysWOW64\SYSINFO.oca
:doNotCopySysinfo_64

rem pause

rem if exist "%WINDIR%\SysWOW64\RICHTX32.OCX" goto doNotCopyRICHTX32_64
@echo:

rem pause


echo copying RICHTX32.OCX
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0RICHTX32.OCX" %WINDIR%\SysWOW64\RICHTX32.OCX
copy "%~dp0RICHTX32.oca" %WINDIR%\SysWOW64\RICHTX32.oca
:doNotCopyRICHTX32_64

rem pause

rem if exist "%WINDIR%\SysWOW64\mscomctl.ocx" goto doNotCopyMscomctl_64
@echo:
rem pause

echo copying mscomctl.ocx
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0mscomctl.ocx" %WINDIR%\SysWOW64\mscomctl.ocx
copy "%~dp0mscomctl.oca" %WINDIR%\SysWOW64\mscomctl.oca
:doNotCopyMscomctl_64
rem pause

@echo off
rem if exist "%WINDIR%\SysWOW64\msstdfmt.dll" goto doNotCopyMsstdfmt_64

rem pause

@echo:
echo copying msstdfmt.dll
echo ^ (required for running LL_USB_Graphics)
copy "%~dp0msstdfmt.dll" %WINDIR%\SysWOW64\msstdfmt.dll
:doNotCopyMsstdfmt_64

"%WINDIR%\system32\regsvr32" "%WINDIR%\SysWOW64\SYSINFO.OCX"
"%WINDIR%\system32\regsvr32" "%WINDIR%\SysWOW64\RICHTX32.OCX"
"%WINDIR%\system32\regsvr32" "%WINDIR%\SysWOW64\mscomctl.ocx"
"%WINDIR%\system32\regsvr32" "%WINDIR%\SysWOW64\msstdfmt.dll"

rem pause

:exitNow

exit


