Comment by the_mitsuhiko
4 years ago
There is no guarantee that the short name has that. In fact on a lot of German Windows installations it was PROGRA~2.
4 years ago
There is no guarantee that the short name has that. In fact on a lot of German Windows installations it was PROGRA~2.
Well, on my disk PROGRA~1 is "Program Files" and PROGRA~2 is "Program Files (x86)", so still works :)
That order is not guaranteed consistent across installations, however.
I wonder if code to this effect has ever been written before
8 replies →
And on mine (Windows 11) "PROGRA~3" is "ProgramData"