X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Thu, 5 Apr 2012 12:25:02 -0700
From: Gary Johnson <garyjohn@spocom.com>
To: cygwin@cygwin.com
Subject: Re: How to run cygwin on boot
Message-ID: <20120405192502.GA10385@phoenix>
Mail-Followup-To: cygwin@cygwin.com
References: <4F7D4CC7.4050908@gmail.com> <4F7D50A1.4050700@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4F7D50A1.4050700@gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
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

On 2012-04-05, marco atzeri wrote:
> On 4/5/2012 9:41 AM, J.V. wrote:
> >I need to run a .bat file on startup that will launch a cygwin bash script.
> >
> >I can put the .bat file in the folder "startup" to connect some network
> >drives and then I want to launch a bash script.
> >
> >Can this be done?
> >
> >thanks
> >
> >J.V.
> >
> 
> yes.
> make a copy of cygwin.bat that is in the the cygwin root
> and use
> 
>   bash -c "your script"
> 
> instead of
> 
>   bash --login -i

You may want to keep the "--login" option, e.g.,

    bash --login -c "your script"

Otherwise you will not get important parts of the Cygwin environment
such as PATH.

Regards,
Gary


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

