透過登錄檔來修改IE安全設定

doudoudon0發表於2008-09-04

系統環境:Windows 2003 sp1

IE版本:IE 6.0

HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones下

安全級別currentlevel值:0安全級為自定義,12000安全級為高,11000安全級為

中,10500安全級為中低,10000安全級為低;

0:我的電腦

1:本地 Intranet

2:可信站點

3:Internet

4:受限站點

ActiveX控制元件和外掛的設定,依次為:1405(301),1201(301),1004(301),1001(301),1200(65536,(301));0為啟用,3為禁用,1為提示。

1001 下載已簽名的 ActiveX 控制元件
1004 下載未簽名的 ActiveX 控制元件
1200 執行 ActiveX 控制元件和外掛
1201 對沒有標記為安全的 ActiveX 控制元件進行初始化和指令碼執行
1405 對標記為可安全執行指令碼的 ActiveX 控制元件執行指令碼
2201 ActiveX 控制元件自動提示

修改IE安全設定(安裝、執行未簽名的ActiveX控制元件):
reg add "HKLMSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3" /v 1004 /t REG_DWORD /d 0 /f
reg add "HKLMSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3" /v 1200 /t REG_DWORD /d 0 /f

編寫.inf檔案修改:

[Version]
Signature=$Chicago$
AdvancedINF=2.5

[DefaultInstall]
RequiredEngine=SetupAPI,"Fatal Error - missing setupapi.dll"
CustomDestination=CustInstDestSection
AddReg=AddReg.Hkcu,AddReg.Hklm

[IeakInstall.Hkcu]
RequiredEngine=SetupAPI,"Fatal Error - missing setupapi.dll"
CustomDestination=CustInstDestSection
AddReg=AddReg.Hkcu

[IeakInstall.Hklm]
RequiredEngine=SetupAPI,"Fatal Error - missing setupapi.dll"
CustomDestination=CustInstDestSection
AddReg=AddReg.Hklm

[CustInstDestSection]
49000,49001,49002,49003=ProgramFilesDir,21
49100,49101,49102,49103=IEDir,21

[ProgramFilesDir]
HKLM,"SOFTWAREMicrosoftWindowsCurrentVersion","ProgramFilesDir",,"%24%Program Files"

[IEDir]
HKLM,"SOFTWAREMicrosoftWindowsCurrentVersionApp Pathsiexplore.exe","Path",,"%49001%Internet Explorer"

[AddReg.Hklm]
HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones",1004,0x10001,00,00,00,00
HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones",1200,0x10001,00,00,00,00

HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones1",1004,0x10001,03,00,00,00
HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones1",1200,0x10001,00,00,00,00

HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2",1004,0x10001,01,00,00,00
HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2",1200,0x10001,00,00,00,00

HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3",1004,0x10001,00,00,00,00
HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3",1200,0x10001,00,00,00,00

HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones4",1004,0x10001,03,00,00,00
HKLM,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones4",1200,0x10001,03,00,00,00

[AddReg.Hkcu]
HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones",1004,0x10001,00,00,00,00
HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones",1200,0x10001,00,00,00,00

HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones1",1004,0x10001,03,00,00,00
HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones1",1200,0x10001,00,00,00,00

HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2",1200,0x10001,00,00,00,00

HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3",1004,0x10001,00,00,00,00
HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones3",1200,0x10001,00,00,00,00

HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones4",1004,0x10001,03,00,00,00
HKCU,"SoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones4",1200,0x10001,03,00,00,00

儲存為.inf檔案後點選右鍵-安裝即可。

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12043693/viewspace-1010125/,如需轉載,請註明出處,否則將追究法律責任。

相關文章