Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
From: Jani Tiainen <redetin@luukku.com>
Subject: Re: (De)activating network connection
Date: Wed, 06 Oct 2004 14:34:16 +0300
Lines: 34
Message-ID: <ck0l7o$9ue$1@sea.gmane.org>
References: <OF694183C2.CFA4EE65-ON03256F24.006CB529-03256F24.0071B3F7@fosfertil-ultrafertil.com.br> <41630B3E.1E072A74@dessent.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: 195.236.144.25
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
In-Reply-To: <41630B3E.1E072A74@dessent.net>
X-IsSubscribed: yes

Brian Dessent wrote:
> 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.

At least I have this netsh.exe available in my win2k system.. Never 
heard about it before this but seems very nice tool indeed.

-- 

Jani Tiainen


--
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/

