[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

BeeJ

7/9/2012 10:02:00 PM

I want to figure out what types are true Windows Executables.
Googling confuses me since they keep mentioning .XLS and .DOC etc which
are really associations.

So far I think that true executables, i.e. Windows built-in
executables, are BAT COM EXE LNK
Maybe CMD and MSI ?

Where is this defined?

--
Present and unaccounted for.


9 Answers

Mayayana

7/10/2012 1:41:00 AM

0

BAT - text
COM - 16-bit executable
EXE, DLL, SCR, OCX - 32 bit executable. "portable executable".
LNK - a glorified text file.
CMD - text. same as BAT?
MSI - structured storage file, like DOC.

You might want to look into PE file format. You might
also need to define what "executable" means for you.
You seem to define it as any file that results in something
dynamic happening when it's clicked. BAT, VBS, JS, MSI all
fit that description, but they're not normally thought of
as executable.


BeeJ

7/10/2012 2:44:00 AM

0

Mayayana was thinking very hard :
> BAT - text
> COM - 16-bit executable
> EXE, DLL, SCR, OCX - 32 bit executable. "portable executable".
> LNK - a glorified text file.
> CMD - text. same as BAT?
> MSI - structured storage file, like DOC.
>
> You might want to look into PE file format. You might
> also need to define what "executable" means for you.
> You seem to define it as any file that results in something
> dynamic happening when it's clicked. BAT, VBS, JS, MSI all
> fit that description, but they're not normally thought of
> as executable.

Those built-ins that when double-clicked start something running.

Not sure if a JS or VBS would be considered built-in like COM, EXE, LNK
and BAT. Sort of a gray area to me. That is why I was looking for a
clear definition from MS if something like that exists.

Again, associations that are set like .BAS or .DOC I do not consider as
built-in but I do handle them as associations.


mm

7/10/2012 6:59:00 AM

0


"BeeJ" <nospam@spamnot.com> escribió en el mensaje
news:jtg4tt$mv3$1@dont-email.me...
> Mayayana was thinking very hard :
>> BAT - text
>> COM - 16-bit executable
>> EXE, DLL, SCR, OCX - 32 bit executable. "portable executable".
>> LNK - a glorified text file.
>> CMD - text. same as BAT?
>> MSI - structured storage file, like DOC.
>>
>> You might want to look into PE file format. You might
>> also need to define what "executable" means for you.
>> You seem to define it as any file that results in something
>> dynamic happening when it's clicked. BAT, VBS, JS, MSI all
>> fit that description, but they're not normally thought of
>> as executable.
>
> Those built-ins that when double-clicked start something running.
>
> Not sure if a JS or VBS would be considered built-in like COM, EXE, LNK
> and BAT. Sort of a gray area to me. That is why I was looking for a
> clear definition from MS if something like that exists.
>
> Again, associations that are set like .BAS or .DOC I do not consider as
> built-in but I do handle them as associations.

It's a problem to figure a definition. If you say "files that have machine
code inside", you would leave the *.bat and *.lnk, if you say "files that
make something to happen without calling other file", almost no file will
meet that description because the exes usually calls Dlls and other files.


Dee Earley

7/10/2012 9:20:00 AM

0

On 09/07/2012 23:02, BeeJ wrote:
> I want to figure out what types are true Windows Executables.
> Googling confuses me since they keep mentioning .XLS and .DOC etc which
> are really associations.
>
> So far I think that true executables, i.e. Windows built-in executables,
> are BAT COM EXE LNK
> Maybe CMD and MSI ?
>
> Where is this defined?

It depends on your definition.
If you mean "file type that the Windows Process loader handles by
default" then from the CreateProcess() MSDN page:
> This module can be a Windows-based application. It can be some other
> type of module (for example, MS-DOS or OS/2) if the appropriate
> subsystem is available on the local computer.

This normally includes .exe, .com, but explicitly calls out .bat as not
included despite it being handled natively as it's open verb is "%1".
..lnk and .msi files are most definitely NOT executables.

If you mean "any file that can be result in an executable running", this
could be many different file types, excluding some that use DDE, etc to
talk to an existing process

What exactly are you trying to find out for what purposes?

--
Deanna Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the
group.)


Mayayana

7/10/2012 12:59:00 PM

0

| Those built-ins that when double-clicked start something running.
|

By built-in I gather that you mean default file
associations that come with Windows. By that
definition TXT is "built-in", and when you click
it Notepad runs.

| Not sure if a JS or VBS would be considered built-in like COM, EXE, LNK
| and BAT. Sort of a gray area to me. That is why I was looking for a
| clear definition from MS if something like that exists.
|

JS, VBS, BAT are all interpreted text. They operate
like executables, but their code is run by an interpreter.
Perhaps the DOS/BAT interpreter is more venerable
and "built-in" than Windows Script Host, but that doesn't
matter in practice.

