Author Topic: Installer should not put entries in add-on.cfg in programdata **SOLVED**  (Read 2422 times)

p3dx3

  • Hero Member
  • *****
  • Posts: 592
Your installer is adding duplicate entries, by creating entries in the add-on.cfg file in c:\programdata AND adding folders to your My Documents\Prepar3d Addons you are loading the addons twice. I have seen people have crashing issues in the sim or gsx not loading due to this. When the add-on.cfg entries are removed and only the My Documents addons are loaded P3D loads and works fine.
« Last Edit: April 23, 2020, 11:15:47 am by virtuali »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51439
    • VIRTUALI Sagl
Re: Installer should not put entries in add-on.cfg in programdata
« Reply #1 on: April 23, 2020, 11:15:38 am »
Please stop asking the same question, when I already explaining this is NOT happening:

http://www.fsdreamteam.com/forum/index.php/topic,23288.msg156065.html#msg156065

I'll repeat it again. Our installers DO NOT create "duplicate entries". And you keep doing the same mistake over and over, see this sentence:

Quote
by creating entries in the add-on.cfg file in c:\programdata AND adding folders to your My Documents\Prepar3d Addons you are loading the addons twice

This is inaccurate.

For an add-on to work, there MUST be two entries, the add-on.xml in Documents only DESCRIBES the add-on to the sim, but it's not enough to activate it. In order for an add-on to become active, there must also be an entry for it in either one of the two add-on.cfg used by the simulator.

So, the entry under My Documents\Prepar3d V4 Addons and the entry in the add-on.cfg file in the C:\Program Data are NOT "duplicate entries", they are both required, otherwise the add-on won't work.

The thing that is misleading you, is the fact that, it is ALSO possible to enable an add-on by JUST placing an add-on.xml in the My Documents\Prepar3d V4 Addons folder, and this will result in the simulator asking to activate the add-on on the next start up.

If you reply YES, this will create the entry for the add-on.cfg in %APPDATA% because, as I've said, both an add-on.xml and an entry in either the add-on.cfg in %PROGRAMDATA% or the add-on.cfg in %APPDATA% is required to enable an addon.

Obviously, the simulator won't normally create a double entry by itself. If the add-on that has its add-on.xml file in the Documents\Prepar3d V4 Addon file already has an entry in %PROGRAMDATA% ( created by our installer ) it will NOT ASK to activate it, because it's already active!

So, under normal conditions, the entry in the %PROGRAMDATA% add-on.cfg file placed by our installer ( more precisely, placed by P3D4 ITSELF, when asked by our installer ) allows to have the add-on already active WITHOUT bothering you with the question about activating it, which P3D normally does when it finds an "orphaned" add-on.xml. So, clearly, this is a time saving feature because, if you just installed something, why would you be bothered with another question when the sim starts ?

I'll repeat it again, the sim will NOT ask you anything ( and thus it will NOT create a "double entry" in the %APPDATA% add-on.cfg file ), if the add-on already has an entry in %PROGRAMDATA%. This is certain.

As I've said in my other post, you are mislead thinking our installer creates double entries, because you are likely using an external utility that must have copied that entry from the add-on.cfg in %PROGRAMDATA% to the one in %APPDATA%, which is entirely unnecessary, since the sim will read add-ons from both files just fine.

Maybe, because of permission issues ( altering a file in %PROGRAMDATA% requires Administrator access ), that utility failed to REMOVE the entry from %PROGRAMDATA%, which is what it should likely do when it tried to "move it" to %APPDATA%.

That's the only possible reason I can think of, since I don't think that utility is intentionally creating double entries.

But I'll repeat it again, just to be sure you understand: if an installer creates an entry in the %PROGRAMDATA%\add-on.cfg file, the simulator itself will neither ask to activate it, and will never create a double entry for it on its own.
« Last Edit: April 23, 2020, 11:20:22 am by virtuali »

p3dx3

  • Hero Member
  • *****
  • Posts: 592
Re: Installer should not put entries in add-on.cfg in programdata
« Reply #2 on: April 23, 2020, 12:07:32 pm »
it is happening it happened again to a person I helped using p3d 4.5 today on a just downloaded installer. the installer created a my documents add-on.xml for addon manage and exclude AND created an add-on.cfg entry for the addon manager in c:\programdata\lockheed martin\prepar3d v4
« Last Edit: April 23, 2020, 12:42:48 pm by virtuali »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51439
    • VIRTUALI Sagl
Re: Installer should not put entries in add-on.cfg in programdata
« Reply #3 on: April 23, 2020, 12:53:13 pm »
it is happening it happened again to a person I helped using p3d 4.5 today on a just downloaded installer. the installer created a my documents add-on.xml for addon manage and exclude AND created an add-on.cfg entry for the addon manager in c:\programdata\lockheed martin\prepar3d v4

You keep ignoring my explanation, that's why you keep saying "it's happening": IT'S SUPPOSED to be happening! This is NOT a "double entry" as I've already explained, in the other post, and this one too, and you seems not to understand, this is NORMAL.

I'll try to explain it in a simpler way: in order for an add-on to work, BOTH the following are REQUIRED:

