@echo off :: IE_FIX.BAT created 20080222 by wmc, Iterate Pte Ltd :: This program sets IE Browser to Allow ActiveX Content from CDs and HardDisk. :: Does nothing if IE Local Machine Lockdown is not detected or registry :: cannot be modified, or if the registry already enables ActiveX Content. :: Change these presets to enable or disable checking of CD and HD settings. set unlock_CD=1 set unlock_HD=0 :: Initialize state flag to provide status on command line. set registry_modified=0 echo Checking if ActiveX content is permitted in IE Browser. :: check that Local Machine Lockdown enabled in IE browser settings reg query "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl" /s | findstr /i "FEATURE_LOCALMACHINE_LOCKDOWN" > nul if %ERRORLEVEL% geq 1 goto :end echo The IE Local Machine Lockdown feature was detected. :query_unlockCD if %unlock_CD% equ 0 goto :query_unlockHD :: check that ActiveX from CD is not disabled already (allow ActiveX = 1) reg query "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN" /s | findstr /i "Settings" > nul if %ERRORLEVEL% geq 1 goto :unlockCD reg query "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN\Settings" /v LOCALMACHINE_CD_UNLOCK | findstr /i "0x1" > nul if %ERRORLEVEL% equ 0 goto :query_unlockHD :unlockCD reg add "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN\Settings" /v LOCALMACHINE_CD_UNLOCK /t REG_DWORD /d 1 /f > nul if %ERRORLEVEL% geq 1 goto :error1 echo Modified registry to permit ActiveX from CD. set registry_modified=1 :query_unlockHD if %unlock_HD% equ 0 goto :end :: check that ActiveX from Local Drive is not disabled already (allow ActiveX = 0) reg query "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN" /v Iexplore.exe | findstr /i "0x0" > nul if %ERRORLEVEL% equ 0 goto :end :unlockHD reg add "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN" /v Iexplore.exe /t REG_DWORD /d 0 /f > nul if %ERRORLEVEL% geq 1 goto :error1 echo Modified registry to permit ActiveX from Local Drive. set registry_modified=1 goto :end :error1 echo Unable to update the registry. Browser settings are unchanged. :end echo Finished checking for ActiveX content permissions. if %registry_modified% equ 0 echo Registry was unchanged. set registry_modified= set unlock_CD= set unlock_HD= echo. exit