Sign in to follow this  
Followers 0
emmanuel

Configuring A Network Connection?

8 posts in this topic

does anyone here have any experiance with configuring win2k/xp network connections with a script?

I am specifally looking to change the DNS and WINS settings, on a range of PC's with different network cards after installing mmy corporate VPN software...

Just glancing through the registry I am confised as to where this info might be in there, and fear the location would vary by NIC...

Oh, I also need it to happen to all NICs on the PC, not just the primary one...


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites



sweet, if anyone cares, here's some refrences for netsh.

Use netsh to configure your laptop's nic for different networks

http://is-it-true.org/nt/nt2000/utips/utips46.shtml

MS Reference:

http://go.microsoft.com/fwlink/?linkid=18352

How to Configure Networking on a Run-Time Image

http://msdn.microsoft.com/library/en-us/xp...n-timeimage.asp

good stuff, thank you Larry.

(I will now email the network gurus here and amaze them with my :D powers.)


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

ok, so, one more question, do you know of any way to apply the same settings to all adapters? I was thinking I could do a

netsh interface show interface > interfaces.txt
to dump a list to a text file then have autoit harvest the interface names and write a new config file to have netsh run... is there an easier way? (especially since I talk the talk, but have no idea how I'd make autoit find the right text in such a adapter list :D )

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Well...you could use RegEnumKey with

Is RegEnumKey in the official release or just unstable?

Lar.

Just unstable. Emmanuel - if you need a solution before RegEnumKey is included in an official AutoIt release, you can enumerate registry keys with a VBScript very easily. If you're interested, I can post an example.

Jeff

Share this post


Link to post
Share on other sites

yeah, if you're willing, I'd be grateful...


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

so, I went back and looked at what's shown in that registry key, it doesn't look like it shows the connection name. To use netsh, you need the connection name as it's shown in the Network Connections control panel, or you can see it if you do a

netsh -c interface dump > c:\nic_config.txt
at the ol' command prompt you'll see the output with the connection names...


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

so, I poked some more, I'm sorry Larry, I see you were right, by changing my connection name to something rediculous and searching the registry for it...

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{DD899CC8-40F9-4183-BF87-80E50A2CC616}\Connection]

It's the Name value that I'd need, for each connection, and I'd need it for each one... I guess that the function you were talking about in the unstable version is what'd pull those... I'll hope to see some vbscript that does it... and I really beg that it's working, since I've only just cracked open my VBScript in a Nutshell book.


"I'm not even supposed to be here today!" -Dante (Hicks)

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  
Followers 0