- An add-on.xml file in a sub-folder of the Documents\Prepar3d V4 Addons

AND

- A [package] entry in the Lockheed martin\prepar3d v4\add-on.cfg file, which can be either the one in %PROGRAMDATA% OR the one %APPDATA%

BOTH are required for an addon to work. THIS IS NOT A "DOUBLE ENTRY"!!

The only difference is:

- If the installer "only" creates an add-on.xml, this add-on is considered to be "yet to be discovered" ( but NOT Active yet ), so the sim will ASK on the next start up if you want to activate it, and if you reply YES, it will create an entry in the add-on.cfg, which will be the one in %APPDATA%

- If the installer also ask P3D to Activate the add-on, the sim will create an entry in the add-on.cfg, in %PROGRAMDATA%, so the add-on will be already Active by the time you start the sim, saving you from having to reply what would be a pointless question, since if you just ran an installer, it's supposed you want to Activate the add-on you just installed.

And, as I've said, if there's already an entry in %PROGRAMDATA%, the sim will not ask or create a 2nd entry in the %APPDATA%, because it won't re-ask or duplicate an add-on that is already active.

The whole point of the auto-discovery feature, is that you don't even need to run an add-on installer, if you reinstall the sim AND clear everything from %APPDATA% and %PROGRAMDATA%, so you can do a clean reinstall of the sim without having to re-run all add-on installers, provided your add-on.xml files and those add-on files haven't been removed.

p3dx3

  • Hero Member
  • *****
  • Posts: 592
Re: Installer should not put entries in add-on.cfg in programdata
« Reply #4 on: April 23, 2020, 03:01:07 pm »
I think you have the configuration of p3d confused. The only time you add an add-on.cfg entry manually is if you do NOT have a folder in my documents. If you have a folder in mydocuments that has an add-on.xml and start p3d, it adds an entry to the add-on.cfg in your appdata by itself. If you have an entry in your add-on.cfg in the programdata AND the mydocuments it is adding your addon twice. And people that have this duplicate entry I have found have instances of random CTD or gsx not loading.
« Last Edit: April 23, 2020, 05:44:00 pm by virtuali »

pete_auau

  • Sr. Member
  • ****
  • Posts: 418
Re: Installer should not put entries in add-on.cfg in programdata
« Reply #5 on: April 23, 2020, 04:01:40 pm »
And  if  this  was  the  case  than why  hasnt  everyone  been  effected   seems  that  it  been user  error  or  what  they have  done  to  their  install
« Last Edit: April 23, 2020, 05:44:11 pm by virtuali »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51439
    • VIRTUALI Sagl
Re: Installer should not put entries in add-on.cfg in programdata
« Reply #6 on: April 23, 2020, 05:57:09 pm »
I think you have the configuration of p3d confused

It's you that have the configuration of P3D confused. I'm trying to explain it in so many ways, yet you still don't seem to understand.

Quote
The only time you add an add-on.cfg entry manually is if you do NOT have a folder in my documents

Irrelevant in this case. Having an add-on.xml in the Documents folder, it's only what triggers the QUESTION "do you want to activate ?" from P3D which, again, is what is called Auto-discovery. But that doesn't automatically mean that, if you ALSO add they entry using the P3D command line utilities, this will create a "double entry". The simulator check for that, and it will not do any question, if the add-on has already being found active by means of the add-on.cfg in %PROGRAMDATA%. No question, no double entry.

Quote
If you have a folder in mydocuments that has an add-on.xml and start p3d, it adds an entry to the add-on.cfg in your appdata by itself.

No. It only triggers the QUESTION! Which doesn't appear if there's already an entry for the same add-on in the add-on.cfg in %PROGRAMDATA% so, no question, NO double entry.


Quote
If you have an entry in your add-on.cfg in the programdata AND the mydocuments it is adding your addon twice.

NOOOOOO!!! The only thing this can possibly happen, if if either you or an external utility has created that entry by itself. The simulator, on its own, will never create a double entry in %APPDATA% "just" because there's an add-on.xml in the Documents folder, it will ONLY create an entry in %APPDATA% if ALL the following are true:

1) There's an add-on.xml in the Documents folder

AND

2) There's NO entry for that add-on in ANY of the two add-on.cfg files in %PROGRAMDATA% OR %APPDATA%

AND

3) You reply YES to the question about activating the addon, which will only be made if #2 is valid.

Again, the simulator, on its own, will never create double entries.

Quote
And people that have this duplicate entry I have found have instances of random CTD or gsx not loading.

If the had double entries because either of this happened:

- They created the double entries themsleves

OR

- An external utility that that for some reason wanted to have all the add-ons in %APPDATA%, so it decided to "move" the entries from %PROGRAMDATA% to %APPDATA%, either haven't removed it correctly, or it was *PREVENTED* doing so, because it ran with limited permissions, so it *could* successfully copy the entry from %PROGRAMDATA% to %APPDATA%, but it failed to remove it from %PROGRAMDATA%, thus creating a double entry.

Of course, if what you are saying was true, that "our installer creates double entries", which obviously isn't, we would have many thousands of users complaining about that, which is clearly not the case.
« Last Edit: April 23, 2020, 06:00:36 pm by virtuali »