手机
当前位置:查字典教程网 >脚本专栏 >vbs >管理网卡vbs脚本
管理网卡vbs脚本
摘要:'dislan.vbs'usage:cscript/nologodislan.vbsConstssfCONTROLS=3sConnectio...

'dislan.vbs

'usage:cscript/nologodislan.vbs

ConstssfCONTROLS=3

sConnectionName="本地连接"

sEnableVerb="启用(&A)"

sDisableVerb="禁用(&B)"

setshellApp=createobject("shell.application")

setoControlPanel=shellApp.Namespace(ssfCONTROLS)

setoNetConnections=nothing

foreachfolderiteminoControlPanel.items

iffolderitem.name="网络和拨号连接"then

setoNetConnections=folderitem.getfolder:exitfor

endif

next

ifoNetConnectionsisnothingthen

wscript.quit

endif

setoLanConnection=nothing

foreachfolderiteminoNetConnections.items

iflcase(folderitem.name)=lcase(sConnectionName)then

setoLanConnection=folderitem:exitfor

endif

next

ifoLanConnectionisnothingthen

wscript.quit

endif

bEnabled=true

setoEnableVerb=nothing

setoDisableVerb=nothing

s="Verbs:"&vbcrlf

foreachverbinoLanConnection.verbs

s=s&vbcrlf&verb.name

ifverb.name=sEnableVerbthen

setoEnableVerb=verb

bEnabled=false

endif

ifverb.name=sDisableVerbthen

setoDisableVerb=verb

endif

next

ifbEnabledthen

oDisableVerb.DoIt

else

oEnableVerb.DoIt

endif

wscript.sleep1000

【管理网卡vbs脚本】相关文章:

两个批量挂马vbs脚本代码

用来分割文本的vbs脚本

vbs/js脚本编程教学(1)

写个设置命令的VBS脚本代码

用vbs实现本地添加用户的脚本

解锁注册表的vbs脚本

多进程的vbs脚本

用vbs通过135端口执行命令的脚本

修改 Gateway和DNS的vbs脚本

VBS常用脚本 好东西

精品推荐
分类导航