Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

shouldn't Addon developers commonly decide where to install ?

Featured Replies

  • Commercial Member

This subject of installing P3D has me in stitches:

 

on a x64 Operating System:

C:\Program Files\Lockheed Martin\Prepar3D v4

is where a x64 app installs like P3D for example

 

C:\Program Files (x86)\Lockheed Martin\Prepar3D v3

is where a x86 (32bit) app installs

 

on a x86 32bit Operating system:

C:\Program Files\Lockheed Martin\Prepar3D v3

is where a 32bit app installs

 

On the 64 bit PC the installer doesn't choose between Program Files x86 and Program Files, it's redirected by the operating system. to the appropriate one

 

With shall we say "official MS Windows install folders" a User does not have Write permission - just like Read-Only files your app can not write to files there if your User does not have permission read-write permission. That's because these folders are made by installers running with admin privileges during install, from there they don't get touched. Well that's the theory.

In practice you have apps that install read-write files there and expect you to have permission. They could add the permission to their folder if their installer was good enough and avoid the mess.

Instead we are left to work it out:

1. We can avoid putting read-write files there that the user mode app writes to

2. We can give write permission to the folder simply by adding the Modify permission to the Users group (the group of logged in users) on that folder.

3. We can make a new folder and install our sim there. That way we own the folder and have permission to do what we want with it and no need to run as admin to acquire permission to write there.

4. We can run as admin and hope to acquire permission.

 

Problems emanate from user owned installation folders and new profiles whereby stuff can't be accessed even as admin.

 

Steve Waite: Engineer at codelegend.com

  • Replies 52
  • Views 6.6k
  • Created
  • Last Reply
  • Commercial Member
6 hours ago, FalconAF said:

That's amazing, in as much as even LM doesn't use the "C:\Program Files (86)" folder as the "default folder recommendation" anymore when installing P3Dv4. 

You are sadly mistaken here.

LM DOES use the C:\Program Files as the default suggested location (not C:\Program Files (86), because P3D V4 is a 64 bit app)!

You THINK they stopped using it, but that's just because YOU decided to use a different folder the last time you ran the installer, so your preference has been stored in the registry, in order to be reused as a default for the next time.

But I assure you that, with a clean installation, and when no previous registry is present for P3D V4, the default location IS C:\Program Files\Lockheed Martin\Prepar3D V4 like any other Windows program out there.

 

6 hours ago, FalconAF said:

Heck, even Microsoft ACES team and it's lead developer made it very clear long before P3D v1 that THEY didn't recommend installing ANYTHING concerning their flight simulators into that folder.  I am honestly amazed that LM defaulted their P3D installations to it through P3Dv3 (but it finally changed to the root C:\ drive for P3Dv4).

Again, they haven't changed anything for V4...

And I can tell you why somebody from Microsoft suggested it would be best to install FSX outside the C:\Program Files folders:

They know lots of 3rd party developers acted if this was still 2006, and all the subsequent recommendations about respecting UAC rules, are usually happily ignored by FSX developers, which continued to use their own folder to store everything, even configuration files, preferences, databases, everything that might have to be modified while running.

This of course was WRONG, because trying to write a file which is located under C:\Program Files would clash with lots of UAC rules and permission so, the Microsoft guy that said this, suggested the easier solution that would prevent users from griefs resulting by misbehaving 3rd party apps, which was to install into a folder outside C:\Program Files, so every piece of bad-behaving 3rd party app wouldn't had any problems.

But since our software is 100% UAC-compliant, it will work just fine from C:\Program Files, because it will NEVER try to WRITE anything in it! That's what the %APPDATA% and %PROGRAMDATA% folders are for.

So, the only real reason why you wouldn't want to install into C:\Program Files, is that you don't have enough free space left on C:. And, of course, if this is the case, you can change it.

 

6 hours ago, FalconAF said:

But feel free to have a brand new flight simulation user (and customer of your addons) who wouldn't know any better to just select YOUR default location (that no responsible flight sim user would ever use).Cool.  Let's have your P3Dv4 addons all default to the Program Files (86) folder now.  That'll teach 'em.

Our default location is perfectly fine as it is because, as I've said already in my previous reply to Pete, we DO RESPECT UAC rules 100%, so there are no issues whatsoever installing into C:\Program Files.

Now, you can still choose to install the SIM into C:\Prepar3d V4, and in fact it's exactly what I DO TOO, but only because I also know that too many 3rd party developers don't care about permissions, so THEIR software will malfunction if installed into a sim installed into C:\Program Files so, I use C:\Prepar3d V4 to not have issues with OTHER products, but since I know how the FSDT products are made, I use them from the default folder in C:\Program Files (x86), because they work just fine from there.

So, really, I don't know what else you want:

- You can install the sim everywhere you want. It won't matter AT ALL to OUR products.

- You can install the FSDT everywhere you want, even on a different drive of the sim and It won't matter AT ALL, and they will work just fine from their default folder.

So really, what's the whole point of your entirely unnecessary rant ?

1) We are doing EXACTLY what you are trying to propose here, because we are following ALL the possible suggested standards, both from Microsoft and from LM.

2) We have our own private folder, nice and tidy, where you can find ALL our stuff there. And you chose its location, freely.

