MSFS SDK installer sets MSFS_SDK environment variable, which makes working
with SDK tools very convenient, because the same written instructions and
scripts can be used across different systems without having to pay attention
to SDK path. In contrast, the path to MSFS Community folder is kept in
UserCfg.opt file, which appears at different locations depending on edition
(MS Store / Steam), and the file uses a rare format that common scripting
languages, installers and other software cannot read. This makes detecting the
folder difficult and error-prone. My proposal: Expose the path to Community
folder through MSFS_COMMUNITY environment variable.
There was a similar/related question a few days ago. I’ve posted some answers
to the “scripting language” solution which might help you:
https://devsupport.flightsimulator.com/t/None
That thread actually inspired my to post this idea. I have had to implemented
the same thing in several languages already, and seen several broken
implementations like Powershell scripts that only check for Steam version,
because that’s what the developer had. A dedicated environment variable like
the SDK has would make everything so much easier.
I’m not against the idea of an environment variable, but I’d bet if they did
so for the SDK and not for the game, it is because there might be other
limitations preventing this?!? In any case, the RXP Powershell is looking up
all versions, and even helps if you have both Store and Steam versions
installed on the same computer edit: hey, you can even make a powershell
script using the Reality XP MSFS Install lib to find the path, and then to
create the environment variable in your system !