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

Regsvr32 /u /s "%SYSTEMDRIVE%\Program Files\Common Files\WinCHM\dhtmled.ocx"
Regsvr32 /u /s "%SYSTEMDRIVE%\Program Files\Common Files\WinCHM\triedit.dll"
Regsvr32 /u /s "%SYSTEMDRIVE%\windows\system32\Itcc.dll"
rd /s /q  "%SYSTEMDRIVE%\Program Files\Common Files\WinCHM"
del /f /q  "%SYSTEMDRIVE%\windows\system32\Hha.dll"
del /f /q  "%SYSTEMDRIVE%\windows\system32\Itcc.dll"
goto end

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

:end
