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

P3D v4 Installer cannot find P3Dv4 installation despite using correct path?

Messages
1,518
Country
unitedstates
I am beta testing my installer and I am using the Windows registry AppPath key to check if P3Dv4 is indeed installed. I am using:

HKEY_CURRENT_USER\Software\Lockheed Martin\Prepar3d v4
Key=AppPath

which I read here seems to be the standard way to check. My installer works fine with my testers except one. He installed his P3Dv4 at:

'C:\Program Files\Lockheed Martin\Prepar3D v4\'

and my installer gives an error message that P3Dv4 cannot be found? My code to check is fairly simple (PowerShell):

If ((AI_GetMsiProperty CHECKBOX_P3DV4_PROP -eq "CheckBox") -and (AI_GetMsiProperty P3DV4_INSTALL_PATH -eq ""))

basically says if the P3Dv4 checkbox is 'checked' and the AppPath is "empty" then it will throw the error. But his AppPath is not empty. Could it be some Windows security preventing the installer to check?

On a side note, I tried re-creating the issue on my PC and discovered I cannot create a folder in my C:\Program Files folder? I get 'Access is denied' and I'm the Aministrator. Same issue? .... HELP! :eek:
 

Christian Bahr

Resource contributor
Messages
951
Country
germany
Hi.

In all my projects I use these options:

installer_p3dv4_path.jpg


I need the path to start the Prepar3d.exe with certain options. As a result, the scenery is automatically registered as an add-on package in the P3Dv4. The installer itself runs as a 64-bit application. Maybe that helps a little further.
 
Messages
1,518
Country
unitedstates
Hi Christian and thanks for the tips. I will look into these. You say your installer runs as a 64bit program. What if the User has a 32bit OS? Conflict?

Oooops... think I answered my own question. How could it install P3Dv4 is the OS is NOT 64bit, ha!
 

Christian Bahr

Resource contributor
Messages
951
Country
germany
You say your installer runs as a 64bit program. What if the User has a 32bit OS? Conflict?
Oooops... think I answered my own question. How could it install P3Dv4 is the OS is NOT 64bit, ha!

Exactly. For the FSX, I continue to use a 32-Bit installer, because the FSX is a 32-bit application.
 
Messages
1,518
Country
unitedstates
Christian, changed my HKEY_CURRENT_USER to HKEY_LOCAL_MACHINE like yours and added the "search the 64 bit portion of the registry" still no luck. It sure seems like Windows protection is causing this as I had him create a fake P3Dv4 folder outside the C:\Program Files and had him change AppPath (SetupPath) to match the fake folder location and my installer found it. He says other 3rd-party add-ons have add no issues installing?

Any other suggestions you might have? Head scratcher???
 

Christian Bahr

Resource contributor
Messages
951
Country
germany
Maybe I should have written that my installer does not refer to the P3D as the installation location, but always suggests an installation location outside the P3D (C:\Program Files\Bahrometrix\xxx). The installation location itself is freely selectable.

I only need the registry path to locate the Prepar3D.exe. If the Prepar3D.exe was found (Custom Search), then it is executed together with command line parameters (Custom Action) to automatically register the corresponding addon at the end of the installation as an add-on package in the Sim.

So my intention is a little different from what you have in mind. You want to install your add-on into the P3D, I suspect.
 
Messages
1,518
Country
unitedstates
I see what you are doing. While the User can install the add-on anywhere they like, portions of the install do get added inside P3D. Actually, the user can install up to six different platforms at one time if they wish, so I need to know where those FS versions are rather than have them enter manually. Mmmmmmm.... not sure why/how other addons can get past it but I cannot. Thx for the help. I will keep researching.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Is your client running the installer as "Administrator"
 
Messages
1,518
Country
unitedstates
Yes, he is always running as Administrator. I am having him try turning off Windows Defender during install. He says he has installed A2A, MilViz and Just Flight in the past with no issues. He wasn't sure if thier installers check for installed paths or ask him to insert the path of his P3Dv4. I'm think contacting them to see if they have had any User issues in the past that install to C:\Program Files.
 

Christian Bahr

Resource contributor
Messages
951
Country
germany
I just remember that Installer depending on whether you are logged in as Administrator or as a user in Windows.

installer_installation_type.jpg
 
Messages
1,518
Country
unitedstates
Hey Bill, I see in your sig you've done work on Milvis. Since my tester has installed Milviz in the past do you happen to know if you use HOTKEY_CURRENT_USER or HOTLEY_LOCAL_MACHINE to find an installation? Would it be helpful for me to find out what aircraft of Milviz he has?
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Hey Bill, I see in your sig you've done work on Milvis. Since my tester has installed Milviz in the past do you happen to know if you use HOTKEY_CURRENT_USER or HOTLEY_LOCAL_MACHINE to find an installation? Would it be helpful for me to find out what aircraft of Milviz he has?
All of the Milviz installers are built with NSIS (Nullsoft Scriptable Install System). Here is the list of paths we search for to determine what versions of the sim the user current has installed. From the returns, we then build the "choice list" dynamically.

Note that we look in HKey Current User, except for FSX which is checking for HKey Local Machine:
C-like:
        ${If} $RadioButton6_State == 1
              ReadRegStr $INSTDIR HKLM "Software\Microsoft\Microsoft Games\flight simulator\10.0" SetupPath
        ${EndIf}

        ${If} $RadioButton2_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Microsoft\Microsoft Games\flight simulator - steam edition\10.0" AppPath
        ${EndIf}

        ${If} $RadioButton3_State == 1
              ReadRegStr $INSTDIR HKCU "Software\LockheedMartin\Prepar3D v2" AppPath
        ${EndIf}

        ${If} $RadioButton4_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Lockheed Martin\Prepar3D v3" AppPath
        ${EndIf}

        ${If} $RadioButton5_State == 1
              ReadRegStr $INSTDIR HKCU "Software\Lockheed Martin\Prepar3D v4" AppPath
        ${EndIf}
 
Messages
1,518
Country
unitedstates
An update/FYI - looks I was able to fix the tester who had his P3Dv4 in the C:\Program Files folder (beta testing). For FSX, I was gonna try your suggested HOTKEY_LOCAL_MACHINE instead of HOTKEY_CURRENT_USER and discovered this... I have no Microsoft Games entry under HOTKEY_LOCAL_MACHINE?

I did a fresh install of both FSX (boxed Gold Edition), and FSX:SE on Windows 10 but not entries under HOTKEY_LOCAL_MACHINE, only under HOTKEY_CURRENT_USER. I think I fixed it with HOTKEY_CURRENT_USER (again testing) but I thought that strange maybe?
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I checked in a somewhat newer installer script and note that I did in fact change FSX to look in HKCU as well now:

ReadRegStr $R0 HKCU "Software\Microsoft\Microsoft Games\flight simulator\10.0" "AppPath"
 
Top