X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <AANLkTinrgelZ5PcMhWjzehe8sa-cjkGoiFI8WpLGNh84@mail.gmail.com>
References: <OFF145E76E.EB43EC60-ON8525773C.005639A6-8525773C.005650D6@lnotes-gw.ent.nwie.net> 	<AANLkTil0pNuO4a9n2Ln5H3Q0cJRdQER7NlgSTg2a9EN2@mail.gmail.com> 	<OFCB72527D.F8E42EE2-ON8525773C.0058E3E2-8525773C.0059F451@lnotes-gw.ent.nwie.net> 	<1276042636.1651.9.camel@erebor> <AANLkTil6fa2-stL9f3hd-Dg-X6FjzVKLeG56lPoI7OYp@mail.gmail.com> 	<20100609044034.GB9305@ednor.casa.cgf.cx> <AANLkTikJ9U3U49HlT9Ldm6aueX3z22gN_6L95P-E2Pwz@mail.gmail.com> 	<AANLkTinrgelZ5PcMhWjzehe8sa-cjkGoiFI8WpLGNh84@mail.gmail.com>
From: Julio Costa <costaju@gmail.com>
Date: Wed, 9 Jun 2010 14:50:27 +0100
Message-ID: <AANLkTikzCzig2SyG_J1dtGPDvDVCLYZyZM_TBj9fxNgm@mail.gmail.com>
Subject: Re: 'cp' utility bug when <dest-name>.exe file exist.
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Jun 9, 2010 at 12:39, Andy Koppe wrote:
> On 9 June 2010 10:48, Julio Costa wrote:
>>>>And this is where my head got reeeally spinning... can anyone, please,
>>>>explain the reason to why this .exe magic exists, anyway?
>
> As far as I understand it, the original reason for it was that Windows
> 9x always required it. Of course Cygwin 1.7 no longer supports 9x, so
> from that perspective, it's no longer needed.
>

That's how I see it too.

>
>>> [Running in cmd.exe]
>> The point is, that *is not* a reason, because it is easily fixed by
>> "set PATHEXE=3D%PATHEXE%:.".
>
> That's a nice one. I certainly didn't know about that.
>
> Explorer still needs the .exe though.

Nope also.
Try this at a cmd.exe:

D:\ETC\Tools>assoc .=3DMyDefaultLauncher
.=3DMyDefaultLauncher

D:\ETC\Tools>ftype MyDefaultLauncher=3D%COMSPEC% /C "%1"
MyDefaultLauncher=3DC:\WINDOWS\system32\cmd.exe /C "%1"

D:\ETC\Tools>regtool set "/user/Software/Microsoft/Command
Processor/AutoRun" 'set PATHEXT=3D%PATHEXT%;.'

Now, try this in a Windows explorer: rename joe.exe (or vi.exe, or
whatever...) to remove the extension.
Now double-click it, and "voil=C3=A1".

DISCLAIMER: This is only a proof-of-concept. There are clearly some
rough edges to remove, but this should give you the general idea...

> More importantly, a lot of build scripts likely depend on the .exe being =
added automatically.
>

Hm. Maybe they shouldn't.
After all, the .exe magic has been around also so that kind of scripts
DIDN'T needed that kind of expectations :)

> The frequent questions and problems around this issue do make me
> wonder though whether it wouldn't indeed be better to drop the .exe
> magic completely, deal with the ensuing pain, but eventually be done
> with it.
>

+1 from me.


--=20
___________
Julio Costa

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

