This project is read-only.

Files with tmp extesion are prevent extraction of selfextracted exe file

Jul 9, 2015 at 6:59 AM
I 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.
Since 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.
Any ideas how I can overcome this problem

some code:

private void CreateExtractableZip(string profile, string tragetPath)
        //for first time installation
        using (var zip = new ZipFile())
            zip.AddItem(profile, "");
            foreach (var file in _commonFiles)
                zip.AddItem(file, "");

            var sfxOptions = new SelfExtractorSaveOptions
                Flavor = SelfExtractorFlavor.ConsoleApplication,
                PostExtractCommandLine = InstallationManager + InstallationManagerCommand,
                ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently,
                ProductName = "My product",
                Description = "My product Setup",
                DefaultExtractDirectory = "%TEMP%",
                RemoveUnpackedFilesAfterExecute = true,

            zip.ParallelDeflateThreshold = -1;
            zip.SaveSelfExtractor(tragetPath, sfxOptions);