←back to thread

297 points rbanffy | 1 comments | | HN request time: 0.202s | source
Show context
mmastrac ◴[] No.44006007[source]
Remember the good old days of editing PIF (Program Information Files) files [⁂]? Ah yeah.

Googling a bit, it looks like a lot of this lore has just been lost. I don't know if there are modern explanations of PIF files kicking around.

⁂ I realize this is an ATM machine phrasing, but we called them PIF files in the day.

replies(6): >>44006802 #>>44007670 #>>44008347 #>>44009953 #>>44010798 #>>44011336 #
fredoralive ◴[] No.44009953[source]
It’s basically just configuration data for MS-DOS apps running under Windows (or some over MS-DOS multitaskers). Stuff like EMS and XMS memory amounts, various config options etc.

Fun fact: under the hood, PIF files are sent to the same ShellExecute function as EXEs, and if you have an EXE with a PIF extension, it runs the EXE code as normal.

Funnier fact: In Windows 95 and onwards, the UI presents PIFs as a special case of shortcuts, and as with LNK files, Windows always hides (hid?) the extension, even if you have “always show extensions” on. When I get home, I’ll have to check if Windows 11 still has this behaviour…

Edit: Yeah, creating a copy of calc.exe in my ~/Documents folder and renaming it calc.docx.pif does result in a working calculator file that presents gives its name as "calc.docx", albeit with a "shortcut to generic file" icon and a type of "Shortcut to MS-DOS Program" despite the fact that I can't think of any legitimate reason to do anything with a real PIF file on Windows 11 (24H2).

replies(1): >>44012403 #
1. hulitu ◴[] No.44012403[source]
Even funier fact: the fact that Windows treated pif and lnk files as executable lead to a lot of exploits.