answersLogoWhite

0

This depends upon the operating system. In Windows, the operating system determines if a file is executable by the file extension.

There are three windows executable file extensions that I know of: .exe, .com and .scr

.com is the simplest executable file: it's contents are simply copied into memory and execution begins at the beginning of the file in memory. Because of this simplicity, .com files may be no larger than a little under 64KiB, and they can only be loaded into memory at address 0x0100.

.exe files are more complicated: they are split up into multiple segments. The file contains a header, several tables, a .text section which contains the actual executable instructions, a .data section which contains any static or global data, and more. If the file does not match a specific structure, then the operating system will refuse to execute the file.

Thus, in Windows, in order for a file to be executable, it must have the proper file extension, and it must match a specific format for that file extension.

User Avatar

Wiki User

14y ago

What else can I help you with?