Inspired by today's DailyWTF article.
The author claims that a file C:\Program.exe would be executed when clicking on a shortcut to, for example, C:\Program Files\Doom 2\doom2.exe -nomusic.
Supposedly, Windows first attempts to invoke C:\Program with the arguments Files\Doom 2/doom2.exe -nomusic.
If there is no C:\Program.exe, it then tries C:\Program Files\Doom with the arguments 2/doom2.exe -nomusic.
And if there is no C:\Program Files\Doom.exe\, it finally tries C:\Program Files\Doom 2\doom2.exe -nomusic and succeeds.
This sounds like complete nonsense to me. I can't believe it ever worked this way. A commenter puts it well:
I find it hard to believe that any released version of Windows ever did the trial-and-error approach described by OP.
I absolutely believe that a released version of Windows had brain-dead behavior as a default. I have experienced it firsthand many, many times.
What I don't believe is that a released version of Windows had this brain-dead behavior, as described by the article. It's too huge a security flaw to have gone by unnoticed until some random Daily WTF submission uncovered it, at least a decade later since it would have had to be a version of Windows that predated XP.
Edit for clarity: Here's how I tested this myself.
- Copy notepad.exe to C:\program.exe
- Run C:\program files\Internet explorer\iexplore.exe
- Notepad opens. This is expected because it finds something called C:\program
- Move progam.exe to C:\program files\Internet.exe
- Run C:\program files\Internet explorer\iexplore.exe
According to the author of the article (and this article from Microsoft), notepad should still open. But it doesn't, the command fails with this message:
C:\program is not recognized as an internal or external command, operable program or batch file.
Again, I am not debating the article's claim that C:\program would be invoked. I am debating that Windows recursively tries every directory until it hits a match.
So, did any version of Windows ever work this way?