'编程控制网卡启用停用vbs版
来源:attilax的专栏
地址:http://blog.youkuaiyun.com/attilax
Const ssfCONTROLS = 3
sConnectionName = "mecr" '可改成需要控制的连接名称,如"无线网络连接"等
sEnableVerb = "启用(&A)"
sDisableVerb = "停用(&B)" '非xp 系统可能 是禁用
set shellApp = createobject("shell.application")
set oControlPanel = shellApp.Namespace(ssfCONTROLS)
set oNetConnections = nothing
for each folderitem in oControlPanel.items
if folderitem.name = "网络连接" then
set oNetConnections = folderitem.getfolder: exit for
end if
next
if oNetConnections is nothing then
msgbox "未找到网络连接文件夹"
wscript.quit
end if
wscript.echo("c300")
set oLanConnection = nothing
for each folderite

该博客分享了使用VBScript编程实现对计算机网卡启用和停用的功能,提供了相关代码示例和详细说明。
最低0.47元/天 解锁文章
545

被折叠的 条评论
为什么被折叠?



