delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/20/15:28:10

From: benny AT crocodial DOT de (Benjamin Riefenstahl)
Subject: Re: .cmd files not flagged as executable on NT
20 Jan 1999 15:28:10 -0800 :
Message-ID: <36A5B5FE.1069FF20.cygnus.gnu-win32@crocodial.de>
References: <Pine DOT GSU DOT 4 DOT 05 DOT 9901181957020 DOT 2937-100000 AT flatland DOT dimensional DOT com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

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 (benny AT crocodial DOT de)
Crocodial Communications EntwicklungsGmbH
Ruhrstr. 61, D-22761 Hamburg, Germany
-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019