ash77
Posts: 4
Joined: Mon Jun 01, 2020 7:23 pm

Temporary DLL file does not extract during install

I am working on an project that calls a function in a DLL to check system compatibility before install.

I have added the DLL to my project as a temporary file and added a "Call Function From Standard DLL" custom action that calls it. When the installer starts, the DLL is not being extracted to the temp directory, but another temporary file in the project is being extracted. The run log AI_ExtractTempFiles section also does not list the DLL, but does list the other file. When the custom action runs it fails because the DLL does not exist.

I have opened the built .msi file with Advanced Installer and verified that it contains the DLL in the temporary files section. I have also verified the DLL does not have any non-system dependencies.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Temporary DLL file does not extract during install

Hello,

This is quite strange, indeed.
When the installer starts, the DLL is not being extracted to the temp directory, but another temporary file in the project is being extracted.
Did you manually check the %temp% folder and your .DLL file is not there? Or are you saying that the .DLL file is not extracted because the custom action returns an error (i.e. file not found)?

If it is the latter one, please make sure that the custom action is not scheduled before the "CostFinalize" standard action, as that is when the temporary files are copied.

Additionally, could you please let me know how are you calling your .DLL? Are you calling it in a format similar to this: TempFolder\yourDll.dll

If so, could you please try to call it like this:

- in the "Path" field, insert a "[" character (without quotes)

- select "File..."

- select your .DLL

This method is less error prone.

Now, if it is the former one, I'm afraid I can not really say why this is happening.

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

- a copy of your .AIP File

- 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
ash77
Posts: 4
Joined: Mon Jun 01, 2020 7:23 pm

Re: Temporary DLL file does not extract during install

I have verified by (1) visually checking the temp directory (where my other temporary file is created), (2) running ProcessMonitor while running the installer, and (2) checking the install log and they all indicate my temporary file is never created.

I am also using "[#my_file.dll]" to refer to the temporary file, although it likely doesn't matter yet.

I will send you a copy of the project to examine.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Temporary DLL file does not extract during install

Hello Andrew,

Please note I have answered your e-mail.

Looking forward to hearing from you!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ash77
Posts: 4
Joined: Mon Jun 01, 2020 7:23 pm

Re: Temporary DLL file does not extract during install

I just wanted to make sure you successfully downloaded the file.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Temporary DLL file does not extract during install

Hello Andrew,

Yes, I have downloaded the files (I believe I emailed you so you can change the permissions to the files). Did you not receive the e-mail?

It is quite strange, because looking right now at the emails sent I can not find the email, even though I'm pretty positive I've sent it. :?

I will start investigating this and I will let you know once I will have a conclusive answer.

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

Re: Temporary DLL file does not extract during install

Hello Andrew,

Follow up to my last thread:

I have investigated the .AIP file and the problem seems to be the fact that you have not added the .DLL file as a temporary file.

What you have done is simply copy the .DLL file into the "Temporary" folder. Please note that this does not make the .DLL file a temporary file. The setup will indeed install the .DLL into the %temp% folder, but it will be copied during the "Add resources" action group, during the deferred stage of the installation process.

With that being said, please proceed as it follows:

- in "Custom Actions" page, remove the reference to your .DLL file

- remove the .DLL from the "Temporary" folder

- re-add it using the "Add temporary files" button from the toolbar

temp.png
temp.png (139.15 KiB) Viewed 3615 times

As you can see, temporary files are displayed differently (i.e. have different icons) than the normal files.

Hope this helps!

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

Return to “Building Installers”