I don't know much about scripting, but I know something about compression.
If you want to use CIU to install, then you may use combined method for freearc. Look here
http://fileforums.com/showpost.php?p=405003&postcount=6
Not all files are "precompable" i.e. big container files almost always contain compressed data, so using precomp on them not produce the desired results. You must use try'n'error method.