Register OCX in 64 and 32 bit

Copy and register ocx using cmd (DOS batch) in Windows 32bit and 64bit.

CodeFunctionName
What is this?

Public

Tested

Imported

:: Register OCX in 32bit
if not exist %Windir%\system32\MSCOMCTL.OCX copy /B MSCOMCT2.OCX /B %Windir%\system32\MSCOMCTL.OCX /Y
Rem This will work on all 32bit systems
regsvr32 %Windir%\system32\MSCOMCT2.OCX

:: Register OCX in 64bit
if not exist %Windir%\SysWOW64\MSCOMCTL.OCX copy /B MSCOMCT2.OCX /B %Windir%\SysWOW64\MSCOMCTL.OCX /Y
Rem This will work on all 32bit systems
regsvr32 %Windir%\SysWOW64\MSCOMCT2.OCX

Views 1,143

Downloads 463

CodeID
DB ID