Ionic Zip Library v1.9.1.6
RemoveUnpackedFilesAfterExecute Property
Reference ► Ionic.Zip ► SelfExtractorSaveOptions ► RemoveUnpackedFilesAfterExecute
Whether to remove the files that have been unpacked, after executing the
PostExtractCommandLine.
Declaration Syntax
Remarks
If true, and if there is a PostExtractCommandLine, and if the command runs successfully, then the files that the SFX unpacked will be removed, afterwards. If the command does not complete successfully (non-zero return code), that is interpreted as a failure, and the extracted files will not be removed.
Setting this flag, and setting Flavor to SelfExtractorFlavor.ConsoleApplication, and setting Quiet to true, results in an SFX that extracts itself, runs a file that was extracted, then deletes all the files that were extracted, with no intervention by the user. You may also want to specify the default extract location, with DefaultExtractDirectory.