Subject: Re: .cmd files not flagged as executable on NT
From: [email-masked] (Benjamin Riefenstahl)

20 Jan 1999 15:28:10 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

Paul Murphy wrote:
> As a compromise, until a better solution can be approximated, I suggest
> that the FAQ be augmented to read something like this:
> 
> Q: "Why do some files, which are not executables have the 'x' type, and
> some that should, don't?"
> 
> A: "When working out the unix-style attribute bits on a file, the library
> has to fill out some information not provided by the WIN32 API.
> 
> It guesses that files ending in .exe and .bat are executable, as are ones
> which have a "#!" as their first characters.  Files that end in .cmd are
> not currently guessed to be executable, since this could be wrong on
> Windows 95/98."
>
> ...
> PATHEXT = `.COM;.EXE;.BAT;.CMD'

Note that this environment variable is documented to be a list of
extensions used by cmd.exe/command.com for a very similar purpose. It
determines which extensions to try if a command doesn't have its own
extension. So on my system

  C:>system

gives me "command not found" error, while

  C:>system.ini

starts the system.ini in notepad and

  C:>notepad

starts a blank notepad.

cygwin.dll could probably honor this variable.
======================================
Benjamin Riefenstahl ([email-masked])
Crocodial Communications EntwicklungsGmbH
Ruhrstr. 61, D-22761 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".