简体   繁体   中英

Windows Installer through Visual Studio: Utilizing multiple cabs in an application? Possible?

I have a Windows Installer Project created from Setup and Deployment Project of Visual Studio 2010. In the installer, i have many files that needs to be installed but only a few files that change (say 5% of total files but number of files and their name remain same but their password changes as they are database files) while rest 95% remain same (like image files).

For those 5% files my installer has to run all the time from scratch. Is it possible that VS supports multiple cab creation like

First cab for permanent 95% files

Second cab for changeable 5% files

This 95% cab will be pre-created and i just have to make 2nd cab only but when i install the msi it installs both the cab contents. Is it possible????

This is not supported by Visual Studio setup projects. Some commercial setup authoring tools do support configuring each CAB, but most likely you won't get the behavior you want.

CABs are just containers for the files. The actual file information is stored in the MSI. So generating CABs separately is not a solution because they may not match with the MSI database.

The best you can do is to try finding a setup tool which has a good caching mechanism. This way you would get a reduced build time for your installer.

I did what i wanted but by a little twist.

In my setup project i removed the files which were permanent (image files). This reduced my msi to 1/4th of its earler size and taking only 1/4 of earlier time to create.

Then for those permanent files i wrote a custom action which transferred those files from sourcedir to targetdir.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM