emmanuel Posted April 22, 2004 Share Posted April 22, 2004 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) Link to comment Share on other sites More sharing options...
emmanuel Posted April 22, 2004 Author Share Posted April 22, 2004 I found this MSDN page on it, though have no idea how I'd script it:http://msdn.microsoft.com/library/default....nfiguration.asp "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
emmanuel Posted April 22, 2004 Author Share Posted April 22, 2004 sweet, if anyone cares, here's some refrences for netsh.Use netsh to configure your laptop's nic for different networkshttp://is-it-true.org/nt/nt2000/utips/utips46.shtmlMS Reference:http://go.microsoft.com/fwlink/?linkid=18352How to Configure Networking on a Run-Time Imagehttp://msdn.microsoft.com/library/en-us/xp...n-timeimage.aspgood stuff, thank you Larry.(I will now email the network gurus here and amaze them with my powers.) "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
emmanuel Posted April 23, 2004 Author Share Posted April 23, 2004 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 ) "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
jterwelp Posted April 23, 2004 Share Posted April 23, 2004 Well...you could use RegEnumKey withIs 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 Link to comment Share on other sites More sharing options...
emmanuel Posted April 26, 2004 Author Share Posted April 26, 2004 yeah, if you're willing, I'd be grateful... "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
emmanuel Posted April 26, 2004 Author Share Posted April 26, 2004 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) Link to comment Share on other sites More sharing options...
emmanuel Posted April 26, 2004 Author Share Posted April 26, 2004 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now