Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Repackaging custom windows updates/setups

Recommended Posts

floko84    0

Hello Unattenders,

making custom packages is what tweaking any software setup is all about.

I think the usual method is to simply create a sfx-archive with your favorite archiver, which I really dont like as I want packages that give me a nice visible setup when double clicked, with the option to make it unattended.

Inspired by this post I set out to find a newer version of this sfx, and preferably in english since that one has some turkish resources in it - and find it I did:

SfxCab features:

  • subdirs in archive
  • parameter passed to default action/command
  • no config file clutter, very 3rd party unpacker friendly
  • not signed like IExpress packages, i.e. some archivers may be able to modify it

SfxCab limitations:

  • command must be an exefile without parameters
  • can't override default command with something else
  • no fancy icon, in fact no icon whatsoever

Make your own:

  1. Compress your files
    cabarc -m LZX:21 -p -r N ..\outfile.cab *.*
    stub only works with LZX compression
  2. Flag the executable
    open outfile.cab in a hex editor and edit the cab header for your executable like this:
    20 00 setup.exe => 60 00 setup.exe
    all other files should have a 20 00 flag - if not, use cabarc and not a 3rd party archiver
  3. Build the sfx
    copy /b sfxcab.exe + outfile.cab outfile.exe

If you only have an MSI, use setupbld.exe from WIX 3.0+ to convert it to exe.

Find other "Self-Extracting Cabinet" stubs:

The attached stub is taken from the english IE7 setup, the cab-data starts at the 3rd occurrence of "MSCF".

Happy installing,



Edited by floko84

Share this post

Link to post
Share on other sites

erpdude8    2

sfxcab.exe file v6.2.29.0 does not work, floko84. produces "not a valid win32 application" error message, even when following all the steps correctly.

epic fail. :(

but I have an older version of sfxcab that seems to work. anyone can PM me if they want a working version.

Edited by erpdude8

Share this post

Link to post
Share on other sites
tomasz86    70

V6.2.29.0 does work but not the file attached to #1.

You can get a working one from this update:


Download it and rename to any 8.3 filename, ex. "update.exe".

Download pcopy02.zip, extract partcopy.exe from it and use:

partcopy.exe update.exe 0 8E00 sfxcab.exe

"Sfxcab.exe" (you can use any other filename) v1.0.0.0 will be created which can be used instead of the one from #1.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.