How to disable “ActiveX Control May Be Unsafe” popup

落爺英雄遲暮 提交于 2020-06-09 11:26:07

问题


In an HTML file on My Computer, I'm trying to use the Scripting.FileSystemObject in a script. How can I disable the popup saying "Any ActiveX control on this page may be unsafe for scripting"?

The "Internet Options" Security pane allows one to set "Initialize and script ActiveX controls not marked as safe for scripting" to Enabled for various zones, but files on the local computer don't appear to be in any of the listed zones.

So I guess the alternate question is "How can I edit the security options for local files?"

System: Windows XP SP3
Internet Explorer 7


回答1:


By pure hackery, I discovered that setting the following registry value does it:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0]
"1201"=dword:00000000

But I'm still wondering whether there's any supported way of doing this.




回答2:


Tools |Internet Options | Advanced tab .. way down under Security .. "Allow active content to run in files on My Computer"




回答3:


  1. Start Menu, Run and type INETCPL.CPL
  2. Click the Security tab
  3. In the Internet Zone, click the Custom Level button
  4. Set Initialize and script ActiveX controls not marked as safe to Allow



回答4:


There's a registry way of getting "Local Computer" to appear as one of the security zones. But this article doesn't mention IE7, so IE7 might be different. XP also has new settings like "Allow active content to run in files on My Computer" under advanced options.

Alternatively, if you rename your local .html file to .hta (a HMTL application), that might be what you're looking for. Unless you need all the browser chrome.




回答5:


as someone mentioned that this should be added to registry [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0] "1201"=dword:00000000

but i found that "Initialize and script ActiveX controls not marked as safe" must be enabled too for internet zone




回答6:


Depends on the version. Here's for IE32 on x64 Windows:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID{0D43FE01-F093-11CF-8940-00A0C9054228}\Implemented Categories]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID{0D43FE01-F093-11CF-8940-00A0C9054228}\Implemented Categories{7DD95801-9882-11CF-9FA9-00AA006C42C4}]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID{0D43FE01-F093-11CF-8940-00A0C9054228}\Implemented Categories{7DD95802-9882-11CF-9FA9-00AA006C42C4}]




回答7:


I also had ActiveX security warning ("an activex control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction ?") on IE11 Win10 & with the below registry setting I could suppress that popup.

[HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0] "1201="dword:00000000".

[HKEY_USERS\S-1-5-18 is for SYSTEM account & we can also set this for HKCU for current user account.




回答8:


Activex Controls often prompt an error message while trying to launch course through the local files. (For IE7)

Please set the following settings under internet option\Security\Internet\custom level\

  1. Run Activex controls and plug ins - Enable
  2. Script Activex control marked safe for scripting - Enable
  3. under Scripting - Active Scripting - Enable

Also please check the following check box undertools\Internet options\Advanced\security 1. Allow active content to run in my files on my computer.

~Alpana



来源:https://stackoverflow.com/questions/394298/how-to-disable-activex-control-may-be-unsafe-popup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!