From: Fieldhouse AT logica DOT com (Fieldhouse, Dirk) Subject: RE: Running shell-scripts from NT GUI? 25 Nov 1998 05:24:49 -0800 Message-ID: <6DA86DEBF68AD1119B1C00A0C94D2306CDB43F.cygnus.gnu-win32@hopper.logica.co.uk> To: "'homann AT homann DOT se'" Cc: "'gnu-win32 AT cygnus DOT com'" Magnus Homann (homann AT homann DOT 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 AT logica DOT 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 AT cygnus DOT com" with one line of text: "help".