@echo off
if exist %windir%\SysWOW64 goto x64

XCopy /s /y WinCHM  "%SYSTEMDRIVE%\Program Files\Common Files\WinCHM\"  1>nul 2>nul
XCopy /s /y Hha.dll  "%SYSTEMDRIVE%\windows\system32\"   1>nul 2>nul
XCopy /s /y Itcc.dll "%SYSTEMDRIVE%\windows\system32\"  1>nul 2>nul
Regsvr32  /s "%SYSTEMDRIVE%\Program Files\Common Files\WinCHM\dhtmled.ocx"
Regsvr32  /s "%SYSTEMDRIVE%\Program Files\Common Files\WinCHM\triedit.dll"
Regsvr32  /s "%SYSTEMDRIVE%\windows\system32\Itcc.dll"
goto end

:x64
XCopy /s /y WinCHM  "%SYSTEMDRIVE%\Program Files (x86)\Common Files\WinCHM\"  1>nul 2>nul
XCopy /s /y Hha.dll  "%SYSTEMDRIVE%\windows\SysWOW64\"   1>nul 2>nul
XCopy /s /y Itcc.dll "%SYSTEMDRIVE%\windows\SysWOW64\"  1>nul 2>nul
Regsvr32  /s "%SYSTEMDRIVE%\Program Files (x86)\Common Files\WinCHM\dhtmled.ocx"
Regsvr32  /s "%SYSTEMDRIVE%\Program Files (x86)\Common Files\WinCHM\triedit.dll"
Regsvr32  /s "%SYSTEMDRIVE%\windows\SysWOW64\Itcc.dll"

:end
