Running a shell Script Directly from windows

Brian Dessent
Thu Jul 8 02:30:00 GMT 2004

Scott Emerson Longley 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 have
> it run the shell script. I have fooled a little with bash command-line
> options and whatnot, but to no avail. Any insight or URL's that lead to an
> answer would be greatly appreciated.

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/".  The executable's location
is a Windows path, the args to it are POSIX paths.  If the script has
something other than /bin/sh in the shebang, then substitute


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list