cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jkehoe
Level 4

Extract to file?

Is anybody using this plugin with IA2010? I've seen some posts that explain how to do it in 2008, but not 2010.

I'd like to use this plugin during the Pre-install phase. I have a jar file that will be placed during Install that I'd like to access earlier. The file in my Install phase is in $USER_INSTALL_DIR$/lib in my project. But I can't seem to find the right way to reference it in the plugin's ExtractToFile_Source.

Does anyone have an example of a working "Extract to File"?
Labels (1)
0 Kudos
(5) Replies
sumankg
Level 3

Here is what i do:

1) Extract the file during a pre-install task
ExtractToFile_Source = $DOLLAR$IA_PROJECT_DIR$DOLLAR$/ProjectFiles/Windows/mylibrary32.dll
ExtractToFile_Destination = $INSTALLER_TEMP_DIR$$/$mylibrary32.dll


Note: using the $DOLLAR$ -> during the preinstall seems to resolve to the symbol $ -> which combined with the variable name in between passes to the plugin the correct path to the file.

2) Add the file in the $DO_NOT_INSTALL$ magic folder. Although in my install task I have mylibrary32.dll in the $USER_INSTALL_DIR$ section, you still need to add another identical entry to the $DO_NOT_INSTALL$ magic folder. Without the additional entry I believe your file that you want to extract will be in a different location.

Hope this works for you.
jkehoe
Level 4

Thanks for the help. I don't know anything about the "DO_NOT_INSTALL" folder and I don't see anything about it in the IA help. Does it exist in IA2010?
0 Kudos
sumankg
Level 3

In the install section, InstallAnywhere only shows you the locations that contain files. If you want to add your first item to the $DO_NOT_INSTALL$ folder use the following steps:

In the Install section:
1) Add a file to any existing location, e.g. $USER_INSTALL_DIR$
2) Right click on the file and select Move to Magic Folder -> Other -> DO NOT INSTALL
3) You should see a new section of files with the heading $DO NOT INSTALL$

Going forward you can add files to that new section for any items you need during preinstall.
jkehoe
Level 4

That worked, thanks!
0 Kudos
andyjin
Level 3

Has anyone tried to use this "ExtractToFile" custom code to download file from Internet URL in the pre-install phase?

I have tried it but got "runtime exception" in the install log. Here is what I put in the action dialog:

ExtractToFile_Source=http://somewebsite/somefile.zip
ExtractToFile_Destination=/somefile.zip

The somefile.zip does exist. What did I do wrong?
0 Kudos