Mike V wrote: Wed Jul 31, 2024 10:52 pm
Something I would like to do in the future is move the base folders somewhere else on Windows, so we don't have to ever touch the registry - but I have to still be backwards-compatible with the current locations of everything, of course.
My thoughts... beginning with a bit of history.
I recommended putting the TMSA data files in the Documents folder. This was based on a successful strategy used by Solar Fire that I had discovered has a (probably inadvertent) advantage that it allows data files (chart files and configuration or display files like aspect definitions or planet lists) to replicate across other computers logged into the same Microsoft account.
Solar Fire is a commercial product. Its license says you, the licensee, are entitled to run it on multiple computers if it's just you using it and (the ambiguous but "we all know what it means" standard phrase) you are only using it on one computer at a time. I have it installed on four computers that I own and use.
Using Windows the way it is designed to be used, and the way I always recommend, users should be logged in with a Microsoft account - not a local machine account - and have OneDrive fully enabled. When this happens, making a change in a file on one computer (in a OneDrive folder) lets it be updated (almost instantly) on all other machines currently online and logged in to the same Microsoft account.
An option in OneDrive - which I think should be default, but actually requires user action - is that the Documents folder, Desktop, and other special folders can be made part of OneDrive and also synced across computers. (I suspect the real reason that it's turned off is that people's documents and picture folders often have far more content than the
free storage that comes with all Microsoft accounts, although anyone with an Office 365 (
aka Microsoft 365) account - which is most of the computer-using world - automatically gets a terabyte of cloud storage.)
With Solar Fire files in the Documents folder, which I have set to be a OneDrive folder, I can update an aspect definition file on one computer and its updated automatically on all my computers. I can run a chart at home and save it, then come to the office and the chart is waiting in the charts file where I left it.
I wanted the same flexibility for TMSA. However, there are limits. Not everyone logs into Windows with a Microsoft account. Some who do that have disabled some OneDrive features. Others don't take the step of making Documents a OneDrive folder. And, of course, most people probably still have only one computer so the whole device mobility (ability to seamlessly move from device to device without seeming to be on a different computer) is moot.
Therefore, the Documents folder appeared to be the best choice: Every Windows installation (every user profile) has a Documents folder. It may be redirected to a location in OneDrive or remain in the local-only profile area. That is, it might stay in C:\Windows\Users\
userprofile\Documents or be redirected to C:\Users\
userprofile\OneDrive\Documents (or, in theory, redirected anywhere else, since folder redirection has long been a standard in business and sometimes done by a few individual Windows users). It could easily be in one of two places and theoretically could be anywhere at all. But it's always a Documents folder and Windows itself handles the redirection and tracking.
Documents doesn't have a standard system variable defining its location, so a programmer (I'm barely a programmer, more of a scripter) has to find this some other way. I guess that's what Mike meant about checking through shell folders. - Ah, yes, the place you can find this in the Registry is:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Except, there is a flag in that folder labelled
!Do not use this registry key that has content, "Use the SHGetFolderPath or SHGetKnownFolderPath function instead". OK, now we're back to programmer's turf more than mine. But that's the idea.
'While I understand the desire to make storage locations simpler, I do think (unless I'm missing something obvious) the choice has to be some location that (1) exists [or can exist] in OneDrive when OneDrive is fully implemented, (2) also exists on every Windows system regardless of OneDrive implementation, and (3) can be easily located by a simple, consistent process as needed.
The program then needs to be separately installed on each computer. Data files are automatically shared across all computers for that user.