Subject: .cmd files not flagged as executable on NT
From: [email-masked] (Paul Murphy)

19 Jan 1999 05:06:04 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]

Hello all,

This issue is mentioned in brief on the FAQ but does not specifically
address .cmd files.  Actually my concern is the converse of the question:

"Why do some files, which are not executables have the 'x' type."

It seems that .exe files and .bat files are marked 'x', but .cmd files are
not.  I can understand that you really wouldn't want .cmd files to be
marked executable if you were on Win95/98, since I don't think cmd.exe
exists on those platforms.

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."

Thanks,
Paul Murphy

-----------------------------------------------

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Mon Jan 18 19:48:36 1999

WinNT Ver 4.0 build 1381 Service Pack 3

Path:	/PROGRA~1/cygnus/CYGWIN~1/H-I586~1/bin
	/WINNT/system32
	/WINNT
	/Program Files/cygnus/cygwin-b20/H-i586-cygwin32/bin
	/jdk1.2/bin/
	/program files/util/
	/program files/devstudio/sharedide/bin/ide
	/program files/devstudio/sharedide/bin
	/program files/devstudio/vc/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

MAKE_MODE = `UNIX'
PWD = `/docs/html/bin'

!C: = `C:\WINNT\Profiles\pmurphy.000\Desktop'
COMPUTERNAME = `PMURPHY-H'
COMSPEC = `C:\WINNT\system32\cmd.exe'
HOMEDRIVE = `C:'
HOMEPATH = `\'
HOSTNAME = `pmurphy-h'
HOSTTYPE = `i586'
INCLUDE = `c:\program files\devstudio\vc\include;c:\program files\devstudio\vc\atl\include;c:\program files\devstudio\vc\mfc\include;%include%'
LIB = `c:\program files\devstudio\vc\lib;c:\program files\devstudio\vc\mfc\lib;%lib%'
LOGONSERVER = `\\PMURPHY-H'
MACHTYPE = `i586-pc-cygwin32'
MSDEVDIR = `C:\Program Files\DevStudio\SharedIDE'
NUMBER_OF_PROCESSORS = `1'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
OSTYPE = `cygwin32'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 1 Stepping 7, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0107'
PROMPT = `$P$G'
SHELL = `/bin/sh'
SHLVL = `1'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `C:\TEMP'
TERM = `cygwin'
TMP = `C:\TEMP'
USERDOMAIN = `GEOGRAPHIX'
USERNAME = `pmurphy'
USERPROFILE = `C:\WINNT\Profiles\pmurphy.000'
WINDIR = `C:\WINNT'
_ = `/PROGRA~1/cygnus/CYGWIN~1/H-I586~1/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
  (default) = `C:'
  unix = `/'
  fbinary = 0x00000000
  fsilent = 0x00000000
HKEY_CURRENT_USER\Software\Microsoft\RAS Autodial\Addresses\CYGNUS
  (default) = 0x00000008
  LastModified = 0x35172e28
  Network = `NETWORK0'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20\B20.1
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32\cygwin-B20.1
  (default) = `c:\program files\cygnus\cygwin-b20'
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cygnus Cygwin B20
  (default) = `C:\WINNT\IsUninst.exe -f"c:\program files\cygnus\cygwin-b20\Uninst.isu"'
  DisplayName = `Cygwin B20'

a:\ fd           N/A    N/A                    
c:\ hd  NTFS    4094Mb  91% CP CS UN PA FC     
d:\ fd  FAT     1020Mb  59% CP    UN           PR0N
e:\ fd  FAT      127Mb 100% CP    UN           0206_194427
f:\ cd           N/A    N/A                    
h:\ net          N/A    N/A                    
i:\ net          N/A    N/A                    
j:\ net          N/A    N/A                    
k:\ net          N/A    N/A                    
s:\ net          N/A    N/A                    

C:    /        native  text!=binary

Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\bash.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\bash.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\bash.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\bash.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cat.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cat.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cat.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cat.exe
Not Found: cpp (good!)
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\find.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\find.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\find.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\find.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\gcc.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\gcc.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\gcc.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\gcc.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\gdb.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\gdb.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\gdb.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\gdb.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\ld.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\ld.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\ld.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\ld.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\ls.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\ls.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\ls.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\ls.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\make.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\make.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\make.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\make.exe
Found: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\sh.exe
Found: C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\sh.exe
Warning: C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\sh.exe hides C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\sh.exe

  371k 1998/12/01 C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=1998/12/1 1:25
    5k 1998/12/01 C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 1998/12/01 C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=1998/12/1 1:25
  600k 1998/12/01 C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=1998/12/1 1:28
  446k 1998/12/04 C:\PROGRA~1\cygnus\CYGWIN~1\H-I586~1\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=1998/12/3 21:39
  371k 1998/12/01 C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=1998/12/1 1:25
    5k 1998/12/01 C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 1998/12/01 C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=1998/12/1 1:25
  600k 1998/12/01 C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=1998/12/1 1:28
  446k 1998/12/04 C:\Program Files\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=1998/12/3 21:39
Use -h to see help about each section

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".