devcon and netsh: setting connection name

B

Bill B

Hi,

is there anyway to specify the connection name used by windows when setting
up a new connection.
my systems default to local area conection xxx.

i am trying to script a process that creates the interface using devcon and
sets the properties using netsh.

i can create the interface fine, and i can change it fine with netsh, but
netsh relies on the connection name, i need to specify a common connection
name so my scripted netsh command will change the correct card.

Ive looked at the inf file for netloop, but there doesnt seem to be a place
to specify this..

any suggestions?
 
R

Ritchie

Bill B said:
i can create the interface fine, and i can change it fine with netsh, but
netsh relies on the connection name, i need to specify a common connection
name so my scripted netsh command will change the correct card.

I reckon you could use NETSH to dump the interfaces before and after
running DEVCON and compare the difference in the dump files to obtain
the name of the new interface.

If you post the dumps*, someone in the group will show how to get the
new interface into a variable.

*You only need to run something like:-

netsh int dump|find "set address name=" >before

I wouldn't mind seeing your script to add the new interface, it could
be very useful once it's archived on google.
 
H

Herb Martin

Ritchie's idea is a IMPORTANT trick with NetSh.exe.

NetSh.exe has a command syntax that is difficult to learn
and not well documented.

But, NetSh can dump the commands necessary to RELOAD
or recongure using NetSh.

So setup (almost anything) and then use NetSh.exe to dump
out the command file that will re-create it.

You use an editor to extract the import pieces or modify it
to do other (similar) things easily.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top