Vai EXE failu paplašinājumi vienmēr var aizstāt ar COM?

Satura rādītājs:

Vai EXE failu paplašinājumi vienmēr var aizstāt ar COM?
Vai EXE failu paplašinājumi vienmēr var aizstāt ar COM?

Video: Vai EXE failu paplašinājumi vienmēr var aizstāt ar COM?

Video: Vai EXE failu paplašinājumi vienmēr var aizstāt ar COM?
Video: Vebinārs “Digitālo rīku izmantošana darbā ar jaunatni” - YouTube 2024, Aprīlis
Anonim
Ja jūs kādreiz esat dzirdējuši par faila paplašinājuma maiņu no EXE uz COM, iespējams, jūs domājat, vai tā var strādāt tikai ar dažiem retiem failiem vai arī tas darbosies ar gandrīz jebkuru EXE failu. Šodienas SuperUser Q & A ziņai ir atbilde uz ziņkārīgo lasītāja jautājumu.
Ja jūs kādreiz esat dzirdējuši par faila paplašinājuma maiņu no EXE uz COM, iespējams, jūs domājat, vai tā var strādāt tikai ar dažiem retiem failiem vai arī tas darbosies ar gandrīz jebkuru EXE failu. Šodienas SuperUser Q & A ziņai ir atbilde uz ziņkārīgo lasītāja jautājumu.

Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.

Jautājums

SuperUser lasītājs Royi Namir vēlas uzzināt, vai EXE failu paplašinājumus vienmēr var aizstāt ar COM tiem ?:

Our antivirus software refused to let me copy an EXE file into my Windows 7 startup folder (calc.exe, for example) since it is an EXE file. I then changed the file extension from EXE to COM on the file and was able to easily copy it into the folder without problems (very professional).

And of course, calc.com works just as well as calc.exe, which got me to wondering. When will a program with an EXE file extension not work when the extension is changed to COM? Almost every EXE file that I have checked has worked. I would love to know the reasons for the “why and why not” of the matter.

Vai EXE failu paplašinājumi vienmēr var tikt aizstāti ar COM tiem?

Atbilde

SuperUser atbalstītājs Math Man ir atbilde mums:

It has to do with the internal format of the file. Originally, COM files were simple memory images and EXE files had lots of headers associated with them. As a result, you could not rename them.

As time went on and they had to make things backward compatible, Microsoft changed it so that the operating system looks at the file itself to determine what type of file it is instead of the extension. As a result, when you run the renamed file, Windows ignores the extension entirely.

Visit the links below for a more detailed and extensive explanation.

What is the Difference Between.com,.exe, and.bat? [StackOverflow]

What’s the difference between the COM and EXE extensions? [Microsoft Developer Blog]

Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.

Ieteicams: