cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rakesh_dama
Level 6

How to get the dependencies required for PreInstallation Phase in InstallAnywhere ?

Hello Experts,

Thanks for looking into my concern.

I have few dependencies on third party utilities(sshpass, jq etc) and I need these utilities as part of PreInstallation Phase. Just like the "Install files/Install Speed Folder" under Install Phase, do we have any plugin to include these dependencies as part of preinstallation ?

 

Thanks,

Rakesh.

Labels (1)
0 Kudos
(6) Replies
Revenera_Ian
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi, rakesh_dama. Thank you for your post. You could try using the ExtractToFile Plugin Action in the online HelpNet documentation here: https://helpnet.flexerasoftware.com/installanywhere2018/roottopic.htm#helplibrary/ia_ref_plugins_extracttofile.htm Here is a link to a Knowledge Base article that discusses using the ExtractToFile Plugin Action in the Pre-Install Sequence in more detail: https://community.flexera.com/t5/InstallAnywhere-Knowledge/Extracting-files-during-Pre-Install-with-InstallAnywhere/ta-p/3482 You use the action to extract the executable or installer required to run or install these 3rd-party dependencies in the Pre-Install Sequence of your installer. You could try extracting the file or files to the installer's temporary location then running the executable or installer directly from the temporary location. The Execute/Script Batch file Action could be used to run a command or commands to run the executable / installer as described in the HelpNet documentation here: https://helpnet.flexerasoftware.com/installanywhere2018/roottopic.htm#helplibrary/ia_ref_actions_general_exescriptbat.htm Please give these suggestions a try. Do they work for you? Thanks, Flexera_Ian
0 Kudos

This extracts the file that is already in the target machine. But, it won't package the source file from build machine into installer and extracts on target machine.

0 Kudos

Hi Rakesh,

Thank you for your reply.

You could try combining the suggestions from: https://community.flexera.com/t5/InstallAnywhere-Knowledge/Extracting-files-during-Pre-Install-with-InstallAnywhere/ta-p/348

with the suggestions from: https://community.flexera.com/t5/InstallAnywhere-Knowledge/Use-the-Extract-To-File-Plugin-to-Extract-a-File-So-It-Is-in-the/ta-p/3759

You would include the file in the $DO_NOT_INSTALL$ Magic Folder so that it would be built into the installer but not installed on the target machine. Then you would use the ExtractToFile Plugin Action to extract the file to $INSTALLER_TEMP_DIR$ instead of the installer's classpath.

Thanks,

Ian

0 Kudos

As I have mentioned earlier, I want these files/dependencies as part of Pre-Install phase.

The example in the above link points to Install phase, which is very straight forward.
0 Kudos

Hi Rakesh,

Thank you for your reply.

As a courtesy, I created a working sample project in InstallAnywhere 2018 SP1 that extracts notepad.exe to $INSTALLER_TEMP_DIR$ in the Pre-Install Sequence. I attached a ZIP file containing the sample project. Notepad.exe is built into the sample installer.

Thanks,

Ian

0 Kudos

I have did the same exact steps mentioned in the provided NotepadExtractToFileTest.zip. However i'm getting the following error.

System's temporary directory = C:\Users\test\AppData\Local\Temp
ExtractToFile: target = C:\Users\test\AppData\Local\Temp\702264.tmp\ca-ac-javautils.jar
ExtractToFile: extractWhatURL = jar:file:/C:/Users/test/AppData/Local/Temp/I1632389536/InstallerData/Execute.zip!/$IA_PROJECT_DIR$/res/ca-ac-javautils.jar
Execute Custom Code
class com.zerog.ia.customcode.util.fileutils.ExtractToFile.install() Unexpected Fatal Error:
java.lang.ClassFormatError: Illegal field name "<return>" in class com/zerog/ia/customcode/util/fileutils/OtherUtils
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at com.zerog.ia.customcode.util.fileutils.ExtractToFile.extractResource(ExtractToFile.java:101)
at com.zerog.ia.customcode.util.fileutils.ExtractToFile.install(ExtractToFile.java:43)
at com.zerog.ia.installer.actions.CustomAction.installSelf(Unknown Source)
at com.zerog.ia.installer.actions.PlugInAction.installSelf(Unknown Source)
at com.zerog.ia.installer.util.GenericInstallPanel$2.run(Unknown Source)

0 Kudos