delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/05/03:58:55

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-ID: <4F7D50A1.4050700@gmail.com>
Date: Thu, 05 Apr 2012 09:58:25 +0200
From: marco atzeri <marco DOT atzeri AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How to run cygwin on boot
References: <4F7D4CC7 DOT 4050908 AT gmail DOT com>
In-Reply-To: <4F7D4CC7.4050908@gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

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

regards
Marco


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

- Raw text -


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