[
  {
    "Id": "1433671",
    "ThreadId": "641124",
    "Html": "Hi,\r<br />\nI have self-extracted zip that packed by DotNetZip (xxx.exe file). During extraction on client machine files that packed are generated with tmp extension, if user close the console window of zip extraction in middle extraction action files with tmp extension are left. Then on the next time of extracting I get exception of file with tmp extension already exist, this can overcome by only deleting those files. I encounter this problem also with different scenario then the one I have just described. <br />\nSince I am publish exe self-extracted file, I don’t have the privilege of running code prior of the extraction to do clean up or catch the exception of failure during extraction.\r<br />\nAny ideas how I can overcome this problem  <br />\n\r<br />\nsome code:\r<br />\n<br />\n private void CreateExtractableZip(string profile, string tragetPath)<br />\n<pre><code>    {\n        //for first time installation\n        using (var zip = new ZipFile())\n        {\n            zip.AddItem(profile, &quot;&quot;);\n            foreach (var file in _commonFiles)\n            {\n                zip.AddItem(file, &quot;&quot;);\n            }\n\n            var sfxOptions = new SelfExtractorSaveOptions\n            {\n                Flavor = SelfExtractorFlavor.ConsoleApplication,\n                PostExtractCommandLine = InstallationManager + InstallationManagerCommand,\n                ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently,\n                ProductName = &quot;My product&quot;,\n                Description = &quot;My product Setup&quot;,\n                DefaultExtractDirectory = &quot;%TEMP%&quot;,\n                RemoveUnpackedFilesAfterExecute = true,\n            };\n\n            zip.ParallelDeflateThreshold = -1;\n            zip.SaveSelfExtractor(tragetPath, sfxOptions);\n\n            SignExecutable(tragetPath);\n        }\n    }</code></pre>\n\nThanks,<br />\n",
    "PostedDate": "2015-07-08T22:59:38.707-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]