ZipArchiverBuildSfx(IEnumerableString, String, String, EncryptionAlgorithm, CompressionMethod, CompressionLevel, String, Boolean, ExtractExistingFileAction, Boolean, String, String, SelfExtractorFlavor, String) Method

Compresses the specified source files or diretories into a self-extracting archive (SFX), with a password, using the specified compression and SFX parameters.

Definition

Namespace: DevCase.ThirdParty.DotNetZip
Assembly: DevCase.net48.ThirdParty.DotNetZip (in DevCase.net48.ThirdParty.DotNetZip.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public string BuildSfx(
	IEnumerable<string> sourceFileOrDirs,
	string outputFilepath,
	string password,
	EncryptionAlgorithm passwordEncryption,
	CompressionMethod compressionMethod,
	CompressionLevel compressionLevel,
	string extractionDirectory,
	bool silentExtraction,
	ExtractExistingFileAction overwriteFiles,
	bool deleteExtractedFilesAfterExtraction,
	string icon,
	string windowTitle,
	SelfExtractorFlavor windowStyle,
	string commandLineArgument
)

Parameters

sourceFileOrDirs  IEnumerableString
The source files or diretories.
outputFilepath  String
The path of the output SFX file to create.
password  String
The password.
passwordEncryption  EncryptionAlgorithm
The encryption algorithm for the password.
compressionMethod  CompressionMethod
The compression method.
compressionLevel  CompressionLevel
The compression level.
extractionDirectory  String
The directory where to extract the SFX contents.

Default value is ".\" (the working directory path)

silentExtraction  Boolean
A value indicating whether to perform a silent extraction.
overwriteFiles  ExtractExistingFileAction
A value indicating whether to overwrite any existing file during the extraction.
deleteExtractedFilesAfterExtraction  Boolean
A value indicating whether to delete the extracted files.
icon  String
The icon for the SFX executable.
windowTitle  String
The window title for the SFX executable.
windowStyle  SelfExtractorFlavor
The window style of the SFX executable.
commandLineArgument  String
The command-line arguments that will be passed to the SFX executable when ran.

Return Value

String
The full path of the resulting compressed file.

Remarks

Note: Some functionalities of this assembly may require to install one or all of the listed NuGet packages:

DotNetZip by Henrik/Dino Chiesa

Exceptions

FileNotFoundException Source file or directory not found.

See Also