Jump to content
The simFlight Network Forums

How to derive the Sim's Path (was "For Pete Dowson")


Recommended Posts

Hello Peter,

 

I would like to install into Modules Folder some lua scripts. So can you please share a piece of your code to detect in registry path where is located the sim path, like your installer?

Installer for FSUIPC4.DLL version 4.948


Looking in registry for FSX install path:
     HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\10.0
     Parameter"SetupPath"
... >>>  OK! FOUND FSX!  <<< ...
     SetupPath=C:\Microsoft Games\Microsoft Flight Simulator X\

Looking in registry for FSX-SE install path:
     HKEY_LOCAL_MACHINE\SOFTWARE\DovetailGames\FSX
     Parameter"Install_Path"
Not there, so looking in:
     HKEY_CURRENT_USER\SOFTWARE\DovetailGames\FSX
     Parameter"AppPath"
Not there, so looking in:
     HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator - Steam Edition\10.0
     Parameter"SetupPath"
Not there, so looking in:
     HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator - Steam Edition\10.0
     Parameter"AppPath"
... NOT found! ...

Looking in registry for Prepar3D v1 install path:
     HKEY_LOCAL_MACHINE\SOFTWARE\LockheedMartin\Prepar3D
     Parameter"SetupPath"
Not there, so looking in:
     HKEY_CURRENT_USER\SOFTWARE\LockheedMartin\Prepar3D
     Parameter"AppPath"
... NOT found! ...

Looking in registry for Prepar3D v2 install path:
     HKEY_LOCAL_MACHINE\SOFTWARE\Lockheed Martin\Prepar3D v2
     Parameter"SetupPath"
Not there, so looking in:
     HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v2
     Parameter"AppPath"
... NOT found! ...

Looking in registry for Prepar3D v3 install path:
     HKEY_LOCAL_MACHINE\SOFTWARE\Lockheed Martin\Prepar3D v3
     Parameter"SetupPath"
Not there, so looking in:
     HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v3
     Parameter"AppPath"
... NOT found! ...
===========================================================

INSTALLATION FOR FSX:
SetupPath="C:\Microsoft Games\Microsoft Flight Simulator X\"
Checking version of the FSX EXE:
... Version 10.0.61637.0  (Need at least 10.0.60905.0)
Checking compatibility with installed SimConnect:
    Found SimConnect build 60905 (Original)
    Found SimConnect build 61242 (SP1 May07)
    Found SimConnect build 61259 (Acc/SP2 Oct07)
Checking if there's already a version of FSUIPC4 installed in:
       C:\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL
... Version 4.947d found.
FSX Modules folder already exists.
Okay -- installed FSUIPC4 into "C:\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL"
Looking for the current user's Application Data path: 
... found as "C:\Users\WinDEV\AppData\Roaming"
Now finding \Microsoft\FSX\FSX.CFG for all users, including this one
Looking in "C:\Users\All Users\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Default\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Default User\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Default.migrated\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\Public\AppData\Roaming"
 ... No FSX.CFG there
Looking in "C:\Users\WinDEV\AppData\Roaming"
Found FSX.CFG in "C:\Users\WinDEV\AppData\Roaming\Microsoft\FSX\FSX.CFG"
Now checking DLL.XML ...
... There is a previous DLL.XML, checking for FSUIPC4 section.
... FSUIPC4 section already exists but will be replaced.
     (for FSUIPC4, without Loader)
