I have a VPN connection on my machine called "fred" and I
am using the following VBScript function to attempt to
DialVPN = False
Set oCons = CreateObject("Shell.Application").NameSpace
If oCons is Nothing Then
wscript.echo "Unable to locate your Network
For Each oItem In oCons.Items
If oItem.Name = "fred" Then
For Each oVerb in oItem.Verbs
If oVerb.Name = "C&onnect" Then
DialVPN = True
I have verified with message boxes that the "DoIt" method
is executed on the correct verb of the correct namespace
object. But DoIt doesn't seem to do anything - no dialer
dialog box appears.
I am using Windows XP service pack 1 and the VPN
connection works if I double click it.
Any ideas why running the verb does nothing?