Skip to content

Problem with self-extracting archive in WPF C# with the DotNetZip library #4

@ilsanto2

Description

@ilsanto2

I tried the following example code, but it doesn't work in WPF C#

using Ionic.Zip;

string DirectoryPath = folder;
using (ZipFile zip = new ZipFile())
{
zip.AddDirectory(DirectoryPath, System.IO.Path.GetFileName(DirectoryPath));
zip.Comment = "This will be embedded into a self-extracting WinForms-based exe";
var options = new SelfExtractorOptions
{
Flavor = SelfExtractorFlavor.WinFormsApplication,
DefaultExtractDirectory = "%USERPROFILE%\\ExtractHere",
PostExtractCommandLine = ExeToRunAfterExtract,
SfxExeWindowTitle = "My Custom Window Title",
RemoveUnpackedFilesAfterExecute = true
};
zip.SaveSelfExtractor("archive.exe", options);
}

names are not found in wpf c# project

SelfExtractorOptions
SelfExtractorFlavor
ExeToRunAfterExtract
SaveSelfExtractor

How can I solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions