我正在尝试创建一个自解压 exe。创建它是没有问题的。我面临的问题是
- 设置exe所在的解压路径
- 运行提取的exe。
对于第二部分,很可能我必须使提取路径正确。我正在使用DotNetZipLibrary中的以下修改代码
zip.AddDirectory(DirectoryPath, "putty.exe");
zip.Comment = "This will be embedded into a self-extracting console-based exe";
SelfExtractorSaveOptions options = new SelfExtractorSaveOptions();
options.Flavor = SelfExtractorFlavor.ConsoleApplication;
options.DefaultExtractDirectory = "";
options.PostExtractCommandLine = "..\\putty.exe";
options.RemoveUnpackedFilesAfterExecute = true;
zip.SaveSelfExtractor("archive.exe", options);