none
What are exactly executable files ? RRS feed

  • Question

  •  Hi,

    can you tell me what exactly is an executable file ?

    Files with .exe extension, or .dll extensions etc are called executable files.

    Means they are able to execute or run and give input/output.

    But what about .mp3, .txt, .doc etc files ?Are they too executable files ?

    Friday, December 24, 2010 4:51 AM

Answers

  • Hi Bootstrap1,

     

    In short the basic difference in a file having .dll extension and a file having .exe extension is the presence of Main method. If a .dll or .exe file contains the address of Main entry point method it will be executed itself. It doesn't contains entry point, then it can only be consumed by another program. It cannot load itself.

    Conceptually both are binary files and in .Net world both are executable.  When you double click a file having any extension, windows process loaded identify what is required to run it. To understand all the internals of loading a file is beyond the scope of this thread.

    Hope it helps you.

    Thanks,


    Muhammad Nadeem BrickRed Technology India
    Thursday, January 20, 2011 1:13 PM

All replies

  • Hi,

    If you want to know exactly what resides in the exe file, please read Matt Pietrek article: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx . It's quite old but still accurate since PE format is very extensible. 

    .mp3, .txt etc. files are not executable - and windows shell loads the application that can read files with these extensions (http://support.microsoft.com/kb/307859).

    Hope it answers your questions,

    Best,

    Sebastian

    Friday, December 24, 2010 8:56 AM
  • Wait,i want to know first about executable files.History and Geography of executable files . And not about files having  .exe extensions. Above you have said exe files .Do you mean executable files or you mean those files having .exe extension ?

    Please clearify this.

     

    Friday, December 24, 2010 9:04 AM
  • Sorry consept,

    I have already reached that article but it is bit difficult to understand for me. That created some confusions that's why i am writing here. Can you please provide some easily readible resources on this topic ?


    Thanks.
    Friday, December 24, 2010 9:13 AM
  • DLL files and EXE files use the same format and are generally called PE files (which stands for Portable Executable) - windows recognizes file types based on their extensions so files with .exe extension are for me executable files (of course they might be invalid but it's a different story). I don't think if anyone here will elaborate on EXE/DLL history and geography - if you want to know more details maybe start with External Links from http://en.wikipedia.org/wiki/Portable_Executable .
    Friday, December 24, 2010 9:19 AM
  • Hi bootstrap1,

    I'm writing to check the issue status, does consept's reply help? please feel free to let us know if you have any concern.


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 27, 2010 2:06 AM
  • Hi,

    If you want to know exactly what resides in the exe file, please read Matt Pietrek article: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx . It's quite old but still accurate since PE format is very extensible. 

    .mp3, .txt etc. files are not executable - and windows shell loads the application that can read files with these extensions (http://support.microsoft.com/kb/307859).

    Hope it answers your questions,

    Best,

    Sebastian


    In order to execute files like doc, mp3 windows shell loads the corresponding application to run it.Can we say that doc , mp3, etc files are executed in there respective application software ?

    Ok , then to execute .exe, .dll files what happens ? Which application is loaded to execute executable files ? In case of .NET Framework CLR is loaded to execute these executables but if executable files are not CLR complaint then ?Then which application will gets loaded ?


    Thanks.
    Monday, December 27, 2010 3:05 AM
  • Files having .exe extension contain Type.

    It depends on the compiler switch, the user provides to compile its code.Depending on the switch compiler can produce dll or exe file.

    So both dll and .exe files contain Types.

    Both are referred as Portable Executable because :

    Portable-file can be run on any machine that contains the required runtime.so named portable.

    Executable-Be it DLL or EXE both ultimately are  executed in the lap  of Runtime.    :-)

     


    Thanks.
    Sunday, January 2, 2011 4:22 PM
  • Hi consepts,

    can you tell which application is loaded to execute exe files that contain unmanaged codes? Like exe files produced from Unmanaged C++ .


    Thanks.
    Tuesday, January 18, 2011 6:06 AM
  • Hi,

    have a look here:

    http://etutorials.org/Programming/.NET+Framework+Essentials/Chapter+2.+The+Common+Language+Runtime/2.2+CLR+Executables/

    and here:

    http://social.msdn.microsoft.com/forums/en-US/netfxsetup/thread/47eda721-41f8-46b7-9f1c-d9821d251882

    As you can see one way of identifying managed assembly is to check for CLR Header. You can use

    dumpbin /clrheader <exe file> 

    to find it. 

     

    Tuesday, January 18, 2011 8:25 AM
  • Hi Bootstrap1,

     

    In short the basic difference in a file having .dll extension and a file having .exe extension is the presence of Main method. If a .dll or .exe file contains the address of Main entry point method it will be executed itself. It doesn't contains entry point, then it can only be consumed by another program. It cannot load itself.

    Conceptually both are binary files and in .Net world both are executable.  When you double click a file having any extension, windows process loaded identify what is required to run it. To understand all the internals of loading a file is beyond the scope of this thread.

    Hope it helps you.

    Thanks,


    Muhammad Nadeem BrickRed Technology India
    Thursday, January 20, 2011 1:13 PM
  • Simply put, .mp3, .txt, .doc are also executables but the thing is they cannot execute on their own. They need other programs to execute them. (The moon gives light but it borrows it from Sun. But we think moon is giving light)

    On the other hand, .exe executes on its own (Like sun giving light on it own)

    :)

    • Proposed as answer by Manjula.C Thursday, December 20, 2012 6:02 AM
    Saturday, January 22, 2011 5:39 PM
  • Simply put, .mp3, .txt, .doc are also executables but the thing is they cannot execute on their own. They need other programs to execute them. (The moon gives light but it borrows it from Sun. But we think moon is giving light)

    On the other hand, .exe executes on its own (Like sun giving light on it own)

    :)

    But in Constrast to moon[Highlighted above we think moon is giving light but in application we cannot invoke .dll only and dll can be used for .exe we can think like this moon is an .exe gives light borrows from sun ] we cannot run application from .dll extension.We have to run the application having .exe only

    EXE

    Executable file is a set of files grouped together which runs when user runs the program.In windows operating system any program which is meant to execute or run is in exe format.Once the user clicks on the exe file the program runs.

    DLL

    DLL files are dynamic library files which are loaded dynamically as needed by a exe file.A single dll file can be made use by multiple programs.As of the program needs these files loaded and used in run time.

    Warm Regds


    • Edited by Manjula.C Wednesday, December 19, 2012 2:12 PM
    Wednesday, December 19, 2012 1:05 PM
  • Hi Manjula.C,
    i think there is some confusion. Moon is compared with files having extensions like .mp3,.wmv, .doc etc. These do not execute(give light) of there own, they take help of .NET runtime(Sun) to give output(light).
    If Adavesh is reading this post, please clearify this, what he meant in his age old post which was raised by me that time, but i don't know why they flagged me as Banned!

    One good question is equivalent to ten best answers.

    • Proposed as answer by Manjula.C Thursday, December 20, 2012 6:02 AM
    Wednesday, December 19, 2012 1:53 PM
  • Hi Manjula.C,
    i think there is some confusion. Moon is compared with files having extensions like .mp3,.wmv, .doc etc. These do not execute(give light) of there own, they take help of .NET runtime(Sun) to give output(light).
    If Adavesh is reading this post, please clearify this, what he meant in his age old post which was raised by me that time, but i don't know why they flagged me as Banned!

    One good question is equivalent to ten best answers.


    I am always here :) And yes.. you understood me better than anyone else !

    Please mark this post as answer if it solved your problem. Happy Programming!

    Wednesday, December 19, 2012 5:06 PM
  • Hi Manjula.C,
    i think there is some confusion. Moon is compared with files having extensions like .mp3,.wmv, .doc etc. These do not execute(give light) of there own, they take help of .NET runtime(Sun) to give output(light).
    If Adavesh is reading this post, please clearify this, what he meant in his age old post which was raised by me that time, but i don't know why they flagged me as Banned!

    One good question is equivalent to ten best answers.

      Hi bootstrap2,

    Thanks for reply and clear explanation regarding this

    Thursday, December 20, 2012 4:32 AM
  • Hi Manjula.C,
    i think there is some confusion. Moon is compared with files having extensions like .mp3,.wmv, .doc etc. These do not execute(give light) of there own, they take help of .NET runtime(Sun) to give output(light).
    If Adavesh is reading this post, please clearify this, what he meant in his age old post which was raised by me that time, but i don't know why they flagged me as Banned!


    One good question is equivalent to ten best answers.


    I am always here :) And yes.. you understood me better than anyone else !

    Please mark this post as answer if it solved your problem. Happy Programming!

    Hi Adavesh,

    Sorry for the confusion caused by me any how thanks for reply and the way i understood is wrong i guess  or the way u expressed in the last post answer[but wasn't cleared while reading but better understood by bootstrap2 last post ].Any how thanks for clarification !!!!.

    Cheers,


    • Edited by Manjula.C Thursday, December 20, 2012 4:40 AM
    Thursday, December 20, 2012 4:36 AM