PDA

View Full Version : How to unzip a file and install its contents as part on an installation



Dean H
02-29-2008, 07:35 AM
I have an InstallScript project that requires a Zipped file to be unzipped and installed as part of the installation, how do I do this?

ISNewone
02-29-2008, 09:37 AM
Why do you want to do that though? InstallShileds by its own nature, zipped all your files anyway.

If you want to do it for security reasons (e.g. hide something from hackers), that will never work.

Dean H
02-29-2008, 12:33 PM
The files that are zipped are Adobe Help files. Adobe has changed the way their dynamic links now work so unless the files are zipped, the links incorrectly reference the path on the build machine.

joshstechnij
03-03-2008, 12:14 PM
The only good way of accomplishing this would be to include an unzip utility in the installation and launch it against the installed zip files (they could also be stored in Support Files), or, try to find an open source zip API and include it in as a built DLL you can call from your script.

jazeboy1
06-25-2008, 02:51 AM
I'm having the same issue but I need to extract file paths longer than 8 characters and all the dos utilities I can find only extract short paths and cut off the longer pathnames. can anyone help with a good utility that supports long paths?

rajeevshukla
06-25-2008, 08:39 AM
You can try creating a self extracting executable of the zip file. And then execute the exe to extract it. If you have winzip installed, right click the zip file and convert it to and exe file.

Do let me know if it works.

Cheers,
Rajeev

jazeboy1
06-26-2008, 01:51 AM
Thanks Rajeev,

I am able to do this but I really need to be able to extract a zip file as well as our customers will be adding a simple zip file to easily customise the install?

Any ideas?

idblew
06-26-2008, 03:28 AM
As joshstachnij said


try to find an open source zip API and include it in as a built DLL you can call from your script

I wrote just such a C DLL a couple of years ago and still use it regularly in my installations today.

Try the following link for an example

http://www.wischik.com/lu/programmer/zip_utils.html