首页
社区
课程
招聘
internet选项的设置怎么通过程序来实现?

 

就是这个,我看好像BAT也没办法实现,这有什么办法吗?

收藏
2条回答
为华 2022-11-27

EXE就可以

回复
Sonshines 2022-12-6

如果您想通过程序来设置 Internet Explorer 浏览器的选项,您可以使用 Windows Script Host (WSH) 编写脚本。WSH 是一种 Microsoft Windows 操作系统中的脚本技术,它可以用来执行各种脚本语言,包括 JScript 和 VBScript。

 

下面是一个简单的示例,展示了如何使用 VBScript 设置 Internet Explorer 浏览器的“安全”选项:

1
2
3
4
5
6
7
8
9
10
Dim ie
Set ie = CreateObject("InternetExplorer.Application")
 
' Set the "Security" options
ie.Security.Zones(1).Level = 1
ie.Security.Zones(2).Level = 2
ie.Security.Zones(3).Level = 2
 
' Save the changes and exit
ie.Quit

上面的示例代码用来设置 Internet Explorer 浏览器的“安全”选项。它通过在脚本中创建 Internet Explorer 应用程序的实例,然后使用 VBScript 设置安全选项,最后保存更改并退出。

 

例如,脚本中第一行设置了第一个安全区域的安全级别。

 

如果您想设置 Internet Explorer 浏览器的高级选项,可以使用类似于上面的代码来编写脚本。只需要将相应的属性和方法替换成您想要设置的选项即可。

 

例如,如果您想设置“高级”选项卡中的“提醒”选项,可以这样写:

1
2
3
4
5
6
7
8
Dim ie
Set ie = CreateObject("InternetExplorer.Application")
 
' Set the "Notifications" option
ie.Advanced.Notifications = False
 
' Save the changes and exit
ie.Quit

上面的代码会禁用 Internet Explorer 浏览器的“提醒”选项

回复