Jump to content
Sign in to follow this  

Creating Network Connection

Recommended Posts


I've two possible connections to create using a script, dial up network and wireless network. I was looking in microsoft's site under cpl but, I couldn't find a useful reference for this.

I'm about to start automating the explorer Network Connections window launched using the appropriate cpl for NT and 9x, and from there launch a new network wizard window and run the process...

I hate automating wizards, let alone working with Explorer listviews, so if anyone has a better suggestion I'd really be grateful if you could share it with me.

THX in advance


Share this post

Link to post
Share on other sites

I can't think of anything other than automating the wizard.

Here's something to start you off:

Run(@ComSpec & ' /c @open '&"::{208D2C60-3AEA-1069-A2D7-08002B30309D}", '', @SW_HIDE)

_wwa("Network Connections")
WinMenuSelectItem("Network Connections", "", "&File", "&New Connection...")

_wwa("New Connection Wizard", "Welcome to the New Connection Wizard")
_wwa("New Connection Wizard", "Connect")
ControlClick("New Connection Wizard", "", 22128)
_wwa("New Connection Wizard", "Network Setup Wizard")
ControlClick("New Connection Wizard", "", 12325)

_wwa("Network Setup Wizard", "Welcome to the Network Setup Wizard")
_wwa("Network Setup Wizard", "complete the following")
_wwa("Network Setup Wizard", "Select the statement")

;;Complete the rest yourself...

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  Network Setup Wizard
Class:  #32770
Size:   X: 290  Y: 319  W: 503  H: 386

>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 593  Y: 578
Cursor ID:  2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0xD4D0C8   Dec: 13947080

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size:       X: 22   Y: 120  W: 455  H: 127
Control ID: 4007
ClassNameNN:    SysListView321
Text:       Connection List
(Control is hidden)

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
Select the statement that best describes this computer:
This &computer connects directly to the Internet. The other computers on my network connect to the Internet through this computer.
This co&mputer connects to the Internet through another computer on my network or through a residential gateway.
Learn more about <A>home or small office network configurations</A>.
<A>View an example</A>.
<A>View an example</A>.
< &Back
&Next >

Func _wwa($title, $text="")
    WinWait($title, $text)
    WinActivate($title, $text)
    WinWaitActive($title, $text)


Share this post

Link to post
Share on other sites

Thanks. I had to go home soon after posting the topic, so I worked out a wizard automation procedure. Anyway, I'll try your solution, which is pretty much the same as mine (except that I have to run on a spanish os version, which implies different values for menu items on the network connections folder which I obtain through cpl instead of CLSID.

Best regards


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.