If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problem: VBS script to display a connected/enabled network connection property dialog works, but not the status dialog
See VBS script below. It'll show both status and properties dialogs for
the first connected/enabled network connection (does nothing if none found). The verb to show the status dialog is already correct, which is Stat&us (character case won't matter). So what am I missing? I'm using Windows XP, BTW. But I think it may work in Vista/Win7 also. dim a,b,c set a=createobject("shell.application") set b=a.namespace(0).parsename("::{7007ACC7-3202-11D1-AAD2- 00805FC1270E}").getfolder for i=0 to (b.items.count-1) set c=b.items.item(i) for j=0 to (c.verbs.count-1) 'only process connected/enabled if (lcase(c.verbs.item(j)) = "disc&onnect") or (lcase(c.verbs.item (j)) = "disa&ble") then 'open status and properties dialogs c.invokeverb("Stat&us") 'this doesn't work c.invokeverb("P&roperties") 'this one works msgbox "Press OK to close all and exit" wscript.quit end if next next |
Ads |
Thread Tools | |
Display Modes | |
|
|