![]() |
Command used to disable network interface |
Post Reply
|
Page 12> |
| Author | ||
fcretusys
Newbie
Joined: 25 November 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: Command used to disable network interfacePosted: 07 January 2007 at 1:59am |
|
|
Hello, I searched on the Internet for a command to be used in cmd for disabling/enabling a network interface. Does anybody know the syntax if there is one? Thanks and Happy New Year! |
||
![]() |
||
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Status: Offline Points: 5126 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 January 2007 at 5:52am |
|
|
Hello, fcretusys.
If you are looking for commandline programmes that come with current Windows versions and for their syntax, then this page is your friend: Command-line reference A-Z. (You may find the same information inside your local Windows help system. )
If you jump to letter "N", you will easily find the netsh command: Using Netsh. Yet, the description of netsh is pretty hard to read (my impression). So I did some simple Google search and found this:
Hope this helps. Karl Edited by Karlchen - 07 January 2007 at 5:52am |
||
![]() |
||
fcretusys
Newbie
Joined: 25 November 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 January 2007 at 5:59am |
|
|
Thanks for your answer, but id does not work. I receive the following message from Windows: G:\a>netsh interface set interface "Local Area Connection" DISABLED Usage set interface [name = ] IfName Sets interface parameters. IfName - the name of the interface Notes:
G:\a>
I have searched on the Internet and found the following script which works: Const ssfCONTROLS = 3 If there is a more easier way of enabling/disabling an interface, kindly let me know. Best regards,
|
||
![]() |
||
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Status: Offline Points: 5126 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 January 2007 at 6:12am |
|
|
Hi, fcretusys.
I am sorry. Not wishing to kill the NIC of the machine I am using to write this, I did not test the command lines found using Google.
There must be some (minor?) syntactical flaw in that commandline. I think I will try it one of the virtual machines in the office. Karl |
||
![]() |
||
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Status: Offline Points: 5126 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 January 2007 at 7:45am |
|
|
Hi, fcretusys.
Did some more searching. And guess I found the same script you use in the same HP ITRC Forum thread.
Also found this MS KB article which may indicate that the netsh command I found and gave you ought to work, but does not do so (not at all or unreliably): You receive an error message when you use Netsh.exe to enable or disable a network adapter in Windows XP and in Windows 2000. Maybe an MS commandline replacement for devmgmt.msc offers a reliable way of achieving your goal: The DevCon command-line utility functions as an alternative to Device Manager. (Note: have not downloaded and tested it so far) But I'd definitely say, "Handle with care!" Karl |
||
![]() |
||
fcretusys
Newbie
Joined: 25 November 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 January 2007 at 4:20pm |
|
|
The command netsh interface set interface "Local Area Connection" DISABLED works on Windows 2003 Server. |
||
![]() |
||
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Status: Offline Points: 5126 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 January 2007 at 4:26pm |
|
|
OK, this confirms what I remember having read in some MS article(s): that "netsh" behaves differently on different Windows versions.
As it did not work for you I assume you were mainly trying to use it on Win2K?! Karl |
||
![]() |
||
fcretusys
Newbie
Joined: 25 November 2006 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 January 2007 at 4:55pm |
|
|
I wanted this command to work on Windows XP SP2. |
||
![]() |
||
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Status: Offline Points: 5126 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 January 2007 at 6:18am |
|
|
I see. Anyway, I guess that this is the situation where the workaround described by MS in their KB article applies:
You receive an error message when you use Netsh.exe to enable or disable a network adapter in Windows XP and in Windows 2000 The workaround basically is to assign an IP address and a standard gateway to the card which will make it invisible to the rest of the world. Karl |
||
![]() |
||
6spam6
Newbie
Joined: 22 October 2008 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 October 2008 at 9:28am |
|
|
hi
try this http://www.wlanbook.com/enable-disable-wireless-card-command-line/ Edited by 6spam6 - 22 October 2008 at 9:29am |
||
![]() |
||
Post Reply
|
Page 12> |
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |