SOURCEDIR remains emtpy? - Advanced Installer Community
Pieter
Posts: 3
Joined: Thu Mar 05, 2020 11:31 am

SOURCEDIR remains emtpy?

I have a very basic installer:
- no dialogs are being shown
- all it does is make some entries in the registry with some paths.

Example of such a path: [SOURCEDIR]..\Dataflex [DFVersion]\

However, we now see that (recently?) the SOURCEDIR property seems to be emtpy when the path is created in the registry.
In the log however, I can see that the path is shown:

MSI (s) (48:B8) [11:16:53:771]: PROPERTY CHANGE: Adding SOURCEDIR property. Its value is '\\srv-pdc\Programmas\ByteGear\Client\'.

What am I missing?

Thanks.

Pieter
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SOURCEDIR remains emtpy?

Hi Pieter and welcome to our forums.

I cannot say why this happens. In order to have a better view about this, please send the AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so I can investigate them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: SOURCEDIR remains emtpy?

Hello Pieter,

My colleague Eusebiu is not currently at the office, therefore I will take over this thread for him.

Thank you for the provided files.

I have had a look over the sent .AIP file and everything seemed to be correct. After doing so, I have further investigated the log file and I could indeed notice that when adding the registry entry, the property is resolved to an empty value:

Code: Select all

MSI (s) (48:B8) [11:16:53:888]: Executing op: RegAddValue(Name=SystemDFPath,Value=.;..\Dataflex 19.1\Bin;..\Dataflex 19.1\Usr;..\Dataflex 19.1\Lib;..\Dataflex 19.1\Bitmaps;..\Dataflex 19.1\Help,)
I have stripped down the .AIP file from its files so I can build it on my machine. After doing so, I have ran the setup and I could notice that the registry was correctly created on my test machine (Win 10 1909). The setup was ran from both a local folder and from a network shared location and the result was the same in both cases.

The registries are written using the WriteRegistryValues Action which is a Windows Installer Standard Action (developed by Microsoft and implemented in the MSI technology - I believe we do not do any modifications here).

Could you please try to test this behavior on multiple machines (e.g. Virtual Machines) and let me know if the issue persists? if it does not, then it might be something related to your developer machine.

Additionally, does this issue reproduce only when the setup is launched from a network location or does this also reproduce when the setup is launched from a local path (e.g. C:\your_msi.msi)?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Pieter
Posts: 3
Joined: Thu Mar 05, 2020 11:31 am

Re: SOURCEDIR remains emtpy?

Hi Catalin,

Thanks for looking into this.

I can't reproduce the behaviour on any of the PC's I have.
But I can reproduce it on a computer of a customer. The installer is launched from a network location (it needs to be launched from there, becuase it needs to know the path it has to use).
Every time I run it on that machine, it goes wrong. The log I provided is from that particular machine.

I do not have access to this computer right now, so I can't give you any details.
But it's not the only PC that has this problem: there are more (other customers have the same issue).

The weird thing is that we've been using this installer for quite a while and never had this issue. It's almost as if the problem is introduced with some Windows Update.

So what do you want me to do?
I've given you the log of the computer that has this issue. Do you need any additional information?
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: SOURCEDIR remains emtpy?

Hello Pieter,

Could you please try to replace the SOURCEDIR property with SourceDir and see if that helps?

The latter (SourceDir property) is the predefined Windows Installer property, while the latter is proprietary to us.

After doing so, please rebuild your project and retest this scenario on a machine where this issue reproduces.

Hope this helps somehow.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Pieter
Posts: 3
Joined: Thu Mar 05, 2020 11:31 am

Re: SOURCEDIR remains emtpy?

Hi Catalin,

I already did.
I actually used SourceDir and replaced it with SOURCEDIR to see if it made any difference. It didn't.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: SOURCEDIR remains emtpy?

Hello Pieter,

First of all, please accept my apologies for the delayed reply, but we were quite busy lately and we also started working from home as of few days ago.

In what regards this, I'm sorry to hear that changing the property did not help.

Unfortunately, I really can not say why this happens as this is a really strange behavior which I do not believe is related to Advanced Installer (as the action that writes the registry values is a standard action, not a custom one - i.e. created by us).

As of today, I have retested the project you have sent me by stripping it down and building it, then launching it from both a normal location and from a network one.

In this scenario, I could think of two things we can try:

1. Try to substitute the SOURCEDIR property. For instance, have a "Set Property"custom action (with sequence) that sets another property to the value of SOURCEDIR and place that at the beginning of the "Install Execution Stage". After doing so, use that property to write the registry.

2. If the above does not work either, I am afraid that the only thing left would be to achieve this through a custom action. For instance, we can have a script that writes the registry for us. In order to fully mimic the default behavior, this custom action should be added as a custom action with sequence and scheduled in "Install Execution Stage" --> "Add resources" action group --> between "WriteRegistryValues" and "WriteINIValues" standard actions.

Hope this helps somehow.

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

Return to “Common Problems”