This is the mail archive of the cygwin@sourceware.cygnus.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: Running shell-scripts from NT GUI?


Magnus Homann (homann@homann.se) wrote:

> I just got an NT machine at work, and I want to continue writing some nice
> shell scripts. /bin/sh is adequate, especially with some awk and sed
> thrown in.
> 
> Now, to make it easuer to run these scritps, I would like to make an icon
> that, when activated, starts /bin/sh and runs a specific script. It sounds
> really easy to do, but I don't know where to start. I've tried reading the
> archive and the docs, but I don't really know what I'm looking for... 

What M$ does for IE and URLs is to use the Explorer shell's capability to
specify a DLL as a ShellExecuteHook. On this principle one would create a
cygwin ShellExecuteHook DLL so that when your no-extension file is not
associated with any application, your cygwin ShellExecuteHook can open the
file, read its first line and launch the appropriate shell for the script. I
guess this goes for NT as well as 9x, but I haven't looked for the
documentation (if it exists outside M$) of this protocol.

A similar hook system allows Explorer to bring up a document property sheet
for OLE structured storage documents (eg Word 6+) even when no extension is
present.

CDE, for instance, has the inbuilt ability to define filetypes based on
filename patterns (*.sh) or contents (#!/bin/sh) or attributes (r,,!d) or
combinations of these.

-- 
Dirk Fieldhouse                 Logica UK Limited
fieldhouse@logica.com           75 Hampstead Road
c=gb;a=attmail;p=logica;        London NW1 2PL
o=lg;ou1=lgwct;s=fieldhouse     UK
+44 (171) 637 9111

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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