disable LAN connection cmd

C

Crios

I have a LAN connection called let's say UPC (automatic IP and DNS) that I
want sometimes to disable (for a certain period).

Instead of using Ctrl Panel/... I would like to do this with a command
script file (.cmd) file placed on my desktop.

Probably is something with netsh, but this is just a guess.


Thanx,
Crios
 
P

Pegasus \(MVP\)

Crios said:
I have a LAN connection called let's say UPC (automatic IP and DNS) that I
want sometimes to disable (for a certain period).

Instead of using Ctrl Panel/... I would like to do this with a command
script file (.cmd) file placed on my desktop.

Probably is something with netsh, but this is just a guess.


Thanx,
Crios

You can disable your network adapter with this command:

devcon disable {NameOfNetworkAdapter}

To find the name of your network adapter, type these commands:

devcon hwids "*" > c:\devcon.txt
notepad c:\devcon.txt

You can download devcon.exe from here:
http://download.microsoft.com/download/1/1/f/11f7dd10-272d-4cd2-896f-9ce67f3e0240/devcon.exe
 
S

Script

Are you adamant about using a script file, or do you just want a desktop
shortcut?
If you choose Create Shortcut from your Local Area Connection's context
menu, right-clicking the new Desktop shortcut allows you to Enable/Disable.
 

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

Similar Threads


Top