sDisableVerb = "停用(&B)"
set oControlPanel = shellApp.Namespace(ssfCONTROLS)
for each folderitem in oControlPanel.items
if folderitem.name = "网络连接" Then
end if
next
msgbox "Couldn't find 'Network Connections' folder"
w..quit
end if
for each folderitem in .etConnections.items
if lcase(folderitem.name) = lcase(sConnectionName) then
set oLanConnection = folderitem: exit for
end if
next
msgbox "Couldn't find '" & sConnectionName & "' item"
w..quit
end if
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
oDisableVerb.DoIt
end if
bEnabled = true
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