Call a custom action when file download is finished

Need help authoring your installer? Ask the community for tips and advice.
VincentL
Posts: 2
Joined: Mon Oct 30, 2017 8:52 pm

Call a custom action when file download is finished

Postby VincentL » Mon Oct 30, 2017 9:20 pm

Hello everyone,

I followed the instructions described in this tutorial: https://www.youtube.com/watch?v=Bc4n7IO_YTU

Generally it works, but if the archive contains special characters like ä-ű-ő-é-á etc. the file names are messed up after the extraction (seems like an encoding problem).

So I decided to create my own extractor in C#. I'm familiar with the DLL creation/custom action process, but I don't know how to catch the moment when the file download is finished in the installer (so I can call my custom action to extract the downloaded archive).

I would also like to update the status bar, but I already found an example for that here: http://www.advancedinstaller.com/forums/viewtopic.php?f=5&t=27535

Thanks,
Vincent

Sorin
Posts: 583
Joined: Mon May 08, 2017 1:03 pm

Re: Call a custom action when file download is finished

Postby Sorin » Tue Oct 31, 2017 3:48 pm

Hello Vincent and welcome to our forums,

Generally it works, but if the archive contains special characters like ä-ű-ő-é-á etc. the file names are messed up after the extraction (seems like an encoding problem)

I've tested this scenario but couldn't reproduce this issue. Could you give us a clear testcase and the version of Advanced Installer you use, so we could further investigate this issue?

but I don't know how to catch the moment when the file download is finished in the installer (so I can call my custom action to extract the downloaded archive)


Our File Download operation is triggered by "AI_FdInstall" action from "InstallExecutionSequence". You could place your custom action after Add Resources group. Please note that in order to be able to access the file, this custom action should run "When the system is being modified (deferred)".

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

VincentL
Posts: 2
Joined: Mon Oct 30, 2017 8:52 pm

Re: Call a custom action when file download is finished

Postby VincentL » Tue Oct 31, 2017 7:09 pm

Thank you Sorin for the quick answer, I'll try it out soon.

I've tested this scenario but couldn't reproduce this issue. Could you give us a clear testcase and the version of Advanced Installer you use, so we could further investigate this issue?


Yes of course, I created an AI project which extracts a sample zip with random files (no download this time). I'm currently evaluating the 14.4 version of Advanced Installer (Enterprise). I attached the project file and the zip.

Here is what happens on my end: the left side shows how the files are extracted by the installer, the right shows the original zip contents.
Image

If you are using the .NET Framework's ZipArchive Class for the extraction internally, I can help with a solution (I ran into a similar problem using that class).

Best regards,
Vincent
Attachments
extract.zip
the sample zip, originally on my i:\Installer\ directory
(122.88 KiB) Downloaded 7 times
Accented_ZIP_Test.aip
AI project
(14.84 KiB) Downloaded 10 times

Sorin
Posts: 583
Joined: Mon May 08, 2017 1:03 pm

Re: Call a custom action when file download is finished

Postby Sorin » Thu Nov 02, 2017 1:55 pm

Hello,

Thank you for providing a sample. I can reproduce and confirm this issue. A fix will be available in a future version of Advanced Installer.

Unfortunately the only workaround I could think of would be to write your own custom action that extracts the archive.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube


Return to “Building Installers”

Who is online

Users browsing this forum: No registered users and 2 guests