cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

Ia_project_dir

Hi,
I am trying to reference a file that hasn't been installed in the pre-install section. When using the action 'Execute ANT script' or any IA action really, it is possible to point to a file such as $IA_PROJECT_DIR$/build.xml. Yet, as an example, if I tried to run the action 'Execute Command' and the command was 'ant -buildfile $IA_PROJECT_DIR$/build.xml', it would not work. Is there a way to reference files that have been packaged into the installer in the same way that IA does?
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

Would $DO_NOT_INSTALL$ or $INSTALLER_LAUNCH_DIR$ (depending where the files come from) work? $IA_PROJECT_DIR$ exists only on the development system, and not on a target system.
0 Kudos
Not applicable

Thanks for your suggestion.

I tried dropping the file in DO_NOT_INSTALL but that doesn't become available until after the "Install" portion of the installer. At your suggestion, I looked into the LAUNCH_INSTALLER_DIR but this doesn't work because the file does not exist there.

If I were to make a CDROM installer, the file would be within the Resource1.zip that gets created (where all the files to be installed are held). When the installer begins, it creates temporary folders, and in one of the folders is the following file: \InstallerData\Disk1\InstData\Resource1.zip. Within this file is a folder called $IA_PROJECT_DIR$ and in that folder within the zip is the file I am trying to get. You are correct that IA_PROJECT_DIR exists only on the development system, but it gets packaged at build time, and it can be used. Actions that ship with IA have the ability to refer to files in $IA_PROJECT_DIR$. I don't know how to access it though.

I did find a plugin that seems to have the ability to pull files from source paths and extract them, which is a perfect solution. The plugin is called ExtractToFile, but I am at a loss on how to use it. If you have any knowledge of this plugin, I could use your help. It asks for a source file and a destination. I give it the source file as $DOLLAR$IA_PROJECT_DIR$DOLLAR$/file.txt but this does not seem to work..
0 Kudos
purcellk24
Level 7

Use the Extract to File plugin just like you are, but make sure that your file.txt is in the $DO_NOT_INSTALL$ folder.

This is something similar to what I do..
Put file.txt in $DO_NOT_INSTALL$ folder
In Pre-Install, use the ExtractToFile plugin
ExtractToFile_Source = $DOLLAR$IA_PROJECT_DIR$DOLLAR$$/$file.txt
ExtractToFile_Destination = $INSTALLER_TEMP_DIR$$/$file.txt
0 Kudos
Not applicable

Thank you, that worked.
0 Kudos