APPDIR value changes without reason - Advanced Installer Community
TOD
Posts: 14
Joined: Tue Dec 03, 2013 10:48 pm

APPDIR value changes without reason

Hello,

we are having a blocking issue with our installation and update packages, produced with AI.
The only change, a priori, was the update of AI.

The APPDIR property has the correct value, at the beginning of the log (line 253 or 263 for example), and then in the log, we see the line
line 306 : MSI (c) (1C:C0) [10:13:21:813]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'D:\'.
which seems to cause a change in value of APPDIR, without understanding where this value of TARGETDIR can come from?

Our tools are then installed in an "APPDIR" directory, which is not correct.
I joined our 2 .aip projects and a log file of the update.

Thank you for your diligence because we are distraught at this concern while our packages have worked well so far.

In advance, thank you for your help and advice,

Thomas
Attachments
projectsAndLog.zip
(305.33 KiB) Downloaded 292 times
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: APPDIR value changes without reason

Hello Thomas,

Thank you for the provided files.

Unfortunately, I can not say for sure why this happens.

I have had a look over the sent files and I could notice the following:

- the log file is not from a major upgrade process (most likely, it is from a first time install)

- the installed version is 5.2.31, while both your .AIP files have the 5.2.38 version

You have mentioned that the problem occurs during an upgrade, however from the log file it looks like this issue is reproducing in a "first-time install" scenario. Could you please confirm this?
The only change, a priori, was the update of AI.
Could you please give me some more details about this? Are you saying that you have upgraded the version of AI and then this issue started reproducing? If so, could you please let me know the two versions (i.e. upgrade from 13.5 to 17.0).

Additionally, is this issue reproducible on a clean machine, or are you able to reproduce it only on your developer machine? If you did not test this on a clean machine (e.g. a Virtual Machine with a fresh copy of Windows), could you please do so and let me know the outcome?

In order for me to further investigate and test this, could you please forward me the following resources:

- a copy of the .AIP file which was used to build the version 3.2.31 of your setup

- a download link for your setup

by e-mail at support at advancedinstaller dot com?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TOD
Posts: 14
Joined: Tue Dec 03, 2013 10:48 pm

Re: APPDIR value changes without reason

Hello Catalin,
You have mentioned that the problem occurs during an upgrade, however from the log file it looks like this issue is reproducing in a "first-time install" scenario. Could you please confirm this?
No, I confirm that the first installation, produced with the VNextFactorielles-Reseau.aip project file, is going well.
It is when we use, as a major upgrade, the package produced with the VNextFactorielles-Reseau - MAJ.aip project that the problem occurs.

The log file is a log of a major upgrade. I attached a new one, with the same behavior (see lines 231 and 276)
Could you please give me some more details about this? Are you saying that you have upgraded the version of AI and then this issue started reproducing? If so, could you please let me know the two versions (i.e. upgrade from 13.5 to 17.0).
I upgrade AI from 16.6.4, i think, to 17.1.2.
I did not modify anything else in the configuration of the packages, however we had not retested our packages since the end of March, so perhaps this could also be due to the Windows environment?

we have reproduced this on several machines, even in Windows 7. (We use several virtual machines to simulate the different potential environments of our customers)

I also sent you an email with the requested links.

Thanks again
Thomas
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: APPDIR value changes without reason

Hello Thomas,

First of all, thank you for your provided resources - they proved to be really useful.

I've further investigated this scenario and tested it using the provided setup files. At first, everything worked as expected, but after digging a bit more into it, I was finally able to replicate the same behavior on my end. Please allow me to explain:

- first of all, let's talk about the TARGETDIR property. This property specifies the root destination directory for the installation.

If the TARGETDIR property is undefined, the ROOTDRIVE property is used to resolve the path.
If it is not an administrative installation, or if the installer can find no network drives, the installer sets ROOTDRIVE to the local drive that can be written to having the most free space.
Most probably, the above explains why your TARGETDIR is set to D:\.

- now that we got that out of the way, let's talk a little bit about your newer version of your project. One thing I could notice in the newer version is the fact that in the "Custom Actions" page, you have a "SetProperty" custom action that sets the APPDIR property to the USERDIR property.

When trying to trace back the USERDIR property (to find out what is it), I found out that this property is most likely set during the first time install and stored in a configuration file ("EspaceFactorielles.exe.config"), for which you have created a search in the "Searches" page.

