@echo off if exist %windir%\sysWOW64\ ( goto 64bit ) ELSE ( goto 32bit ) :32bit echo --- 32bit Windows detected --- echo. if exist %windir%\system32\mswinsck.ocx ( echo --- MSWINSCK.OCX located --- echo. echo Unregistering MSWINSCK.OCX regsvr32 /u /s %windir%\system32\mswinsck.ocx if NOT errorlevel 0 ( echo There was a problem Unregistering MSWINSCK.OCX goto end ) else ( echo MSWINSCK.OCX Unregistered Successfully! echo. ) echo Registering MSWINSCK.OCX regsvr32 /s %windir%\system32\mswinsck.ocx if NOT errorlevel 0 ( echo There was a problem registering MSWINSCK.OCX goto end ) else ( echo MSWINSCK.OCX Registered Successfully! echo. ) ) else ( echo *** MSWINSCK.OCX MISSING! *** goto end ) if exist %windir%\system32\msinet.ocx ( echo --- MSINET.OCX located --- echo. echo Unregistering MSINET.OCX regsvr32 /u /s %windir%\system32\MSINET.ocx if NOT errorlevel 0 ( echo There was a problem Unregistering MSINET.OCX goto end ) else ( echo MSINET.OCX Unregistered Successfully! echo. ) echo Registering MSINET.OCX regsvr32 /s %windir%\system32\MSINET.ocx if NOT errorlevel 0 ( echo There was a problem registering MSINET.OCX goto end ) else ( echo MSINET.OCX Registered Successfully! echo. ) ) else ( echo *** MSINET.OCX MISSING! *** goto end ) if exist %windir%\system32\MSCOMCTL.ocx ( echo --- MSCOMCTL.OCX located --- echo. echo Unregistering MSCOMCTL.OCX regsvr32 /u /s %windir%\system32\MSCOMCTL.ocx if NOT errorlevel 0 ( echo There was a problem Unregistering MSCOMCTL.OCX goto end ) else ( echo MSCOMCTL.OCX Unregistered Successfully! echo. ) echo Registering MSCOMCTL.OCX regsvr32 /s %windir%\system32\MSCOMCTL.ocx if NOT errorlevel 0 ( echo There was a problem registering MSCOMCTL.OCX goto end ) else ( echo MSCOMCTL.OCX Registered Successfully! echo. ) ) else ( echo *** MSCOMCTL.OCX MISSING! *** goto end ) if exist %windir%\system32\COMDLG32.OCX ( echo --- COMDLG32.OCX located --- echo. echo Unregistering COMDLG32.OCX regsvr32 /u /s %windir%\system32\COMDLG32.OCX if NOT errorlevel 0 ( echo There was a problem Unregistering COMDLG32.OCX goto end ) else ( echo COMDLG32.OCX Unregistered Successfully! echo. ) echo Registering COMDLG32.OCX regsvr32 /s %windir%\system32\COMDLG32.OCX if NOT errorlevel 0 ( echo There was a problem registering COMDLG32.OCX goto end ) else ( echo COMDLG32.OCX Registered Successfully! echo. ) ) else ( echo *** COMDLG32.OCX MISSING! *** goto end ) goto end :64bit echo --- 64bit Windows detected --- echo. if exist %windir%\syswow64\mswinsck.ocx ( echo --- MSWINSCK.OCX located --- echo. echo Unregistering MSWINSCK.OCX regsvr32 /u /s %windir%\syswow64\mswinsck.ocx if NOT errorlevel 0 ( echo There was a problem Unregistering MSWINSCK.OCX goto end ) else ( echo MSWINSCK.OCX Unregistered Successfully! echo. ) echo Registering MSWINSCK.OCX regsvr32 /s %windir%\syswow64\mswinsck.ocx if NOT errorlevel 0 ( echo There was a problem registering MSWINSCK.OCX goto end ) else ( echo MSWINSCK.OCX Registered Successfully! echo. ) ) else ( echo *** MSWINSCK.OCX MISSING! *** goto end ) if exist %windir%\syswow64\msinet.ocx ( echo --- MSINET.OCX located --- echo. echo Unregistering MSINET.OCX regsvr32 /u /s %windir%\syswow64\MSINET.ocx if NOT errorlevel 0 ( echo There was a problem Unregistering MSINET.OCX goto end ) else ( echo MSINET.OCX Unregistered Successfully! echo. ) echo Registering MSINET.OCX regsvr32 /s %windir%\syswow64\MSINET.ocx if NOT errorlevel 0 ( echo There was a problem registering MSINET.OCX goto end ) else ( echo MSINET.OCX Registered Successfully! echo. ) ) else ( echo *** MSINET.OCX MISSING! *** goto end ) if exist %windir%\syswow64\MSCOMCTL.ocx ( echo --- MSCOMCTL.OCX located --- echo. echo Unregistering MSCOMCTL.OCX regsvr32 /u /s %windir%\syswow64\MSCOMCTL.ocx if NOT errorlevel 0 ( echo There was a problem Unregistering MSCOMCTL.OCX goto end ) else ( echo MSCOMCTL.OCX Unregistered Successfully! echo. ) echo Registering MSCOMCTL.OCX regsvr32 /s %windir%\syswow64\MSCOMCTL.ocx if NOT errorlevel 0 ( echo There was a problem registering MSCOMCTL.OCX goto end ) else ( echo MSCOMCTL.OCX Registered Successfully! echo. ) ) else ( echo *** MSCOMCTL.OCX MISSING! *** goto end ) if exist %windir%\syswow64\COMDLG32.OCX ( echo --- COMDLG32.OCX located --- echo. echo Unregistering COMDLG32.OCX regsvr32 /u /s %windir%\syswow64\COMDLG32.OCX if NOT errorlevel 0 ( echo There was a problem Unregistering COMDLG32.OCX goto end ) else ( echo COMDLG32.OCX Unregistered Successfully! echo. ) echo Registering COMDLG32.OCX regsvr32 /s %windir%\syswow64\COMDLG32.OCX if NOT errorlevel 0 ( echo There was a problem registering COMDLG32.OCX goto end ) else ( echo COMDLG32.OCX Registered Successfully! echo. ) ) else ( echo *** COMDLG32.OCX MISSING! *** goto end ) :end pause