Extract command fails

Hi,

I am trying to create a fixlet that installs a package on a computer. The fixlet’s action can successfully download the zipped file from my server, but the extract command fails. All that is in the log is:

“Command failed (Unable to extract archive file.) extract Archive.zip (action:28472)”

This doesn’t really tell me too much. Googling the error code had me come across a post online that mentioned A/V software getting in the way. I tried it with the A/V software off and it still failed. I created the zip file with 7zip, if that is any help. Any ideas as to what could be causing the extract command to fail?

Thanks

As its a real ZIP file the extract command can’t handle it as the extract command only can unarchive a BigFix Archive.

7-zip is your friend. Use the “create sfx archive” option to create a self-extracting .exe file.

If you don’t like 7-zip, I’m sure many other archive tools can do this too.

If you would like the “extract” to work on ZIP files I suggest creating an RFE

I believe the original reason to not use the ZIP format was the patent that was held on ZIP but I believe that issue might not be applicable anymore.

Thanks for the suggestions. Are there any resources for working with “RFE?” Thanks

An RFE or “Request For Enhancement” is something you as a customer files to make a suggestion and/or you can vote up existing RFE’s for products you care about

I haven’t used the public interface but it appears to be at: https://www.ibm.com/developerworks/rfe

See this post and the related examples on BigFix.me on how to dynamically use unzip.exe and the 7zip command line tools in ActionScript:

http://bigfix.me/fixlet/details/3876

http://bigfix.me/fixlet/details/3827

See this post about IBM RFEs and PMRs:

I agree that it would be useful if the BigFix/IEM extract command could handle everything 7zip can, especially since the 7zip DLL is available to be used in commercial software.

What I did that eventually wound-up working was to use the Windows Software Distribution Wizard to create the archive. I then modified the fixlet to extract the archive to a specific destination. Online sources I have read say not to use the __Downloads folder for software installation (I don’t recall why). Once I did that the entire task of installing the driver worked just fine.

I created a task for deploying a security tool to scan a PC’s memory on the fly in the background. I ended up using 7-zip using @jgstew’s examples for extraction however I didn’t use the unzip.exe because I cut out the hoopla and just grabbed the 7za.exe file, hashed it, and included it in the pre-fetch. From there, I run it and export everything the application needs to a temp folder.

Grab the file

prefetch 7za.exe sha1:cee178da1fb05f99af7a3547093122893bd1eb46 size:587776 http://iemservername:52311/BESPreCache/7z/7za.exe

Unzip your archive:

waithidden cmd.exe /C __Download\7za.exe x __Download\Application.zip -oC:\TEMP\Application -aoa

Run whatever is needed to be run from the TEMP directory. Here’s an explanation of the flags I used:

The “x” flag is extract
The “o” flag is to name the output
The “-aoa” flag grabs everything in any hierarchy and extracts it as it’s archived and overwrites any files already there without a prompt

This approach also works fine, but I prefer to have my code be globally portable, which is why I use unzip.exe as hosted by IBM for zip files and use both unzip.exe and 7za.exe in combination when I need 7zip. (usually only for unpacking setup executables and other non-zip archives)

This allows my code to be run without the need to pre-cache the 7za.exe on the root server, which I like.

Also, the ActionScript required for unzip.exe & 7za never changes, so it is easy to include where needed.

For most software packages, installing it from __Download isn’t a problem. But some archives with a deep set of embedded directories (I’m looking at you, Office! And you, Visual Studio!) end up exceeding the maximum directory depth when you have to go down c:\program files (x86)\Bigfix Enterprise\BES Client\__Data\__mysite\__Downloads before you get to the installer’s base directory.

1 Like

I got around all of this by extracting to a custom directory and running it from there. That seems to work, for now. Thanks!

Check this one, more about…7zip extractor

Robert