![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Enable/Disable NIC from command line? I quite often just shut my laptop lid for a few hours and when reopening it the NIC I was using to access the Internet is disabled! Rather than re-enable via control panel etc... can I do it from the command prompt e.g something like net start "Realtek RTL8139/810x Family Fast Ethernet NIC" I'm aware of the option to prevent vista disabling the device when in sleep mode but want to try changing this setting if possible! can it be done? thanks harry |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Enable/Disable NIC from command line? "harryajh" <harryajh@xxxxxx> wrote ... Quote: > Rather than re-enable via control panel etc... can I do it from the > command prompt e.g something like net start "Realtek RTL8139/810x > Family Fast Ethernet NIC" My first thought was that some variety of the "netsh" command, should do this. But I can't work out the correct syntax (if any). An alternative which will certainly work, but would require some small effort on your part to set up, is to use the WMI Win32_NetworkAdapter Class class. This class has an Enable method, which you could call in a short VBScript. You'll find a sample scrip to enable an adapter, in the MSDN doco for the method: http://msdn2.microsoft.com/en-us/library/aa390385.aspx class. Put the script in a file with a *.vbs extension, then run it at a command prompt by typing the file name. There may be other ways as well, but this should definitely work. Note that you may need to open a command prompt "As Administrator" for this to work. Hope it helps. -- Andrew McLaren amclar (at) optusnet dot com dot au |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Enable/Disable NIC from command line? "Andrew McLaren" <andrew@xxxxxx> wrote in message news:326822EE-2FBB-44C9-A802-8768BB9A723E@xxxxxx Quote: > "harryajh" <harryajh@xxxxxx> wrote ... Quote: >> Rather than re-enable via control panel etc... can I do it from the >> command prompt e.g something like net start "Realtek RTL8139/810x >> Family Fast Ethernet NIC" > Hi Harry > > My first thought was that some variety of the "netsh" command, should do > this. But I can't work out the correct syntax (if any). > > An alternative which will certainly work, but would require some small > effort on your part to set up, is to use the WMI Win32_NetworkAdapter > Class class. This class has an Enable method, which you could call in a > short VBScript. You'll find a sample scrip to enable an adapter, in the > MSDN doco for the method: > > http://msdn2.microsoft.com/en-us/library/aa390385.aspx class. > > Put the script in a file with a *.vbs extension, then run it at a command > prompt by typing the file name. > > There may be other ways as well, but this should definitely work. Note > that you may need to open a command prompt "As Administrator" for this to > work. > > Hope it helps. > > -- > Andrew McLaren > amclar (at) optusnet dot com dot au to such a script. -Paul Randall |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Enable/Disable NIC from command line? On 20 Sep, 13:41, "Andrew McLaren" <and...@xxxxxx> wrote: Quote: > "harryajh" <harry...@xxxxxx> wrote ... > Quote: > > Rather than re-enable via control panel etc... can I do it from the > > command prompt e.g something like net start "Realtek RTL8139/810x > > Family Fast Ethernet NIC" > Hi Harry > > My first thought was that some variety of the "netsh" command, should do > this. But I can't work out the correct syntax (if any). > > An alternative which will certainly work, but would require some small > effort on your part to set up, is to use the WMI Win32_NetworkAdapter Class > class. This class has an Enable method, which you could call in a short > VBScript. You'll find a sample scrip to enable an adapter, in the MSDN doco > for the method: > > http://msdn2.microsoft.com/en-us/lib...0385.aspxclass. > > Put the script in a file with a *.vbs extension, then run it at a command > prompt by typing the file name. > > There may be other ways as well, but this should definitely work. Note that > you may need to open a command prompt "As Administrator" for this to work. > > Hope it helps. > > -- > Andrew McLaren > amclar (at) optusnet dot com dot au happens! |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Enable/Disable NIC from command line? harryajh <harryajh@xxxxxx> wrote in news:1190275750.442526.162700 @d55g2000hsg.googlegroups.com: Quote: > I quite often just shut my laptop lid for a few hours and when > reopening it the NIC I was using to access the Internet is disabled! > > Rather than re-enable via control panel etc... can I do it from the > command prompt e.g something like net start "Realtek RTL8139/810x > Family Fast Ethernet NIC" Adam -- Visit my PC Tech blog at www.leinss.com/blog |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Command Prompt - Enable or Disable | Tutorials | |||
| Running a command from inside a script, command line is corrupted | PowerShell | |||
| how to enable the line-in jack | Vista General | |||
| What is the command line command for unzipping files? | Vista General | |||
| Command Line Ren (Rename) command broken? | Vista General | |||