delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/30/14:48:56

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3AC4E2E8.36A22AF0@yahoo.com>
Date: Fri, 30 Mar 2001 14:47:52 -0500
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: Earnie Boyd <cygwin AT cygwin DOT com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
CC: Matt Minnis <mminnis AT prefres DOT com>, cygwin AT cygwin DOT com
Subject: Re: Batch files
References: <5 DOT 0 DOT 2 DOT 1 DOT 2 DOT 20010330170402 DOT 042f8150 AT mailhost> <4 DOT 3 DOT 1 DOT 2 DOT 20010330121322 DOT 020d15b0 AT pop DOT ma DOT ultranet DOT com>

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 11:17 AM 3/30/2001, Matt Minnis wrote:
> 
> >Is there a way to get Cygwin to recognize that *.bat files are executeable as:
> >fred.bat & fred (without the .bat)?
> 
> Anything's possible.  foo.bat works for me though.
> 

Hmm...  This isn't a FAQ yet?!

I've explained many times how to do this. 

1) Create a noop program named #!.exe
2) Install the it in C:/cygwin/bin and C:/windows/system32/
3) Add `#! c:/windows/system32/cmd /c' to the .bat file as the first
line.

Earnie.

P.S.:

cat << EOD > noop.c
int main (void) {return 0;}
EOD
gcc -o \#\!.exe noop.c

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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