• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 Auto-detect MSFS 2020 Community path

I am using an adaptation of the Rikoooo VBscript with Advanced Installer, similar to the scripts above except it returns the APPDIR to advanced installer so I know where to put the files.

Within a couple days of release though I had a few instances of the installer not finding the proper location??? Is there yet another location we need to search? Always it was people with the Steam version, not sure if they did something crazy and the usercfg.opt is getting written to a 3rd location I'm not aware of? As a result I had to make a manual install option that let them put the product where they want.

I suspect it is caused by addon ,managers or some such. At any rate do you guys see a problem with this script?

'-----------------------------------------------------------------
'This script used to read the UserCfg.opt filename
'Match "InstalledPackagesPath" string and extract the path value
'-----------------------------------------------------------------
Dim Count
Dim strline

'Variable declaration
filename = Session.Property("MS_STORE_VER")
instpath = "InstalledPackagesPath"

Const ForReading = 1
Count = 0

'Open the file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(filename, ForReading)

'Read the file line by line
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
If Instr(strline, instpath) then 'Match the install path string
contents = Replace(strline, instpath, "") 'Remove the InstalledPackagesPath from main string
contents = replace(contents, chr(34), "") 'Remove double quote value
contents = trim(contents) 'Trim the space

end if
Loop

Session.Property("APPDIR") = contents 'Output path back to Advanced installer
objFile.Close

Edit: I run the same script on steam version.
 
Last edited:
I have some confusion as to where EXACTLY the Steam UserCfg.opt resides one example above is localappdata while another is userappdata I don't own the Steam version so no way to verify 100% Probably the cause of my issue.
 
Hello,

Steam: {userappdata}\Microsoft Flight Simulator\UserCfg.opt
MS Store: {localappdata}\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\UserCfg.opt

I have the steam version, and have made an installer myself (Inno Setup) that some friends have tested on their MS Store version. These are the paths I am using.

Cheers!
 
Back
Top