none
Error 1334 .File cannot be found in the Data1.cab

    Question

  • Hi Experts,

    I am working on a Win 7-64 bit machine. I have a software installation package which contains the .msi file, a CAB file and some MST files. I wanted to modify the cabinet file. So I extracted the cab file using CABARC utility.

    But before making any changes to the extracted files, just for testing the utility I removed the original cab file from the current directory. And created a new cab file from the files extracted from the original cab file, again using CABARC utility.

    But now if I run the .msi file, it shows the error.

    ERROR:1334. The file "XYZ" cannot be installed because the file cannot be found in the cabinet file Data1.cab. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package.

    But the file is present in the cabinet file I can see that. The same installer is working fine with the original cab file.

    I have tried different compression types (MSZIP, LZX:<15...21>) as well. But none of them works. I have not removed/added any file in the cabinet file. Am I doing anything wrong or if there is any other information that a cabinet file stores ?

    Thanks.


    Monday, August 26, 2013 10:19 AM

Answers

All replies

  • Hi rsKRISH ,

    Welcome to MSDN forum!

    You  can also use a cabinet file creation tool such as Cabarc.exe to make cabinet files for use with installer packages. This tool writes to the Diamond cabinet structure.

    Please refer the link shown below:

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa367841(v=vs.85).aspx

    Best Regards!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, August 27, 2013 6:05 AM
  • Hi Xiaoliang,

    I was using the Cabrac utility only for extraction and compression both. I've already mentioned it in the question.

    Thanks.

    Wednesday, August 28, 2013 5:59 AM
  • Hi rsKRISH ,

    According to your description, and for more efficient responses, i'd like to move this thread to

    ClickOnce and Setup & Deployment Projects .

    Thanks for your understanding!

    Best Regards!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, August 28, 2013 8:54 AM
  • Hello rsKRISH,

    Thanks for your post.

    I would recommend you read the following article:

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa369279(v=vs.85).aspx

    As you can see,"Add a record to the File table for each of the files in the cabinet. Enter a file key in the File column that exactly matches the file key of the file in the cabinet. The file keys are case-sensitive" There are many things if you want to include a cab file in a msi installation.

    Either a version number or a key number mismatch may cause your problem. The msi cannot find specific component.

    I'm not so sure what is recorded by your original msi, so I recommend you create a new msi yourself to include the cab file you create.

    By the way, here are some related artciles:

    http://support.microsoft.com/kb/176810

    http://support.microsoft.com/kb/191212

    Regards,


    Barry Wang
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, August 28, 2013 9:19 AM
    Moderator
  • Hi Barry,

    Thanks for your suggestions. But I am a bit confused here. The installer package I was using , has an .msi and a cab file. So I suppose cab file is not embedded within .msi. So, i just extracted the cab file using cabarc utility and then compressed it without making any changes, again using cabarc utility. But it does not work afterwards. I don't know it was because of some key value mismatch or anything else.

    Another thing which I noticed that the size of Original cab file was different (lesser) from the cab file which I am creating. I've tried MSZIP and LZX:<15...21> compression algorithms. And the least size which I got was using LZX:21. But still it was more than the original cab file. I can use only these algos because cabarc provides only these compression algorithms. Is there any other compression algorithm that microsoft supports. 

    Also, I found somewhere that the sequence of the files is important. So, I opened the .msi file in Insted tool and looked at the sequence number of each file and made a cab file using Iexpress tool provided by microsoft, putting all the files in the same sequence. But still it doesn't work. Is it correct that the sequence is important?

    Thanks

    rsKRISH 

    Thursday, August 29, 2013 1:52 PM
  • Yes, the file sequence is important - it must match the order of the files in the CAB file.  There are likely to be other things that need to match too, such as the file size in the MSI file may need to match the file size in the cab, maybe the file hash too.

    What problem are you trying to solve that you're doing this for?


    Phil Wilson

    Thursday, August 29, 2013 5:52 PM
    Moderator
  • Hi Phil,

    I wanted to replace a file inside the cab file, the new file will be having the same name as the original one. But, as I mentioned in the question, if I extract the original cab file and again compress it without changing anything. The new cab file is not working.

    Thanks  

    Friday, August 30, 2013 6:01 AM
  • I understand, and I'll repeat the same name is probably the least of the issues. Have updated the MSI file so that the size of the new  file is correct in the File table? Have you updated the version in the file table to match the version of the new file (if it's different)? Is the order of the files in the cab still the same? If there's an entry in the file hash table, have you recomputed the hash of the new file and put it in the MSI file? msifiler.exe can do some of this. You seem to be assuming that the relationship between the MSI file and the can file is a dumb one with no validity checks to ensure the cab is correct.

    Have you looked at links like these?

    http://www.gameaddict.eu/how-to-add-and-or-replace-files-into-an-msi-file/

    http://stackoverflow.com/questions/319894/simplest-solution-to-replace-a-tiny-file-inside-an-msi


    Phil Wilson

    Friday, August 30, 2013 7:09 PM
    Moderator