netsh without knowing current connection name

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
for(im stuck)
Posts: 3
Joined: 15 Apr 2010 08:23

netsh without knowing current connection name

#1 Post by for(im stuck) » 15 Apr 2010 08:30

I want to set up my internet connection from the command prompt. I know I can do this with netsh by dumping a configuration to a file then loading that file back in when needed. However, it seems it looks for a connection with the same name (i.e. if I save the settings for "my only connection" then it is renamed to "connection 1", when I try to reset the settings for "my only connection" using netsh nothing is reset because it doesn't find a "my only connection" name to reset). Is there a way to just say, take whatever the computer sees as connection 1, no matter the name, and change its settings (ip, etc)? I.E. make it name independent. If clarification is needed, please let me know. Thanks.

Post Reply