5 ms·
Laughs in C:\PROGRA~1\ (try it, still works in Windows 10)
by 323 5y ago
Laughs in C:\PROGRA~1\ (try it, still works in Windows 10)
- Someone 5y agoApart from what others mentioned, that can only work if the file system automatically creates 8.3 names. NTFS does not necessarily do that (https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-behavior https://docs.microsoft.com/en-us/windows-server/administrati...)
- the_mitsuhiko 5y agoThere is no guarantee that the short name has that. In fact on a lot of German Windows installations it was PROGRA~2.
- 323 5y agoWell, on my disk PROGRA~1 is "Program Files" and PROGRA~2 is "Program Files (x86)", so still works :)
- TowerTall 5y agoAnd on mine (Windows 11) "PROGRA~3" is "ProgramData"
- floatingatoll 5y agoThat order is not guaranteed consistent across installations, however.
- marginalia_nu 5y agoI wonder if code to this effect has ever been written before for (int i = 1; i < INT_MAX; i++) { if (dirExists("C:\\PROGRA~%d\\ProgramName", i)) {
- gmfawcett 5y agoAnd that, children, is when marginalia_nu unlocked the seventh circle of the inferno. Tomorrow we'll read the story of how our new demon overlords forced us all back to Windows 3.1.
- jagged-chisel 5y agoWin 3.1? on DOS 6.22? Actually, this sounds like heaven. Just don't put it on the public 'tubes.
- floatingatoll 5y agoOr do. Can’t hack a Mac Classic web server!
- marginalia_nu 5y agoGot to tweak HIMEM.SYS before the slumbering one can be awakened.
- aksss 5y agoPEEK and POKE could break the HIMEM.
- floatingatoll 5y agoFor whatever it’s worth, this is a terrible idea, for so many different reasons: https://web.archive.org/web/20100107184218/http://blogs.msdn.com/oldnewthing/archive/2004/04/14/113052.aspx https://web.archive.org/web/20100107184218/http://blogs.msdn... And so, yes, I’m certain someone must have done it, because it’s clearly bad idea jeans and so Murphy’s Law says it must exist.
- benibela 5y agoCan that work for i > 9 ?
- 5y ago
- selfhoster11 5y agoTruly lifesaving for when she'll quoting gets in the way.
- kijin 5y agoYou've got a stray single quote in your shell. :)
- selfhoster11 5y agoThat was a typo, but it seemed like a perfect illustration of my point, so I left it in.
- Someone 5y agoTypo? I would guess it’s autocomplete at work. iOS does that all the time for me.