Post-Install Prerequisite - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

virgil
Posts: 22
Joined: Sat Mar 19, 2011 1:40 am

Post-Install Prerequisite

I'm seeking advice for the best solution to the following task;

When a global variable is set on the installer command line:
- Download a file using the global variable as part of the URL (ie MY_VAR="SOMEFILE.ZIP", set URL as http://myserver.com/[MY_VAR])
- Retrieve the path of the downloaded file and pass that as the command line to an executable contained in the installer (ie [APPDIR]\MyMod.exe /i [DOWNLOADEDFILE])

This needs to occur post-install, as MyMod.exe is part of the installed product.

I looked at the Post-Install prerequisite feature, but according to the documentation, the fields only accept Formatted types when it's a feature based install.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Post-Install Prerequisite

Hello,

I'm afraid you cannot achieve this using our "Prerequisites" feature. In order to achieve what you want you should use custom actions.

Here're the steps to proceed:
- Add a "Set installer property" (i.e. SetURL) custom action with sequence, under "Install Execution Stage" -> "Begin" standard action, like this: - Add a "Launch attached file" custom action with sequence scheduled after "SetUrl" custom action which will download the related file from "URLPATH" and set a property (i.e DOWNLOADEDFILE) with the downloaded file path. Also, you should use the following condition for this custom action: NOT Installed.
- Add a "Launch installed file" custom action with sequence scheduled after "Install Execution Stage" -> "Add Resources" standard action, like this:
  • Source Path: MyMod.exe
    Properties: /i [DOWNLOADEDFILE]
    Condition: NOT Installed
- Also, this custom action should run as "Deferred with no impersonation".
- Build and run your project.

If you have any question let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”