Since, at first, I was not able to reproduce this, I was asking myself what would happen if somehow the search would fail. In my case, in order to make the search fail, I simply deleted the config file from the installation directory and, to my surprise, I was able to reproduce the issue:
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'E:\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding APPDATA property. Its value is 'E:\APPDATA\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding Solutio_1_Dir property. Its value is 'E:\APPDATA\Solutio\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding Donnees_2_Dir property. Its value is 'E:\APPDATA\Solutio\Donnees\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding Outils_Dir property. Its value is 'E:\APPDATA\Outils\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding GPS_Dir property. Its value is 'E:\APPDATA\Outils\GPS\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding mail_Dir property. Its value is 'E:\APPDATA\Outils\GPS\mail\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding img_Dir property. Its value is 'E:\APPDATA\Outils\GPS\img\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding css_3_Dir property. Its value is 'E:\APPDATA\Outils\GPS\css\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding images_Dir property. Its value is 'E:\APPDATA\Outils\GPS\images\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding _notes_Dir property. Its value is 'E:\APPDATA\Outils\GPS\_notes\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding js_3_Dir property. Its value is 'E:\APPDATA\Outils\GPS\js\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding font_Dir property. Its value is 'E:\APPDATA\Outils\GPS\font\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding fonts_1_Dir property. Its value is 'E:\APPDATA\Outils\GPS\fonts\'.
MSI (c) (38:58) [04:24:14:479]: PROPERTY CHANGE: Adding bootstrap_Dir property. Its value is 'E:\APPDATA\Outils\GPS\bootstrap\'.
[...]
With that being said, the reason why this happens is because your search is failing on some machines. Please make sure that the search is configured properly.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TOD
Posts: 14
Joined: Tue Dec 03, 2013 10:48 pm

Re: APPDIR value changes without reason

Hello Catalin,

As I told you by email, thank you very much for your research and your explanations.
What is going on now seems pretty clear, but I still cannot understand why it is happening?
And so I can't modify our package so that it works everywhere.

By studying in detail the logs of a working PC and one on which the update does not pass, I notice this:
Début de l'action: 10:07:36: AI_RESTORE_LOCATION.
MSI (c) (C8:48) [10:07:36:467]: Invoking remote custom action. DLL: C:\Users\FORMAT~1\AppData\Local\Temp\MSI944F.tmp, Entrypoint: RestoreLocation
L'action s'est terminée à 10:07:36: AI_RESTORE_LOCATION. Valeur de retour: 1
Début de l'action: 10:07:36: AI_XmlLocator.
Début de l'action: 11:28:23: AI_RESTORE_LOCATION.
MSI (c) (58:C4) [11:28:23:410]: Invoking remote custom action. DLL: C:\Users\FORMAT~1\AppData\Local\Temp\MSI8F84.tmp, Entrypoint: RestoreLocation
MSI (c) (58!30) [11:28:23:613]: PROPERTY CHANGE: Adding APPDIR property. Its value is 'C:\Program Files\VNextFactorielles\'.
L'action s'est terminée à 11:28:23: AI_RESTORE_LOCATION. Valeur de retour: 1
MSI (c) (58:38) [11:28:23:691]: Doing action: AI_XmlLocator
Why the AI_RESTORE_LOCATION action does not produce the same effect and in particular the modification of APPDIR, because it then seems to cause the "non-assignment" of our custom variables (USERDOCS, USERDIR and SR) a few lines below:
MSI (c) (C8:F0) [10:07:36:467]: Doing action: AI_XmlLocator
Début de l'action: 10:07:36: AI_XmlLocator.
MSI (c) (C8:D8) [10:07:36:498]: Invoking remote custom action. DLL: C:\Users\FORMAT~1\AppData\Local\Temp\MSI946F.tmp, Entrypoint: OnXmlLocator
L'action s'est terminée à 10:07:36: AI_XmlLocator. Valeur de retour: 1
MSI (c) (58:38) [11:28:23:691]: Doing action: AI_XmlLocator
Début de l'action: 11:28:23: AI_XmlLocator.
MSI (c) (58:80) [11:28:23:910]: Invoking remote custom action. DLL: C:\Users\FORMAT~1\AppData\Local\Temp\MSI913A.tmp, Entrypoint: OnXmlLocator
MSI (c) (58!0C) [11:28:24:113]: PROPERTY CHANGE: Adding USERDOCS property. Its value is 'C:\Users\formateur\Documents\Factorielles\'.
MSI (c) (58!0C) [11:28:24:160]: PROPERTY CHANGE: Adding SR property. Its value is 'C:\ProgramData\Factorielles\'.
MSI (c) (58!0C) [11:28:24:160]: PROPERTY CHANGE: Adding USERDIR property. Its value is 'C:\Program Files\VNextFactorielles\'.

