delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/05/16:59:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41630B3E.1E072A74@dessent.net>
Date: Tue, 05 Oct 2004 13:59:42 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: (De)activating network connection
References: <OF694183C2 DOT CFA4EE65-ON03256F24 DOT 006CB529-03256F24 DOT 0071B3F7 AT fosfertil-ultrafertil DOT com DOT br>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Thiers Botelho wrote:

> I wish to use some command within a script to activate / deactivate an
> Ethernet connection.
> 
> In WinXP this would normally be done thru Settings / Network Connections /
> Local Connection / right-click .
> 
> I found _rasdial.exe_ but it seems to deal only with dial-up connections.
> 
> There's got to be some simple cmdline on/off switch somewhere (hope that
> won't be regedit . . .)

Starting with XP Microsoft realized that it sure would be nice to be
able to set networking parameters (interfaces, addresses, routing, etc)
from the command line or scripts.  [Gee, what an idea, huh?  Took them
long enough to think of that.]

Try the following or something like it:
netsh int set interface "Local Area Connection" admin=ENABLED

Replace ENABLED with DISABLED as appropriate.  I'm not entirely sure of
the syntax but you can just run netsh and play around with ? and help to
get it down.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019