A Windows XP help forum. PCbanter

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.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Windows XP Help and Support
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem: VBS script to display a connected/enabled network connection property dialog works, but not the status dialog



 
 
Thread Tools Display Modes
  #1  
Old July 2nd 12, 06:52 AM posted to alt.os.windows-xp,alt.windows-xp,microsoft.public.windowsxp.help_and_support
JJ[_7_]
external usenet poster
 
Posts: 71
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 08:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.