Sign in to follow this  
Guest cbuchner1

determine version of flight sim

Recommended Posts

Not exactly a SimConnect problem, but is there a way to know inthe installer of an Flight Sim add-on whether the FS version on the user's machine machine is FS9, FSX RTM or FSX SP1? Are there registry keys that tell me this machine currently has the FSX SP1 installed?Is there an officially sanctioned way to determine the version?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

This is entirely off the top of my head but you could use the win32 api to locate the file version of the exe which is buried into the standard exe header. The catch is to find the install folder. The registry should hold the setup path for FS9 or FSX. For versions older than FS9, I'm not sure. Sure, the blunt HDD search would help, and you may even fake the search by looking only in the default install paths, but that also has holes in it.Simconnect (FSX only) does give you the information provided it can connect to the server (ie, FS running) during the open event.Etienne

Share this post


Link to post
Share on other sites

The open event is kind of late to get information for the installation process of the add-on ;-)I have to decide which executable to install in the first place. One version binds against the simconnect RTM version, the other binds against simconnect SP1.Christian

Share this post


Link to post
Share on other sites

Christian-check your installer to see if it has Version check functions in there - the fsx.exe installed can tell you which version it is, using Win32 functions such as GetFileVersionInfo().If your installer does not allow external Win32 calls, you can make a DLL the way your installer likes, which, linked against Version.dll will be able to call GetFileVersionInfo() and check FSX.EXE for what you need.

Share this post


Link to post
Share on other sites

>I have to decide which executable to install in the first>place. One version binds against the simconnect RTM version,>the other binds against simconnect SP1.Check the other thread here which contains the solution to this -- a solution, in fact, which would not only allow your installer to work this out (as the FSUIPC4 installer does), but which would allow you to have just the one executable in the first place.The thread is http://forums.avsim.net/dcboard.php?az=sho...sg_id=969&page=RegardsPete

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this