... FSUIPC4 section of DLL.XML written okay
Now checking for a SimConnect.XML file ...
... There is a SimConnect.XML, checking for "local" section.
... "local" section already exists, file not modified.
"Modules\FSUIPC Documents" folder already exists.
Now installing additional files into the "Modules\FSUIPC Documents" folder:
   Installed "FSUIPC4 User Guide.pdf" okay
   Installed "FSUIPC4 for Advanced Users.pdf" okay
   Installed "FSUIPC4 History.pdf" okay
   Installed "List of FSX and P3D controls.pdf" okay
   Installed "FSUIPC Lua Library.pdf" okay
   Installed "FSUIPC Lua Plug-Ins.pdf" okay
   Installed "Lua License.pdf" okay
   Installed "Lua Plugins for VRInsight Devices.pdf" okay
   Installed "LuaFileSystem.pdf" okay
   Installed "Example LUA plugins.zip" okay
   Installed "ASN WX Radar facilities in FSUIPC4.pdf" okay
   Installed "Offset Mapping for PMDG 737NGX.pdf" okay
   Installed "Offset Mapping for PMDG 777X.pdf" okay
   Installed "FSUIPC4 Offsets Status.pdf" okay
   Installed "Profiles in Separate Files.pdf" okay
===========================================================

All installer tasks completed.
Registration check for FSUIPC4 and WideFS was successful! (result code 00)

*************** End of Install Log ***************

Help will be welcome :)

 

Best regards Fred

Link to comment
Share on other sites

You posted your question, with an unhelpful title, in the wrong place. I've moved it and re-titled it for you. Please use the Support Forum in future, and use more helpful titles.

 

 

I would like to install into Modules Folder some lua scripts. So can you please share a piece of your code to detect in registry path where is located the sim path, like your installer?

 

Are you are programmer? If not I wouldn't try. If you are, then you just use the normal Registry API. Please refer to the copious Windows API documentation available on-line. The places to look in the Registry are clearly shown in the Installer log. Isn't that enough help?

 

Pete

Link to comment
Share on other sites

You posted your question, with an unhelpful title, in the wrong place. I've moved it and re-titled it for you. Please use the Support Forum in future, and use more helpful titles.

Sorry Pete it's not a support question for FSUIPC I have made  :oops: 

 

Are you are programmer? If not I wouldn't try. If you are, then you just use the normal Registry API. Please refer to the copious Windows API documentation available on-line. The places to look in the Registry are clearly shown in the Installer log. Isn't that enough help?

I think like you at your begining ! So I think there is a confusion, what's the purpose of Windows API to make an installer to find path ?

Regards Fred

Link to comment
Share on other sites

Sorry Pete it's not a support question for FSUIPC I have made  :oops:

 

Well, maybe not. But it isn't a question for Paul Henty and his .Net DLL either. I don't often notice messages there, Paul picks them up.

 

So I think there is a confusion, what's the purpose of Windows API to make an installer to find path ?

 

Windows controls the Registry. All of the information you need to locate FS is in the Registry. Therefore you need to use functions provided by Windows to access the relevant parts of the Registry and obtain the information to locate FS. 

 

"API" means "Application Programming Interface". You are programming an application to interface to Windows, therefore you use Windows APIs.

 

You'll find all of the Registry API functins start with the letters "Reg" which makes them easy to spot.  I cannot teach you Windows programming so you'd need to do some work on this if you are new to Windows programming.

 

For the Registry functions, check out this section in the MSDN: Registry Reference

 

Pete

Link to comment
Share on other sites

Well, maybe not. But it isn't a question for Paul Henty and his .Net DLL either. I don't often notice messages there, Paul picks them up.

Here an example : http://forum.simflight.com/topic/80215-starting-fsx-from-vbnet-etc/

 

Windows controls the Registry. All of the information you need to locate FS is in the Registry. Therefore you need to use functions provided by Windows to access the relevant parts of the Registry and obtain the information to locate FS. 

 

"API" means "Application Programming Interface". You are programming an application to interface to Windows, therefore you use Windows APIs.

 

You'll find all of the Registry API functins start with the letters "Reg" which makes them easy to spot.  I cannot teach you Windows programming so you'd need to do some work on this if you are new to Windows programming.

 

For the Registry functions, check out this section in the MSDN: Registry Reference

Thanks I already play with the reg path to check the FSUIPC version to the sim with the newer version I have declared to php file when my ACARS system is launched :)

 

Ex: http://forum.simflight.com/topic/79503-howto-find-runway-in-use-by-wind-direction/#entry481072

So but in this case I'm talking about the INSTALLER

 

Fred

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.