The reason I suggested looking at PE file format is
because that gives you a view of executable operation.
You're looking at file types based on the results when
clicked. I think it would explain more if you looked at
them in terms of content by looking at them in a hex
editor.

| Again, associations that are set like .BAS or .DOC I do not consider as
| built-in but I do handle them as associations.
|

They're all extensions. EXE is an extension. If you rename
it to TXT it won't run. So they're all built-in in the sense
that they all tell Windows how to handle a file via keys under
HKCR.

TXT is plain text. HTML is plain text. BAT is plain text.
BAS is plain text. The difference between those is only
the file extension.

Deanna's point that the shell handler for BAT is %1, like
an EXE, is interesting. So maybe you mean it's built-in in
that sense, having no obvious handler? That would seem
to indicate that a BAT contains native code. But of course
it doesn't. It contains text and therefore must be interpreted.
I'm not sure, but I think the answer to that riddle may be in
the PersistentHandler key. Maybe it dates back to the days
when the system itself was a DOS interpreter. Or perhaps
this is a mystery for Raymond Chen (or Ralph :) to explain.
In any case, Microsoft is very consistent about being
inconsistent in terms of following their own rules. Nowhere
do I see that more than in the Registry.


Karl E. Peterson

7/10/2012 6:38:00 PM

0

Deanna Earley formulated on Tuesday :
> On 09/07/2012 23:02, BeeJ wrote:
>> I want to figure out what types are true Windows Executables.
>> Googling confuses me since they keep mentioning .XLS and .DOC etc which
>> are really associations.
>>
>> So far I think that true executables, i.e. Windows built-in executables,
>> are BAT COM EXE LNK
>> Maybe CMD and MSI ?
>>
>> Where is this defined?

In the PATHEXT environment variable, believe it or not. That includes
the extensions Windows will use, in the order given, to search for an
"executable" by its basename only. Which means, of course, that this
varies from machine to machine.

If the PATHEXT e-var doesn't exist, the default used by Windows
immemorial is:

".COM;.EXE;.BAT;.CMD"

http://visualstudiomagazine.com/articles/2009/09/22/finding-the-right-tool-for-th...

Files that have other extensions can still be "executed" at a command
line, but they will be passed to their associated executable. Which is
all really a long way of saying what everyone else in this thread is
saying -- why do you ask?

--
..NET: It's About Trust!
http://vfre...


Karl E. Peterson

7/10/2012 6:39:00 PM

0

Whoops! The below was really in response to Beej, but got hung off a
post by Deanna... Sorry 'bout that.


Karl E. Peterson submitted this idea :
> Deanna Earley formulated on Tuesday :
>> On 09/07/2012 23:02, BeeJ wrote:
>>> I want to figure out what types are true Windows Executables.
>>> Googling confuses me since they keep mentioning .XLS and .DOC etc which
>>> are really associations.
>>>
>>> So far I think that true executables, i.e. Windows built-in executables,
>>> are BAT COM EXE LNK
>>> Maybe CMD and MSI ?
>>>
>>> Where is this defined?
>
> In the PATHEXT environment variable, believe it or not. That includes the
> extensions Windows will use, in the order given, to search for an
> "executable" by its basename only. Which means, of course, that this varies
> from machine to machine.
>
> If the PATHEXT e-var doesn't exist, the default used by Windows immemorial
> is:
>
> ".COM;.EXE;.BAT;.CMD"
>
> http://visualstudiomagazine.com/articles/2009/09/22/finding-the-right-tool-for-th...
>
> Files that have other extensions can still be "executed" at a command line,
> but they will be passed to their associated executable. Which is all really
> a long way of saying what everyone else in this thread is saying -- why do
> you ask?

--
..NET: It's About Trust!
http://vfre...


BeeJ

7/10/2012 10:14:00 PM

0

BeeJ formulated on Monday :
> I want to figure out what types are true Windows Executables.
> Googling confuses me since they keep mentioning .XLS and .DOC etc which are
> really associations.
>
> So far I think that true executables, i.e. Windows built-in executables, are
> BAT COM EXE LNK
> Maybe CMD and MSI ?
>
> Where is this defined?

Trying to make a helper app starter.
Associations are nice but I want to possibly start a .DOC or .XLS or
..JPG or etc with something other than what it is associated with by
doing a simple drag-drop on to my VB6 app. So I just wanted to sort
out what will start as a Windows "built-in" (say .COM, .EXE ...), an
association or other type of file that might start up with ShellExecute
etc an to not start stuff like .VBS or .JS. Just trying to be smarter
than using error handling to sort it out.

Info provide so far by all is good enough for me to make some good
choices on filtering.
Thanks all.

--
Present and unaccounted for.


ObiWan

7/11/2012 3:15:00 PM

0


> Trying to make a helper app starter.
> Associations are nice but I want to possibly start a .DOC or .XLS or

well... obtain the full lists from "assoc" and "ftype" (or either do
the same by calling some APIs) and then use such lists to decide how to
deal with a given file