Simple example to add files to CAB archive

2019-07-02 15:36发布

问题:

I read this post about replacement of CABARC utility. Microsoft help is covering a lot of options in here.

I need simple example how to add 2 files to CAB using makecab.exe utility.

Something like this.

makeCAB.exe file1.dll file2.INF result.cab

回答1:

  1. Create Directive file CABMaker.ddf

    ;*** MAKECAB Directive file .Set Cabinet=on .Set Compress=on file1.dll
    file2.INF

  2. Run C:\WINDOWS\system32\makecab.exe /F CABMaker.ddf