Running a shell Script Directly from windows

Krzysztof Duleba
Thu Jul 8 04:06:00 GMT 2004

Brian Dessent wrote:

> > I am wondering if Cygwin provides a way to run shell scripts or other
> > programs that run within Cygwin, directly from windows (or a .bat). In
> > other words, I would like to double-click something on my desktop and
> > it run the shell script. .
> Create a shortcut that runs "sh.exe /path/to/".  When you click
> on it your script will run in a command window.  If your cygwin bin
> directory is not in your path then the shortcut will have to include it,
> i.e. "c:\cygwin\bin\sh.exe /home/foo/".

I guess that the following solution is better, as no additional files
except for the script itself are used.

Right-click, select "open with", "choose a program" (or whatever
the name for the option is), then go to your Cygwin directory, select
bash.exe, mark "always ..." and then click ok. Since then, everytime you
double-click the script, it will be launched.

Krzysztof Duleba

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list