1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FSX Installation folder detection

Discussion in 'Tools programming' started by Jorge Santoro, 27/3/07.

  1. Jorge Santoro

    Jorge Santoro

    Joined:
    27/3/07
    Messages:
    2
    Country:
    brazil
    Hi guys,
    Do you know how to detect the FSX installation folder using some REGISTRY entry?

    Thank you.
    Jorge Santoro.
  2. theisomizer

    theisomizer

    Joined:
    15/1/07
    Messages:
    157
    Country:
    us-texas
    Hello Jorge,

    In [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\microsoft games\flight simulator\10.0], look for the SetupPath key.

    Happy to help,
    Sean
  3. Jetliner

    Jetliner

    Joined:
    28/3/07
    Messages:
    78
    Country:
    unitedstates
    Please excuse my ignorance but, I'm looking for the same with regard to the path to the saved flights folder (MyDocuments\Flight Simulator X\).

    The thing that throws me is the username. Right now I simply have the user locate the folder via a filelistbox but, that's pretty lame. :)

    John
  4. Pete Dowson

    Pete Dowson

    Joined:
    25/9/06
    Messages:
    315
    Country:
    unitedkingdom
    Get the user name via the SHGetFolderPath call with CSIDL_PERSONAL.

    Bear in mind also that the folder name is only "Flight Simulator X Files" on English-language FSX installs. Instead of fixing it as that get the proper name from FSX's "language.dll" module using LoadString. The ID is 36864.

    Regards

    Pete
  5. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,321
    Country:
    ca-britishcolumbia
    The Key Changes with Vista

    The registry key to FSX SetupPath differs when FSX is loaded on a 64-bit Vista machine. It becomes "LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Microsoft Games\Flight Simulator\10.0".

    Does anyone know whether the 64-bit Vista key for FS9 is similarly changed and whether the 32-bit version of Vista uses similarly-changed keys or if it uses the XP keys. Same question regarding FS9 UT Canada/Alaska and the UT port to FSX when installed on Vista machines.

    Thanks in advance,
    Don
  6. Pete Dowson

    Pete Dowson

    Joined:
    25/9/06
    Messages:
    315
    Country:
    unitedkingdom
    This sounds worrying, as it will affect every installer for FS applications there is, including mine for FSUIPC4.

    I asked a contact in Microsoft about this and the answer, which I don't fully understand, was:

    32-bit code on Win64 writes to a 32-bit portion of the registry (like the Program Files/Program Files (x86) split). Eula.dll writes that key when the user clicks Accept. FSX is 32-bit so it reads from that node when reading from HKLM. The only problem is if 64-bit code went looking for the key. See http://msdn.microsoft.com/library/d...e/registry_key_security_and_access_rights.asp for details.


    I've not checked the reference (maybe I won't understand that either), but it seems to me that the bit "FSX is 32-bit so it reads from that node when reading from HKLM. The only problem is if 64-bit code went looking for the key." might imply that Vista 64 fiddles the access according to whether you are a 32-bit or 64-bit app, and that the Wow6432Node part is dealt with automatically, at least for a 32-bit app.

    Is this right? Does anyone have 64-bit vista installation to check?

    Regards
    Pete
  7. theisomizer

    theisomizer

    Joined:
    15/1/07
    Messages:
    157
    Country:
    us-texas
    Pete,

    I have access to Vista 64. I don't have it installed on anything yet but I have been meaning to give it a test drive soon anyways. I have the next four days off so I'll get it up on Virtual PC and see what gives.

    I sure hope he isn't right about the registry, as it would make the app I'm currently working on crash pretty violently. Time to write some error checking code! :duck:

    Sean

Share This Page