3) We don't touch ANY of the core configuration file of the sim

4) We support the auto-discovery, so you can uninstall/reinstall the sim without having to reinstall any of our products.

So, basically, you are complaining with us for having achieved exactly what you wanted! 

  • Commercial Member
6 hours ago, SteveW said:

In practice you have apps that install read-write files there and expect you to have permission. They could add the permission to their folder if their installer was good enough and avoid the mess.

That's precisely what the main issue is. Microsoft clearly recommends that NO app should ever try to write ANY files located in the folder of the app itself, which (if under C:\Program Files), enjoys stricter permissions by default, unless an installer that ran with admin permission would change them too.

If an app has a small preference file, like an .INI file or a .CFG file that is usually read/written when using the app, the suggested location is %APPDATA%\DEVELOPER_NAME\APP_NAME. This way, multiple users of the same PC can have different personal preferences. For example, one user might want to use different graphic settings of the sim, on the same PC, compared to another user.

If an app needs to store larger files which should be written too, and won't give any value to be user-specific, the suggested location for these is under %PROGRAMDATA%\DEVELOPER_NAME\APP_NAME. This way, larger files won't be duplicated for every user, saving space, but they will still be writable.

  • Commercial Member

I can virtually hear eyeballs glossing over as they read this stuff Umberto - well done - good posts.

Steve Waite: Engineer at codelegend.com

I consider this one of the most valuable topics here.

 

It really seems to be essential that all addons are (or at last customizable can be) installed following a similar procedure. Otherwise the whole sim installation is going to be a mess sooner or later. Manually shifting files from one place to another after an installation can easily make things even worse.

 

I think what Umberto from FSDT has elaborated here can serve as a commendable example how all addons should handle their installation. Most vital seems to me that the user has the option to choose the install location so that he can keep his Installation in order the way he likes it to be. It is highly regrettable that even some of the largest - and finest - addon developers do not allow that.

 

3 hours ago, virtuali said:

...

- You can install the sim everywhere you want. It won't matter AT ALL to OUR products.

- You can install the FSDT everywhere you want, even on a different drive of the sim and It won't matter AT ALL, and they will work just fine from their default folder.

...

1) We ... are following ALL the possible suggested standards, both from Microsoft and from LM.

2) We have our own private folder, nice and tidy, where you can find ALL our stuff there. And you chose its location, freely.

3) We don't touch ANY of the core configuration file of the sim

4) We support the auto-discovery, so you can uninstall/reinstall the sim without having to reinstall any of our products.

...

 

3 hours ago, virtuali said:

...

If an app has a small preference file, like an .INI file or a .CFG file that is usually read/written when using the app, the suggested location is %APPDATA%\DEVELOPER_NAME\APP_NAME. This way, multiple users of the same PC can have different personal preferences. For example, one user might want to use different graphic settings of the sim, on the same PC, compared to another user.

If an app needs to store larger files which should be written too, and won't give any value to be user-specific, the suggested location for these is under %PROGRAMDATA%\DEVELOPER_NAME\APP_NAME. This way, larger files won't be duplicated for every user, saving space, but they will still be writable.

 

  • Commercial Member

So some apps install read-write files to what is in fact the proper location for an installed app 'Program Files' What can we do:

If we run Explorer and right-click on C:\Program Files\Common Files, or C:\Program Files\Internet Explorer, choose the Security tab, click on Edit button just below the groups listed in the box at the top. Choose any group it's all greyed out they are unavailable it's specially protected. Now right-click on say C:\Program Files\Lockheed Martin, choose Security tab, press Edit, they are not greyed out, choose the Users (MyPC\Users) group, see Modify and Write are unchecked, check the Modify Allow box (we see Write is auto checked since we need write to modify). So at that point we have enabled Write on that folder an otherwise read-only folder. In this way we have used a function that's there for our purpose - we gave permission to an authenticated group, Users that logged into the actual PC to use the applications safely. This is the least destructive proper admin way to resolve the situation.

Advising the procedure above, to add Modify permission needs a little hand-holding whereas advising making a new folder and installing to that saves having to describe a technical process to the average user. Make a new folder in the root of the drive and see that Modify access is granted to the Authenticated Users group, Users logged into the network.

 

Steve Waite: Engineer at codelegend.com

  • Commercial Member

The C:\ProgramData folder is another hot directory.

Make a new folder there

C:\ProgramData\New folder

appears as:

C:\Users\All Users\New folder

The Users group does not have permission.

An installer making a folder there has to be careful if there are going to be read-write files for any logged on User to ensure permissions are correctly acquired and set up. An ordinary FSX:SE installation does not give Users write access to this folder and so can affect some scenery apps and installers. It's part of the way the Steam menu subsystems work but the Users group can be given permission, there's no "install to another folder" solution to this one.

 

Back to P3D. P3D v 3 and 4 comes with a 'Discovery' service which assigns addons on a per user basis - placing a new folder containing add-on.xml into C:\Users\'YOU'\Documents\Prepar3D v4 Add-ons.

When 'YOU' log in and run P3D the program will find and set up for those addons described in that location.

Installers amending C:\ProgramData\Lockheed Martin\Prepar3D v4\add-ons.cfg, are installing for all Users.

Steve Waite: Engineer at codelegend.com

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.