Lehet-e az EXE fájlkiterjesztéseket mindig a COM-vel helyettesíteni?

Tartalomjegyzék:

Lehet-e az EXE fájlkiterjesztéseket mindig a COM-vel helyettesíteni?
Lehet-e az EXE fájlkiterjesztéseket mindig a COM-vel helyettesíteni?

Videó: Lehet-e az EXE fájlkiterjesztéseket mindig a COM-vel helyettesíteni?

Videó: Lehet-e az EXE fájlkiterjesztéseket mindig a COM-vel helyettesíteni?
Videó: 5 Keys to Leading Great Conference Calls (That Are Not Awful) [2018] - YouTube 2024, Április
Anonim
Ha valaha is hallottál arról, hogy a fájl kiterjesztése az EXE-ről a COM-re változik, akkor talán elgondolkodtál, vajon csak néhány ritka fájllal dolgozik-e, vagy csaknem minden EXE-fájlon dolgozik. A mai SuperUser Q & A hozzászólás a kíváncsi olvasó kérdéseire ad választ.
Ha valaha is hallottál arról, hogy a fájl kiterjesztése az EXE-ről a COM-re változik, akkor talán elgondolkodtál, vajon csak néhány ritka fájllal dolgozik-e, vagy csaknem minden EXE-fájlon dolgozik. A mai SuperUser Q & A hozzászólás a kíváncsi olvasó kérdéseire ad választ.

A mai Kérdések és válaszok munkamenetét a SuperUser - a Stack Exchange, a Q & A weboldalak közösség által irányított csoportosulásának részlegével - köszönheti.

A kérdés

A SuperUser olvasó Royi Namir tudni akarja, hogy az EXE fájlkiterjesztések mindig helyettesíthetők-e a COM-kkel ?:

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.

Lehet-e az EXE fájlkiterjesztéseket mindig a COM-k helyettesíteni?

A válasz

A Math Man a SuperUser munkatársa számára a válasz:

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]

Van valami a magyarázathoz? Hangzik ki a megjegyzésekben. Szeretne többet válaszolni a többi technikus-tudós Stack Exchange felhasználóiról? Nézze meg a teljes vitafonalat itt.

Ajánlott: