kejpa Posted January 27, 2005 Posted January 27, 2005 Hi! Anyone know how to replace files in a selfextracting CAB archive? I'd like to tweak an installation but I can't write the cahnges back neither with WinZip or WinRar. TIA /Kejpa Quote
Georgen Posted January 27, 2005 Posted January 27, 2005 What you want to do is to change the files while they are inside the CAB file? Why dont you just make the CAB file again? ... but now that you say that, I remember thinking how cool it would be if one could change the contents of a compressed file without compressing it again. Quote
Mike_R Posted January 27, 2005 Posted January 27, 2005 Why would you want to do this? Are you trying to doctor the original Windows OS files? Quote Posting Guidelines Avatar by Lebb
kejpa Posted January 28, 2005 Author Posted January 28, 2005 Why would you want to do this? Are you trying to doctor the original Windows OS files? No not Windows OS, I want to install Adobe Reader silently and without the user needing to interfer. In order to do that I need to change a few properties in one of the files (abcpy.ini) inside the selfextracting CAB archive. Currently it looks like I have to extract all files, make the changes and ship all of the files instead of just a single one. Takes a whole lot of more place too :( /Kejpa Quote
Mike_R Posted January 28, 2005 Posted January 28, 2005 I don't think you can get around that realistically. Compression works by substituting values with much-shorter-length tokens (just a few bits per token) The most frequent values get the shorter tokens. The data you are adding likely is using some new values not already present in the table/dictionary, so they would need to be added to the table in addition to your data. You'd have to know where this table is and how it is setup. And then even "inserting" your data would be a very, very sensitive concept, slip on one bit and the entire file beyond the insertion point is completely corrupted. Even if this were your own compression algorithm and you therefore knew how it worked extensively, you would still find it extremely hard to insert data like this, I think. I do think the only reasonable approach is de-compress, edit, and then re-compress, I'm afraid... Quote Posting Guidelines Avatar by Lebb
kejpa Posted January 31, 2005 Author Posted January 31, 2005 ... the only reasonable approach is de-compress' date=' edit, and then re-compress, I'm afraid[/quote'] I'm not afraid of that, what I need to know is which program to use. I can extract the file I want to change with Winzip but how do I write the changed file back? /Kejpa Quote
Mike_R Posted January 31, 2005 Posted January 31, 2005 This looks like a decent link: http://www.annoyances.org/exec/show/article01-010 If not what you need, then I'd Google on "CAB Writer" or "Cabinet Files", etc... Quote Posting Guidelines Avatar by Lebb
Rick_Fla Posted January 31, 2005 Posted January 31, 2005 Cabinet SDK mentions the CABview that is also mentioned in the link Mike_R provided. But if you wanted to build your own CAB tools, see if that help. Quote "Nobody knows what I do until I stop doing it."
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.