August 13, 200521 yr Hi!I'd like to integrate my Adobe Acrobat 7.0.0 Professional into my unattended CD. No problems at all with doing it unattended, but there's another error which bothers me.The original file is "AcTR7EFG.exe" which extracts the setup files to the HDD, fine. This msi-setup package contains one big file namend Data1.cab with over 450 MB! Unfortunately this Data1.cab file isn't compressed at all. So I tried to compress it on my own and therefore extracted its contents into a seperate folder and and re-compressed it using the makecab command with the following directives:makecab /F Acro7.ddfAcro7.ddf contains the following:.OPTION EXPLICIT.Set ReservePerCabinetSize=6144.Set DiskDirectoryTemplate=.Set Cabinet=on.Set Compress=on.Set CompressionType=MSZIP.Set CompressionMemory=21.Set CompressionLevel=7.Set CabinetNameTemplate=Data1.cab.Set MaxDiskSize=CDROMA3.tdsA3.tds1A3.tds4A4.tdsA4.tds1[... the other files from the original cab]This works flawlessly and a new compressed Data1.cab is created, this time only 207 MB. And after running the setup.exe the installation process starts and everything is performed well until it comes to copying the files from the now compressed cab. Some files are copied but then setup routine displays an error message which says: Error 1334: The file 'Hanko.html4' cannot be installed because the file cannot be found in the cabinet file 'Data1.cab'. [...]This is weird because the desired file is definately within the cab file, i.e. not missing! Needless to say that I checked it several times. The error causes setup to cancel. Using the original uncompress cab works well. Is there any mistake I make when compressing the original cab or did I forget anything special?Btw using LZX compression is worthless, it would last hours to create the new cab.Thanks for ya help!
August 13, 200521 yr Author Well ... I did some research and found that just re-compressing the cab file doesn't seem to be sufficient. Using Cabinets and Compressed SourcesDoes anyone know more about this? How can I re-compress an existing cab file not destroying the "internal structure" defined in the according msi?Thanks!
August 21, 200521 yr I came across the same problem today, when repackaging MSN Messenger. I had extracted the cab file from the msi, added some patched files and tried to recab and install - same error.Turns out that the files need to be put in the cab file in exactly the same order that they were in originally, or the msi cannot find them.To find this order, use the 'list' function of cabarc (from CAB SDK) and redirect this to a text file :cabarc L data1.cab > file-list.txtThe file file-list.txt will now contain the filenames in the correct order. Just edit this removing all the extra header data and file sizes etc, so it only contains the filenames, without any extra spaces etc, then put this at the end of your ddf file, after the last '.set' command. Recreate the cab file as usual, then try to install.This worked for me, but I have only tried on the one msi so far, so ymmv...SP. Edited August 21, 200521 yr by seapagan
August 27, 200520 yr Author Thanks a lot for your hints! I tried it that way and yeah, they helped to solve my mentioned problems!
August 30, 200520 yr Glad I could help I've played with a few others since, using the same method, and it's worked in all cases.SP
August 31, 200520 yr Turns out that the files need to be put in the cab file in exactly the same order that they were in originally, or the msi cannot find them.To find this order, use the 'list' function of cabarc (from CAB SDK) and redirect this to a text file :cabarc L data1.cab > file-list.txtI'd been used instead:expand -D data1.cab > file-list.txtThe same order is output with less stuff to remove.Testing your method I found some diferences:Microsoft ® Cabinet Tool - Version 5.1.2600.0Copyright © Microsoft Corporation. All rights reserved..Listing of cabinet file '..\ESP\data1.cab' (size 34401925): 441 file(s), 23 folder(s), set ID 1111, cabinet #0Microsoft ® Cabinet Tool - Version 5.1.2600.0Copyright © Microsoft Corporation. All rights reserved..Listing of cabinet file 'data1.cab' (size 34404632): 441 file(s), 1 folder(s), set ID 25053, cabinet #0Now the question is: How to expand the folder estructure?And: How to set the "set ID"? I noted the option in cabarc but I mean using standart Makecab directive.
September 1, 200520 yr @ Nilfred :Yeah, that would be a bit easier, not having to remove headers etc from the text file.For the 'ID' - some installers apparently use that, but I have not found one yet that setting the ID makes a difference. I would recommend checking out the cabsdk from microsoft for more details on the ddf format - however, I have not found any way to set the id from ddf file either. If you really need to do it, use cabarc after makecab to set the ID. Also, cabarc for me defaults to a '0' ID - you are saying that yours gives 25053?Different directories are often used to split compression types, but the list command will tell you these directories, then just build it into the ddf, as described in the docs. The difference in file size is probably due to the directory overhead in the first one.I am really looking for a program that will generate a ddf file from a cab! Is the new generated file working for you? Or is the Install crashing?SP
September 1, 200520 yr I am really looking for a program that will generate a ddf file from a cab! Here you are:@echo offSet diamond=ard7.ddfSet cabinet=..\ESP\data1.cabecho .OPTION EXPLICIT >%diamond%echo .Set ReservePerCabinetSize=6144 >>%diamond%echo .Set DiskDirectoryTemplate= >>%diamond%echo .Set Cabinet=on >>%diamond%echo .Set Compress=on >>%diamond%echo .Set CompressionType=LZX >>%diamond%echo .Set CompressionMemory=21 >>%diamond%echo .Set CompressionLevel=7 >>%diamond%echo .Set CabinetNameTemplate=Data1.cab >>%diamond%echo .Set MaxDiskSize=CDROM >>%diamond%for /f "usebackq delims=: tokens=2" %%i IN (`expand -D %cabinet%`) do echo%%i>>%diamond%expand %cabinet% -F:* .COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\AcroRd32.dll"ATTRIB -r esdupdate.dllCOPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\esdupdate.dll"REM For reader lite this file does not exist:IF EXIST "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\rt3d.dll" COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\rt3d.dll"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\plug_ins\Acroform.api"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\plug_ins\Escript.api"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\Updater\acroaum.exe"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\ActiveX\AcroPDF.dll"REM Update for 7.0.2:COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\AcroRd32Info.exe"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\plug_ins\digsig.api"COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\plug_ins\ppklite.api"REM Swedish only:IF EXIST "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\Rdlang32.sve" COPY /Y "%ProgramFiles%\Adobe\Acrobat 7.0\Reader\Rdlang32.sve"makecab /F %diamond%Is a unfinished working example of AR 7.0.3 update recab (31 Mb). You may get the idea from the first part Bug: Don't ever use a full pathname for the cabinet file because of the colon (':') is used as delimiter.Is the new generated file working for you? Or is the Install crashing?<{POST_SNAPBACK}>No, I just became picky about the diferences: It works anyway.
September 1, 200520 yr Here you are:@echo offSet diamond=ard7.ddfSet cabinet=..\ESP\data1.cab....Thanks for that example Nilfred. Will it also generate the required code in a ddf file to preserve the directory structure?SP
September 2, 200520 yr Will it also generate the required code in a ddf file to preserve the directory structure?<{POST_SNAPBACK}>Educated guess: No.I asked first and you tell me it doesn't matter...This magic line of code remove the undesired stuff from the file list:for /f "usebackq delims=: tokens=2" %%i IN (`expand -D data1.cab`) do echo%%i>>ard7.ddfJust in case you need full pathnames use this line instead:for /f "usebackq delims=: tokens=3" %%i IN (`expand -D c:\somepath\data1.cab`) do echo%%i>>ard7.ddf
September 2, 200520 yr Will it also generate the required code in a ddf file to preserve the directory structure?<{POST_SNAPBACK}>Educated guess: No.I asked first and you tell me it doesn't matter...This magic line of code remove the undesired stuff from the file list:for /f "usebackq delims=: tokens=2" %%i IN (`expand -D data1.cab`) do echo%%i>>ard7.ddfJust in case you need full pathnames use this line instead:for /f "usebackq delims=: tokens=3" %%i IN (`expand -D c:\somepath\data1.cab`) do echo%%i>>ard7.ddf<{POST_SNAPBACK}>That's what I was asking if there was avaliable - a program to automatically generate a ddf from a cab, obviously keeping the correct structure (directories and all).What I actually said was I had never see an installer where the ID mattered, not the directory structure. Anyway, I can generate the ddf by hand in those cases.I did understand what your code was trying to do, I was just confused because it did nothing to preserve the directory structure ....SP
September 2, 200520 yr Well, I already did that code before ask you about the directory structure.The AIP regenerate the directory structure.
January 29, 200719 yr I wanted to bump this back up to see if there had been any progress on automating the re-cab process (in this case recabbing Acrobat 7 Pro VL with all patches up to 7.0.9).Seems like the holy grail (at least for me). I've created an admin point and patched it etc. but I wanted to see if I could get the genie back into the data1.cab using makecab and cabarc.Right now the admin point is 500+mb and I'd like to recompress it all back again. I'm sure it can be done, just don't know how.Anybody?Thanks for your time..Mike
January 30, 200719 yr Progress was done:Generic Data1.cab recompress, Automagically slim down Data1.cab based appsFor Acrobat 7.0.8 some hack should be done for a missing file and trivial add of some registry entries.7.0.9 I din't test yet
Create an account or sign in to comment