@echo OFF
setlocal

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT

if %OS%==32BIT set syswindir=%windir%\System32
if %OS%==64BIT set syswindir=%windir%\SysWOW64

regsvr32 /u %syswindir%\mscomctl.ocx
regsvr32 %syswindir%\mscomctl.ocx
