Kas EXE-failide laiendusi saab alati asendada COM-ga?

Sisukord:

Kas EXE-failide laiendusi saab alati asendada COM-ga?
Kas EXE-failide laiendusi saab alati asendada COM-ga?

Video: Kas EXE-failide laiendusi saab alati asendada COM-ga?

Video: Kas EXE-failide laiendusi saab alati asendada COM-ga?
Video: Make Conference Call on iPhone! [How To] - YouTube 2024, Märts
Anonim
Kui olete kunagi kuulnud faili laiendi muutmisest EXE-st COM-le, võite mõelda, kas see töötab ainult mõne haruldase failiga või kui see töötab peaaegu kõigi teie EXE-failidega. Tänane SuperUseri Q & A postitus on vastuseks uudishimulikule lugeja küsimusele.
Kui olete kunagi kuulnud faili laiendi muutmisest EXE-st COM-le, võite mõelda, kas see töötab ainult mõne haruldase failiga või kui see töötab peaaegu kõigi teie EXE-failidega. Tänane SuperUseri Q & A postitus on vastuseks uudishimulikule lugeja küsimusele.

Tänane küsimuste ja vastuste seanss jõuab meile viisakalt SuperUserini - Stack Exchange'i ja kogukonnapõhiste Q & A veebisaitide rühmitusse.

Küsimus

SuperUseri lugeja Royi Namir tahab teada, kas EXE-failide laiendusi saab alati asendada COM-idega ?:

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.

Kas EXE-failide laiendid on alati asendatud COM-idega?

Vastus

SuperUseri kaasautor Math Man on meile vastus:

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]

Kas teil on seletamiseks midagi lisada? Helistage kommentaarides. Kas soovite lugeda rohkem vastuseid teistelt tech-savvy Stack Exchange'i kasutajatelt? Tutvu täieliku arutelu teemaga siit.

Soovitan: