Voiko EXE-tiedostojen laajennuksia korvata aina COM: n avulla?

Sisällysluettelo:

Voiko EXE-tiedostojen laajennuksia korvata aina COM: n avulla?
Voiko EXE-tiedostojen laajennuksia korvata aina COM: n avulla?

Video: Voiko EXE-tiedostojen laajennuksia korvata aina COM: n avulla?

Video: Voiko EXE-tiedostojen laajennuksia korvata aina COM: n avulla?
Video: ASMR SIRI 🍏🤪 Iphone Виртуальный Ассистент Сири АСМР / Virtual Assistant - YouTube 2024, Huhtikuu
Anonim
Jos olet joskus kuullut tiedostojen laajennuksen EXE: sta COM: ksi, olet ehkä ihmetellyt, että se pystyi vain tekemään muutamia harvinaisia tiedostoja tai toimisi lähes millä tahansa EXE-tiedostolla. Tänään SuperUser Q & A -postilla on vastaus utelias lukijan kysymykseen.
Jos olet joskus kuullut tiedostojen laajennuksen EXE: sta COM: ksi, olet ehkä ihmetellyt, että se pystyi vain tekemään muutamia harvinaisia tiedostoja tai toimisi lähes millä tahansa EXE-tiedostolla. Tänään SuperUser Q & A -postilla on vastaus utelias lukijan kysymykseen.

Tämän päivän kysymys- ja vastausistunto tulee meihin SuperUserin hyväksi - Stack Exchangein alaosasto, joka on yhteisöllinen Q & A-sivustojen ryhmittely.

Kysymys

SuperUser-lukija Royi Namir haluaa tietää, voivatko EXE-tiedostopäätteet aina korvata COM-versioilla ?:

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.

Voiko EXE-tiedostojen laajennukset aina korvata COM-tiedostoilla?

Vastaus

SuperUser-avustaja Math Manilla on vastaus meille:

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]

Onko jokin asia lisättävä selitykseen? Kuulkaa kommentit. Haluatko lukea lisää vastauksia muilta tech-tajuilta Stack Exchange-käyttäjiltä? Katso koko keskusteluketju täältä.

Suositeltava: