Earlier quoted context omitted.
> Part of the problem in Windows is that Program Files is write protected for security, so you can't store a local configuration file relative to the exe. So where does it go? This hasn't been a problem since the first version of Windows that had a filesystem with such protections - that would be Windows NT 3.1. The correct location for such stuff is %USERPROFILE%\AppData\Roaming or ...\Local, depending on whether th…
> The problem is that so many apps just straight up ignore all those guidelines. The fact it happens so often suggests that the documentation isn't good enough. > Of course. At least Apple's pages is pretty clear and has some nice diagrams. I think this page is more appropriate: https://docs.microsoft.com/en-us/windows/desktop/shell/csidl It's reasonably well documented for UWP, though I can't find an equivalent for…
Any library or framework author knows that documentation is never enough. ~ On Windows, though, there's also historical reasons - back in Win9x days, there was no practical reason for apps to bother if they didn't anticipate running on NT, which is why it was so common to just dump configs next to the .exe (and even to this day, Windows uses FS virtualization to make this work for old apps). When 2K and especially XP became popular, and everyone was rapidly porting their stuff, people often didn't bother looking up docs and all, and just used the "least significant change" approach to fixing things. And that kind of set the background for later - why bother being nice, if nobody else does?
> I think this page is more appropriate: https://docs.microsoft.com/en-us/windows/desktop/shell/csidl
This page describes pre-Vista, deprecated APIs. Unless you need to target XP, a desktop app should use the known folder mechanism.