Create a self-extracting archive
ZIPBlackbox supports creation of self-extracting protected archives, which are basically Windows PE executable files with all the data embedded in them. The self-extracting option is useful where you need to send a file to a system which has no ZIP software installed. SFX files contain all the ZIP functionality needed to process the data, and are capable of unpacking data themselves without using any third-party software.
Creating self-extracted archives is virtually no different to creation of generic files and is performed with the same TElZIPWriter class. In addition to settings you normally tune-up (algorithms, file name, timestamp), you will also need to adjust the following properties:
ZipWriter.StubSource = SBArcZIP.TSBZIPStubSource.ssFile; ZipWriter.StubName = @"C:\zip\sbconstb.exe"; // the default console stub provided with SecureBlackboxIf you set StubSource to ssStream, you need to handle TElZIPWriter.OnGetStubStream event.
ZipWriter.SFXEnabled = true;
ZipWriter.SFXCopyright = "(C) Doors and Witches, Inc."; ZipWriter.SFXTitle = "Doors and Witches";