• 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.

Registry Keys FSX, FSX-SE, P3Dv1, P3Dv2

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Here is my NSIS script routine for P3Dv2.x or P3Dv3.x installers:

Code:
Function nsDialogsPageLeave
 
        ${NSD_GetState} $RadioButton1 $RadioButton1_State
        ${NSD_GetState} $RadioButton2 $RadioButton2_State
        ${NSD_GetState} $Checkbox2 $Checkbox2_State
 
        ${If} $RadioButton1_State == 1
              ReadRegStr $INSTDIR HKLM "Software\Lockheed Martin\Prepar3D v2" SetupPath
        ${EndIf}
      
        ${If} $RadioButton2_State == 1
              ReadRegStr $INSTDIR HKLM "Software\Lockheed Martin\Prepar3D v3" SetupPath
        ${EndIf}
FunctionEnd
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
What does this do Bill?
When the user selects which P3D version they wish to install to, the script above will "read the button selected" and look in the appropriate Registry entry for the full path to the sim.
kBHPc.jpg
 
Messages
1,749
Country
unitedstates
Oh i see. Using ICP i have all options from FSX to P3D on 1 page. I just create install versions for each one and the user can decide what installer to use. Does not need a complex code like you wrote, so i was just wondering what the heck that was!
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
My installers need to know which sim version is being installed because different sim versions have specific and different modules that need to be installed.
 
Messages
1,749
Country
unitedstates
Using ICP you can also choose what specific files to install based on the customers choice and there is no need for all that extra scripting. What installer program so you use?
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Using ICP you can also choose what specific files to install based on the customers choice and there is no need for all that extra scripting. What installer program so you use?
I've mentioned a time or six that I use NSIS (Nullsoft Scriptable Install System), which is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.

I also use "HM NIS Edit", which is a robust front end for the actual installer. There are dozens of different front ends available, some of which are quite expensive. However for my needs, what I use is free and more than adequate.

Although the script snippets I've posted as examples seem complicated, understand that the front end does most of the actual script writing. Moreover, it needs to be done only once, since the template can easily be used over and over again. Only the actual files to be installed will change from build to build. :cool:

You may be familiar with the WinAmp program. If so, they use NSIS as well as many other well-known software companies:
kGzNX.jpg
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I've been tweaking my template to make it more "themed" for Milviz:
kGAd6.jpg
 
Messages
1,749
Country
unitedstates
Do you still use ICP with this NSIS as the front end? So you can customize the front end pages. Looks good!
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I don't use ICP at all! What I use is just what I've mentioned, and it is totally FREE for any use, freeware or commercial. No license required.
 
Messages
1,749
Country
unitedstates
I downloaded it and will check it out. With your sample above for the P3D script i figure i can write all of the scripts i need. I really like the looks of this installer!
 
Messages
1,749
Country
unitedstates
I noticed that to add a plugin for registry keys you must pay for this. So maybe NSIS is not fully free. Did you pay for this plugin or is there free ones available?
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
There are a ton of plugins available. I use none of them aside from the HM NIS Edit which is not really a 'plugin' as much as a free 'front end overlay.'

What are you wanting to do with the Registry?
  1. Read Registry entries?
  2. Create Registry entries?
Both can be done easily using the basic scripting command set in NSIS.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Since I never mess with the user's Registry, I honestly cannot say more than that it is entirely possible to accomplish using only the native scripting. The "plugins" are sometimes helpful, but are not essential.
 
Messages
1,749
Country
unitedstates
I must have been tired when i posted about what i meant. I mean the customers product keys to be able to install the product.
 
Last edited:

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Oh, that's a horse in a different pasture altogether! We've never bothered with "customer product keys" so again that's not something I can advise on either... :confused:
 
Messages
1,749
Country
unitedstates
Oh, that's a horse in a different pasture altogether! We've never bothered with "customer product keys" so again that's not something I can advise on either... :confused:

I am shocked you do not use keys so customers do not just upload the installer or give it to friends. With keys they a responsible for that key and it tracks on who is guilty.
 
Messages
5
Country
brazil
I've tried many things but I can not exclude the FSX-Steam registry from my Windows 7. I've uninstalled the FSX-Steam and now when I try to install Sbuilderx313 (according to the system registry) he asks for the Steam\steamapp\common\fsx in the 'Full Path to Microsoft Simulator X'. Any tips?
 
Messages
100
Country
italy
HKEY_CURRENT_USER\Software\LockheedMartin\Prepar3d Key=AppPath HKEY_CURRENT_USER\Software\Lockheed Martin\Prepar3d v2 Key=AppPath

Question for you experts: Is it correct that P3D "v1" has no blank in the "LockheedMartin" string, while V2 and V3 registry keys have it?
 
Top