手机
当前位置:查字典教程网 >脚本专栏 >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脚本结合echo的dos下实现

VBS相册生成脚本[

用vbs实现注册表开关的脚本

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

多进程的vbs脚本

使用vbs脚本定时删除N天前的文件

定时自动备份IIS的WWW日志的vbs脚本

多进程的实现投票的vbs脚本

解锁注册表的vbs脚本

两个批量挂马vbs脚本代码

精品推荐
分类导航