Computer Hope

Microsoft => Microsoft DOS => Topic started by: wizmerlin on May 10, 2007, 08:57:49 PM

Title: How can i Enable or Disable my Lan Card vise versa in using DOS commands?
Post by: wizmerlin on May 10, 2007, 08:57:49 PM
How can i Enable or Disable my Lan Card vise versa in using DOS commands?

i have seen the DOS command Enable, but i dont know if its the right command for the job. and i dont know how to use the Enable command.
Title: Re: How can i Enable or Disable my Lan Card vise versa in using DOS commands?
Post by: GuruGary on May 10, 2007, 10:30:20 PM
What OS are you running?  If Windows XP, try:
Code: [Select]
netsh interface set interface "Local Area Connection" DISABLED
Title: Re: How can i Enable or Disable my Lan Card vise versa in using DOS commands?
Post by: wizmerlin on May 11, 2007, 12:46:23 AM
yup, im using XP
there is an error on the command
netsh interface set interface "Local Area Connection" DISABLED

One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.

Usage set interface [name = ] IfName
            [ [admin = ] ENABLED|DISABLED
              [connect = ] CONNECTED|DISCONNECTED
              [newname = ] NewName ]

      Sets interface parameters.

      IfName  - the name of the interface
      admin   - whether the interface should be enabled (non-LAN only).
      connect - whether to connect the interface (non-LAN only).
      newname - new name for the interface (LAN only).

      Notes:
      - At least one option other than the name must be specified.
      - If connect = CONNECTED is specified, then the interface
        is automatically enabled even if the admin = DISABLED
        option is specified.
Title: Re: How can i Enable or Disable my Lan Card vise versa in using DOS commands?
Post by: patio on May 11, 2007, 04:29:35 PM
From a command prompt...ipconfig /release.

To turn back on ...ipconfig /renew.

p.s. It's not DOS in XP...
Title: Re: How can i Enable or Disable my Lan Card vise versa in using DOS commands?
Post by: wizmerlin on May 11, 2007, 07:56:21 PM
it does not work

C:\>ipconfig /release
Windows IP Configuration
The operation failed as no adapter is in the state permissible for this operation.
C:\>ipconfig /renew
Windows IP Configuration
The operation failed as no adapter is in the state permissible for this operation.

by the way im using the admin account

i have tried 
netsh interface set interface "Local Area Connection" connect = DISCONNECTED
but the error is
connect=DISABLE is not acceptable value for admin.
the parameter is incorrect.