VB 脚本 +打开 file.html 并执行“允许阻止的内容”汽车

发布于 2024-09-13 15:56:37 字数 140 浏览 3 评论 0原文

当我通过 MyShell = CreateObject("WScript.Shell") 打开 file.html 时,我还需要启用“允许阻止的内容”。

VB打开html页面后,是否可以通过VB脚本执行“允许阻止的内容”?

When I open the file.html by MyShell = CreateObject("WScript.Shell"), I also need to enable the "allow blocked content".

Is it possible to do the "allow blocked content" by VB script after VB opened the html page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

む无字情书 2024-09-20 15:56:37

不,出于安全原因,IE 认为这是不可能的,这是浏览器 (IE) 中存在的东西,您无法以编程方式启用它。

Nope, that's not possible for security reasons IE considers, that is something there with the browser (IE), you can not enable it programmatically.

人海汹涌 2024-09-20 15:56:37
set objShell = CreateObject("WScript.Shell") 

objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Enable Browser Extensions","yes", "REG_SZ" 
objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN\iexplore.exe","00000000", "REG_DWORD" 

运行上面的 VBScript。
希望这有帮助。

set objShell = CreateObject("WScript.Shell") 

objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Enable Browser Extensions","yes", "REG_SZ" 
objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN\iexplore.exe","00000000", "REG_DWORD" 

Run the above VBScript.
Hope this helps.

奈何桥上唱咆哮 2024-09-20 15:56:37

该权限请求会弹出,然后在 IE 中加载离线 .html。在这种情况下,最好使用 HTAs。他们有许可,因此不需要任何特殊设置。

That permission request pop up then load offline .html's in IE. Better use HTAs in this case. They have the permission, so not necessary any special setup.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文