Subject: Re: Default linker output filename
From: [email-masked] (Carl J R Johansson)

9 Nov 1996 17:24:07 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sender: [email-masked]
Original-To: [email-masked]
Original-cc: [email-masked]
Original-Sender: [email-masked]

> However, if the system were able to mark something as executable, there
> wouldn't be any point in changing the extension to .exe. Worse, I think
> (?) the same is true for NT, an ostensibly *real* OS.
> 

I found that this _is_ actually possible with a small registry hack (on
W95). Just create a new key called '.out' (or whatever) under 
HKEY_CLASSES_ROOT and copy the values for .exe there (Default : 
'exefile', Content Type : 'application/x-msdownload').

I found that when I renamed DOS applications they wouldn't work (complained
about not finding the file), but that should be totally irrelevant to
gnu-win32. I also found that I could not run any of them from a DOS window, 
that maybe makes them already less useful for gnu-win32? Bash accepted them
though, and double-clicking (Explorer) worked. 

To get the 'executable' icon as well I had to create a separate key called
'UnixFile' (or whatever) and refer to it instead of 'exefile' in '.out'.  
Then I copied exefiles' values to UnixFile but modified 'DefaultIcon' to
'D:\WINDOWS\SYSTEM\shell32.dll,2' (substitute path as appropriate). 

It wasn't as easy with extensionless files though, it is possible to have a
key called '.' but when I modify it as above and try to execute them I 
get 'A required DLL file, *the executable*.EXE, was not found' (in bash 
I got the same message). Maybe some additional hacking would remove this 
too (in the copies of 'exefiles' values?) but this is as far as I want to 
go. Thirdly a key called '*' can be created, on my system it was already 
in use by Winzip so I didn't want to mess with it. I've seen some extensive 
books on the registry, but don't own one. 

I have no idea whether this might have some unexpected side-effects, but to
me it seems pretty safe (of course the fact that the file did not 
automatically get the 'executable' icon might be a bit suspect, executables 
are perhaps dealt with somewhere else too?).

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