L'action s'est terminée à 11:28:24: AI_XmlLocator. Valeur de retour: 1
Best regards,

Thomas OD
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: APPDIR value changes without reason

Hello Thomas,
As I told you by email, thank you very much for your research and your explanations.
You are always welcome! It is always my pleasure to help.

Now, coming back to your problem. The AI_RESTORE_LOCATION custom action usually takes place during an upgrade and its' purpose is to set the APPDIR location to the location set in the previously installed package.

This action correctly executes even if in the scenario where the paths are wrong. This can be seen in the log file:
MSI (c) (38:F8) [05:06:37:262]: Invoking remote custom action. DLL: C:\Users\Catalin\AppData\Local\Temp\MSIF933.tmp, Entrypoint: RestoreLocation
MSI (c) (38!90) [05:06:37:277]: PROPERTY CHANGE: Adding APPDIR property. Its value is 'C:\Program Files (x86)\VNextFactorielles\'.
L'action s'est terminée à 5:06:37: AI_RESTORE_LOCATION. Valeur de retour: 1
MSI (c) (38:C4) [05:06:37:277]: Doing action: AI_XmlLocator
Début de l'action: 5:06:37: AI_XmlLocator.
MSI (c) (38:0C) [05:06:37:356]: Invoking remote custom action. DLL: C:\Users\Catalin\AppData\Local\Temp\MSIF982.tmp, Entrypoint: OnXmlLocator
L'action s'est terminée à 5:06:37: AI_XmlLocator. Valeur de retour: 1
MSI (c) (38:C4) [05:06:37:371]: Doing action: SetPropertyAPPDIR
Début de l'action: 5:06:37: SetPropertyAPPDIR.
However, the problem is the fact that the search is executed after the AI_RESTORE_LOCATION custom action, resulting in the value of APPDIR being reset. Unfortunately, in our case, the APPDIR is set to a wrong path, because the search fails.

Most probably, there is a difference between the two configuration files (from both the success and fail scenarios).

Unfortunately, since I was only able to replicate this in the easiest way possible (by deleting the file), I can not say for sure why this happens.

However, in order for me to further investigate this, could you please forward me the two configuration files (one from a machine where it fails and one from a machine where it works)?

Additionally, if possible, could you please name them accordingly so I know which is which (e.g. configFile_success and configFile_fail)?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TOD
Posts: 14
Joined: Tue Dec 03, 2013 10:48 pm

Re: APPDIR value changes without reason

Hello Catalin,
i replied to you by email, attaching the requested files.

Have a nice day,
Thomas
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: APPDIR value changes without reason

Hello Thomas,

Thank you for the provided config files. Unfortunately, that was not of much help as they are literally identical.

I've done some further investigations and here is what I have found:

First of all, the log file you have sent me is not from an upgrade process. The reason why I am saying this is because the OLDPRODUCTS property is not set.

The OLDPRODUCTS property represent a list with the Product Codes of the older versions of your installation package. This property is set only in a package which upgrades another package.

In your case, the property is not set ==> the log can not be from an upgrade process.

If you have a look above, you will notice that I have said I was able to reproduce this when the search was failing - in my case, I made the search fail by deleting the config file.

Based on that, another scenario came to my mind - to install the major version as a first time install (without a previous version installed). When doing so, I was able to reproduce the issue.

What I belive happens here is that you guys are installing the major version without a previous version already installed. That being the case, when the search is executed, the config file is not present on the machine ==> all the paths are wrongly set.

With that being said, could you please make a video in which you showcase the following:

1. install the older version

2. go to the install location and select the config file

3. install the newer version with the log file option (/L*V)

4. recheck the install location for the config file

5. open the log file and check for the APPDIR property

and then forward that video to me?

When you are testing this, please make sure (e.g. Control Panel) that the older version is installed.

Honestly, I can not think of any other scenario. The two config files you have sent me are identical and I can not see a reason why the search would fail on a PC and work on another.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”