Subject: RE: Running shell-scripts from NT GUI?
From: [email-masked] (Fieldhouse, Dirk)

25 Nov 1998 05:24:49 -0800
Message-ID: <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>

Magnus Homann ([email-masked]) 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
[email-masked]           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
"[email-masked]" with one line of text: "help".