| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT 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 AT spocom DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: How to run cygwin on boot |
| Message-ID: | <20120405192502.GA10385@phoenix> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <4F7D4CC7 DOT 4050908 AT gmail DOT com> <4F7D50A1 DOT 4050700 AT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <4F7D50A1.4050700@gmail.com> |
| User-Agent: | Mutt/1.5.20 (2009-06-14) |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |