JSI Tip 8984. How can I disable Browser Helper Objects when troubleshooting Internet Explorer strange behavior?

Jerold Schulman

January 26, 2005

2 Min Read
ITPro Today logo in a gray background | ITPro Today

Browser Helper Objects are Internet Explorer plug-ins that can change the behavior of Internet Explorer. If a malicious Browser Helper Object is installed, it can make Internet Explorer act strangely, or do significant damage.

While a search of the Internet will reveal many tools for removing Browser Helper Objects, you may not be able to stay connected long enough to find them.

I have scripted DisableHelperObjects.bat to disable, or enable, Browser Helper Objects on your computer.

The syntax for using DisableHelperObjects.bat is:

DisableHelperObjects D|E|L [ALL|ObjectNumber]

Where:

L              lists all Browser Helper Object along with their associated ObjectNumber.D ALL          disables all Browser Helper Objects.D ObjectNumber disables the ObjectNumber Browser Helper Object.E ALL          enables all Browser Helper Objects.E ObjectNumber enables the ObjectNumber Browser Helper Object.

NOTE: Before using DisableHelperObjects.bat, close all instances of Internet Explorer.

DisableHelperObjects.bat contains:

@echo offsetlocal ENABLEDELAYEDEXPANSIONif /i {%1}
{L} goto OK1if {%2}
{} goto errif /i {%1}
{D} goto OK1if /i {%1}
{E} goto OK1:err@echo Syntax: DisableHelperObjects D^|E^|L [ALL^|ObjectNumber]endlocalgoto :EOF:OK1set /a number=0set what=Nset action=%1if /i "%action%" EQU "L" goto OK2set what=%2if /i "%what%" EQU "ALL" goto OK2if "%what%" LSS "1" goto errif "%what%" GTR "9" goto errset /a number=10%what%%%10if "%what%" NEQ "%number%" goto err:OK2regedit /a "%TEMP%DisableHelperObjects.tm1" "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrenTVersionExplorerBrowser Helper Objects"@echo REGEDIT4>"%TEMP%DisableHelperObjects.tm2"@echo.>>"%TEMP%DisableHelperObjects.tm2"set /a cnt=0@echo [email protected] /f "Tokens=*" %%a in ('type "%TEMP%DisableHelperObjects.tm1"^|FIND "\{"') do ( set /a cnt=!cnt! + 1 set work=%%a set work=!work:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrenTVersionExplorerBrowser Helper Objects=! set work=!work:[=! set work=!work:]=! @echo !cnt! !work! @echo %%a>>"%TEMP%DisableHelperObjects.tm2" @echo.>>"%TEMP%DisableHelperObjects.tm2")@echo.>>"%TEMP%DisableHelperObjects.tm2"del /q "%TEMP%DisableHelperObjects.tm1if /i "%action%" EQU "L" goto finish@echo REGEDIT4>"%TEMP%DisableHelperObjects.tm1"@echo.>>"%TEMP%DisableHelperObjects.tm1"set OK=Nset /a cnt=0for /f "Tokens=*" %%a in ('type "%TEMP%DisableHelperObjects.tm2"^|FIND "\{"') do ( set /a cnt=!cnt! + 1 set work=%%a call :doit)if %number% NEQ 0 if "%OK%" EQU "N" @echo.&@echo Helper Object %number% not found.&goto afterregedit /s "%TEMP%DisableHelperObjects.tm1":afterregedit /a "%TEMP%DisableHelperObjects.tm1" "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrenTVersionExplorerBrowser Helper Objects"@echo.@echo [email protected] /a cnt=0for /f "Tokens=*" %%a in ('type "%TEMP%DisableHelperObjects.tm1"^|FIND "\{"') do ( set /a cnt=!cnt! + 1 set work=%%a set work=!work:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrenTVersionExplorerBrowser Helper Objects=! set work=!work:[=! set work=!work:]=! @echo !cnt! !work!)del /q "%TEMP%DisableHelperObjects.tm1:finishendlocalgoto :EOF:doitif /i "%action%" EQU "E" goto doiteif %number% EQU 0 goto doitdaif %number% NEQ %cnt% goto :EOFset OK=Y:doitdaset tst=%work%set tst=%tst:#NO#}=}%if "%tst%" NEQ "%work%" goto :EOFset del=%work%set del=%del:[=[-%@echo %del%>>"%TEMP%DisableHelperObjects.tm1"@echo.>>"%TEMP%DisableHelperObjects.tm1"set work=%work:}=#NO#}%:doitout@echo %work%>>"%TEMP%DisableHelperObjects.tm1"@echo.>>"%TEMP%DisableHelperObjects.tm1"goto :EOF:doiteif /i "%what%" EQU "ALL" goto doiteaif %number% NEQ %cnt% goto :EOFset OK=Y:doiteaset tst=%work%set tst=%tst:#NO#}=}%if "%tst%" EQU "%work%" goto :EOFset del=%work%set del=%del:[=[-%@echo %del%>>"%TEMP%DisableHelperObjects.tm1"@echo.>>"%TEMP%DisableHelperObjects.tm1"set work=%work:#NO#}=}%goto doitout



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like