Zsolt Kollarits
Posts: 405
Joined: Fri May 29, 2015 10:36 am

Unintended change of installation folder on upgrade

Dear Support Team,

We have recently upgraded customer's PC by the latest version of our server from 2023 U1 to 2025 U3. The upgrade was done the usual way like many times before so that the old version isn't removed first.

Everything seemed to go as usual but then we discovered that all Windows scheduled tasks that runs one of our application at different times, didn't work anymore.

The reason for that was that installation location D:\Program Files\<our product folder> was changed to default C:\Program Files\<our product folder>. The installation location away from OS disk was configured many years and many versions ago and now upgrade changed that without any notification.

As you know, our product's upgrade wizard doesn't ask installation locations so this was very unwanted surprise.

Do you know what this happened with the customer?

Best regards,
Zsolt
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Unintended change of installation folder on upgrade

Hello Zsolt,

To be quite honest, I can't say for sure why this happened.

I'm assuming that the "Use original installation path when upgrading" option is enabled in the "Upgrades" page, correct?

Also, this issue only happens one one customer's machine, is that correct?

If possible, could you please share with me a copy of the AIP file and the log file from the customer's machine so I can further investigate them? I think the log file will give us some more clues as to what exactly happened.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 405
Joined: Fri May 29, 2015 10:36 am

Re: Unintended change of installation folder on upgrade

Dear Catalin,

I've just sent the requested files for you via email.

Best regards,
Zsolt
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Unintended change of installation folder on upgrade

Hello Zsolt,

Thank you for the provided files.

I have had a look over the sent log and AIP file, and I think the culprit might be a custom action that is setting APPDIR to "C:\Program Files".

In the log file, I found the following:

Code: Select all

Action start 15:42:47: Init_InstallDir_Prop.
MSI (c) (FC:DC) [15:42:47:169]: Creating MSIHANDLE (1105) of type 790531 for thread 6108
MSI (c) (FC:DC) [15:42:47:169]: Closing MSIHANDLE (1105) of type 790531 for thread 6108
MSI (c) (FC:48) [15:42:47:169]: PROPERTY CHANGE: Adding APPDIR property. Its value is 'C:\Program Files\Therefore'.
If I check the AIP file, I can see the followng custom action:
Screenshot_124.png
Screenshot_124.png (3.11 KiB) Viewed 12094 times

This custom action specifically sets APPDIR to ProgramFiles64Folder which is exactly C:\Program Files.


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 405
Joined: Fri May 29, 2015 10:36 am

Re: Unintended change of installation folder on upgrade

Dear Catalin,

Thank you for checkin this!

How could we achieve the following:
1. If our product is first-time-installed, then the default install location should be offered as C:\Program Files\<our product name> -> this is happening now
2. If an older version of our product is installed already on a customer's PC, then the install location should be taken over, so the original install location should be used.

By the way, I still think there might be an issue in Advanced Installer: so far our customers sometimes selected a different install location than Program Files, but always on their C drive -> on product upgrade the folder they have selected was used by the installer.
For me it seems the issue is happening only if the disk drive is not the same. Can it be the case?

Best regards,
Zsolt
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Unintended change of installation folder on upgrade

Hello Zsolt,
Thank you for checkin this!
You are always welcome! :)
If an older version of our product is installed already on a customer's PC, then the install location should be taken over, so the original install location should be used.
This is usually achieved via the "Use original installation path when upgrading" option, but this is not enabled for side by side installation for obvious reasons, as you need different installation folders to avoid overwriting files.
Screenshot_127.png
Screenshot_127.png (7.71 KiB) Viewed 10997 times

Do you offer the customers the possibility to install side by side? From what I've seen in the "Dialogs" page, you do not seem to have the UpgradeDlg dialog added which is the one that allows the user to choose whether they want to upgrade the older version or to install side by side.

If we want to preserve the install path during an upgrade, we can achieve it similarly with how our support works when the "Use original installation path when upgrading" option is checked.

That is, to create a search that retrieves the install directory from the registries and then sets the current APPDIR to that.

This seems to be the registry entry that stores APPDIR in your case:
Screenshot_128.png
Screenshot_128.png (52.83 KiB) Viewed 10997 times
By the way, I still think there might be an issue in Advanced Installer: so far our customers sometimes selected a different install location than Program Files, but always on their C drive -> on product upgrade the folder they have selected was used by the installer.
For me it seems the issue is happening only if the disk drive is not the same. Can it be the case?
This can be the case, although it sounds not likely.

Are you able to reproduce this on your end as well? I have tried to do so in a sample but I wasn't able to reproduce it.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 405
Joined: Fri May 29, 2015 10:36 am

Re: Unintended change of installation folder on upgrade

Dear Catalin,

Thank you for your email!

There is a confusion here, we are just testing the side-by-side installation, but it is not released yet. So this "unintended change of disk drive" issue is for sure not related to that, as a customer reported it.

I just sent you an official released .aip file with WeTransfer. Could you please check that .aip and our settings?

Best regards,
Zsolt
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Unintended change of installation folder on upgrade

Hello Zsolt,

Thank you for your followup on this, things are clearer now.

With the "Use original installation path when upgrading" option enabled, you should be able to achieve exactly what you need, e.g.:
1. If our product is first-time-installed, then the default install location should be offered as C:\Program Files\<our product name> -> this is happening now
2. If an older version of our product is installed already on a customer's PC, then the install location should be taken over, so the original install location should be used.
I think the issue here comes from what I mentioned in my previous reply, the custom action that specifically sets APPDIR.

Without that custom action, could you try to retest this and let me know how it goes? For example, you can add a false condition, e.g. 1=2 and rebuild the installer.

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

Return to “Common Problems”