這篇文章將為大家詳細(xì)講解有關(guān)vbs如何實現(xiàn)管理網(wǎng)卡腳本,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
成都創(chuàng)新互聯(lián)公司主要從事成都網(wǎng)站制作、做網(wǎng)站、網(wǎng)頁設(shè)計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)于洪,10年網(wǎng)站建設(shè)經(jīng)驗,價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18982081108'dislan.vbs 'usage: cscript /nologo dislan.vbs Const ssfCONTROLS = 3 sConnectionName = "本地連接" sEnableVerb = "啟用(&A)" sDisableVerb = "禁用(&B)" set shellApp = createobject("shell.application") set oControlPanel = shellApp.Namespace(ssfCONTROLS) set oNetConnections = nothing for each folderitem in oControlPanel.items if folderitem.name = "網(wǎng)絡(luò)和撥號連接" then set oNetConnections = folderitem.getfolder: exit for end if next if oNetConnections is nothing then wscript.quit end if set oLanConnection = nothing for each folderitem in oNetConnections.items if lcase(folderitem.name) = lcase(sConnectionName) then set oLanConnection = folderitem: exit for end if next if oLanConnection is nothing then wscript.quit end if bEnabled = true set oEnableVerb = nothing set oDisableVerb = nothing s = "Verbs: " & vbcrlf for each verb in oLanConnection.verbs s = s & vbcrlf & verb.name if verb.name = sEnableVerb then set oEnableVerb = verb bEnabled = false end if if verb.name = sDisableVerb then set oDisableVerb = verb end if next if bEnabled then oDisableVerb.DoIt else oEnableVerb.DoIt end if wscript.sleep 1000
關(guān)于“vbs如何實現(xiàn)管理網(wǎng)卡腳本”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。