Hello and welcome to Advanced Installer forums,
Since your prerequisite is a .zip archive, I'm afraid you cannot use our predefined support of prerequisites.
However, you can create your own custom action that implements this scenario. For example, you can create your custom action as
a custom action written in C# or
a custom action written in C++.
Then you can go in the
“Custom Actions” page and add a predefined
Launch attached file custom action with sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.
Please take a look on the
Options to integrate and debug custom actions article which may be useful to you.
So, in this custom action, you can check if the related evironment variable exist. For this you can use the
Environment.GetEnvironmentVariable method.
If the environment variable does not exist, you should download the related zip archive. For this you can use the
WebClient.DownloadFile method.
Since the download file is a zip archive, in order to extract the files you can take a look on the
How to: Compress and Extract Files article.
Then you can set the environment variable with the desired value using the
Environment.SetEnvironmentVariable method.
Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging