▲ | b800h 6 hours ago | |||||||||||||||||||||||||
It seems incredible to me that Microsoft would alter the execution of programs based on the filename of the executable. For all we know, there was another game with the same filename and this game has been caught in the crossfire. This is crazy stuff. | ||||||||||||||||||||||||||
▲ | Arnavion 6 hours ago | parent | next [-] | |||||||||||||||||||||||||
Doing things based on exe filename is quite standard in Windows land. There's literally a registry key called "Image File Execution Options" where you can add a subkey with the name of the exe and then add values to control things like what interpreter to launch it under by default. Similar to Linux's binfmt registration, but based on filename rather than magic bytes. Very useful for attaching debuggers to specific subprocesses that you can't launch manually, as long as the process is named sufficiently uniquely. https://techcommunity.microsoft.com/blog/askperf/two-minute-... | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | IAmLiterallyAB 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||
I don't know if it was filename exactly, but a similar story: > Jon Ross, who wrote the original version of SimCity for Windows 3.x, told me that he accidentally left a bug in SimCity where he read memory that he had just freed. Yep. It worked fine on Windows 3.x, because the memory never went anywhere. Here’s the amazing part: On beta versions of Windows 95, SimCity wasn’t working in testing. Microsoft tracked down the bug and added specific code to Windows 95 that looks for SimCity. If it finds SimCity running, it runs the memory allocator in a special mode that doesn’t free memory right away. That’s the kind of obsession with backward compatibility that made people willing to upgrade to Windows 95. https://www.joelonsoftware.com/2000/05/24/strategy-letter-ii... | ||||||||||||||||||||||||||
▲ | BearOso 4 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||
It's not limited to Microsoft. Nvidia and AMD Windows drivers also do the same. Even mesa has a few lists of program-specific flags: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/uti... | ||||||||||||||||||||||||||
▲ | saagarjha 4 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||
This is common across all platforms that have a backwards compatibility story | ||||||||||||||||||||||||||
▲ | ZeWaka 3 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||
Quite a lot of this in proton, except it's by steam appid: https://github.com/ValveSoftware/Proton/blob/proton_10.0/pro... | ||||||||||||||||||||||||||
▲ | asveikau 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||
There is a ton of this in the app compatibility support. It comes from the era in which it would not be expected for a vendor to patch a program they already shipped. So, you know, they enable the hacks that keep SimCity working if they notice you're running SimCity. And the SimCity CD-Rom would never see an update. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | meinersbur 3 hours ago | parent | prev [-] | |||||||||||||||||||||||||
Changing execution behaviour based on filename is common in Linux environments too. Some examples: 1. BusyBox is a single executable that executes different commands based on which symlink was used to call it 2. Bash puts itself into compatibility mode if invoked as "sh" 3. "ping" can be invoked as "ping4" or "ping6" 4. Some of git's subcommands are symlinks back to the main executable 5. Clang switches to C++ mode if invoked as "clang++" 6. AppArmor profiles activate on file paths | ||||||||||||||||||||||||||
|