在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
function TFrmmain.WriteAppNameToReg:Boolean; var reg:TRegistry; sPath,sAppName:String; Sver:string; lenver:Integer; begin Result:=True; reg:=TRegistry.Create; try reg.RootKey:=HKEY_LOCAL_MACHINE; sPath:='SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION'; if isWin64 then sPath:='SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION'; if reg.OpenKey(sPath,True) then begin sAppName:=ExtractFileName(Application.ExeName); Sver:=GetIEVersionStr; lenver:=StrToInt(leftstr(Sver, Pos('.',Sver)-1)); // if not reg.ValueExists(sAppName)then if lenver<=7 then reg.WriteInteger(sAppName,7000) else if lenver=8 then begin reg.WriteInteger(sAppName,8000) end else if lenver=9 then begin reg.WriteInteger(sAppName,9000) end else if lenver=10 then begin reg.WriteInteger(sAppName,10000) end else if lenver=11 then begin reg.WriteInteger(sAppName,11001) end; end; reg.CloseKey; finally FreeAndNil(reg); end; function TFrmmain.GetIEVersionStr: string; var Reg: TRegistry; // registry access object begin Result := ''; Reg := TRegistry.Create; try Reg.RootKey := Windows.HKEY_LOCAL_MACHINE; if Reg.OpenKeyReadOnly('Software\Microsoft\Internet Explorer') then begin //这儿新版本IE的取值位置不同所以要判断 function TFrmmain.IsWin64:Boolean; 参考了这儿 http://www.cnblogs.com/zhwl/p/3147832.html
参考 {
Updated: July 2012 This article describes feature controls with names that begin with the letters B or C. For links to other feature controls, see Feature Controls.
Binary Behavior SecurityMicrosoft Internet Explorer 6 for Windows XP Service Pack 2 (SP2). The FEATURE_BEHAVIORS allows Binary Behaviors to run more securely. When the feature is enabled, it can be set differently for each security zone by using the URL action flag URLACTION_BEHAVIOR_RUN. For more information, see About URL Security Zones. By default, this feature is enabled for Windows Internet Explorer and for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable file to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_BEHAVIORS contoso.exe = (DWORD) 00000000 The feature is enabled when the value is set to (DWORD) Browser EmulationWindows Internet Explorer 8 and later. The FEATURE_BROWSER_EMULATION feature defines the default emulation mode for Internet Explorer and supports the following values.
For more information, see Defining Document Compatibility. To control the value of this feature by using the registry, add the name of your executable file to the following setting and set the value to match the desired setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_BROWSER_EMULATION contoso.exe = (DWORD) 00009000 Child Window ClippingInternet Explorer 9. Internet Explorer 9 optimized the performance of window-drawing routines that involve clipping regions associated with child windows. This helped improve the performance of certain window drawing operations. However, certain applications hosting the WebBrowser Control rely on the previous behavior and do not function correctly when these optimizations are enabled. The FEATURE_ENABLE_CLIPCHILDREN_OPTIMIZATION feature can disable these optimizations. By default, this feature is enabled for Internet Explorer and for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable file to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_ENABLE_CLIPCHILDREN_OPTIMIZATION contoso.exe = (DWORD) 00000000 The feature is enabled when the value is set to (DWORD) Circular References in Script ManagementInternet Explorer 8 and later. By default, Internet Explorer reduces memory leaks caused by circular references between Internet Explorer and the Microsoft JScript engine, especially in scenarios where a webpage defines an expando and the page is refreshed. If a legacy application no longer functions with these changes, the FEATURE_MANAGE_SCRIPT_CIRCULAR_REFS feature can disable these improvements. By default, this feature is enabled for Internet Explorer and for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable file to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_MANAGE_SCRIPT_CIRCULAR_REFS contoso.exe = (DWORD) 00000000 The feature is enabled when the value is set to (DWORD)
Note Because this feature improves the stability of Internet Explorer, disabling this feature is strongly discouraged.
Clipboard Script ControlWhen enabled, the FEATURE_ENABLE_SCRIPT_PASTE_URLACTION_IF_PROMPT feature allows scripts control over the Clipboard, even when the URLACTION_SCRIPT_PASTE URL action is set to "Prompt." This allows applications hosting the WebBrowser Control to opt out of a specific security check that may be unnecessary for the content displayed by the application. If the content is fully trusted and cannot be modified by any third-party, it may be safe to enable this feature. However, such a design decision should include a full security assessment. For more information, see Threat Modeling. By default, this feature is disabled for Internet Explorer and enabled for applications hosting the WebBrowser Control. To enable this feature by using the registry, add the name of your executable file to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_ENABLE_SCRIPT_PASTE_URLACTION_IF_PROMPT contoso.exe = (DWORD) 00000001 The feature is enabled when the value is set to (DWORD) Cross Domain Capture EventThe FEATURE_BLOCK_SETCAPTURE_XDOMAIN feature prevents capture events from being propagated to elements in webpages hosted on domains different than the one hosting the page containing the element that triggered the capture event. By default, this feature is enabled for Internet Explorer 8 and for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable file to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_BLOCK_SETCAPTURE_XDOMAIN contoso.exe = (DWORD) 00000000 The feature is enabled when the value is set to (DWORD) Cross Domain RedirectionWhen enabled, the FEATURE_CROSS DOMAIN_REDIRECT_MITIGATION feature applies cross-domain security to support files loaded by a webpage, including images, JavaScript libraries, Cascading Style Sheets (CSS) files, Microsoft ActiveX controls, and other file-based resources.
Note For security reasons, this feature should not be changed.
By default, this feature is enabled for Internet Explorer 8 and for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_CROSS_DOMAIN_REDIRECT_MITIGATION contoso.exe = (DWORD) 00000000 The feature is enabled when the value is set to (DWORD)
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论