This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Batch files


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]