[
  {
    "Id": "226008",
    "ThreadId": "66529",
    "Html": "<p>Hello,</p>\r\n<p>I have created a self extracting executable using the following code:</p>\r\n<p>&nbsp;</p>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Create a new zip file instance</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using (ZipFile zip = new ZipFile())</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Set the password, encryption type, and comment</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.Password = password;</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.Encryption = EncryptionAlgorithm.WinZipAes256;</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.Comment = &quot;This program contains a zipped archive of your Patient Health Information. &nbsp;The sensitive nature of this data requires the security and encryption provided within. &nbsp;To extract the data, you will be required to provide the password originally used to secure it. &nbsp;Please contact your physician's office if you have problems accessing your data.&quot;;</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// If a byte array was sent in then add it</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (fileByteArray != null) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.AddEntry(fileName, &quot;&quot;, fileByteArray); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Else if a path to a file was sent in then add it</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if (fileNameWithPath != string.Empty) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.AddFile(fileNameWithPath, &quot;&quot;);</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Else if we have an array of file names</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if (fileNameWithPathArray != null)</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Loop through each of the files in the array</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;foreach (string currentFileName in fileNameWithPathArray)</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Add the file to the zip archive</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.AddFile(currentFileName, &quot;&quot;);</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Create the self extracting zip</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.SaveSelfExtractor(textBoxFolder.Text + &quot;\\\\&quot; + &quot;Patient Data Self Extractor.exe&quot;, SelfExtractorFlavor.WinFormsApplication);</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Close the dialog</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.Close();</div>\r\n<div id=\"_mcePaste\" style=\"left:-10000px;top:0px;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>\r\n<p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Create a new zip file instance</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using (ZipFile zip = new ZipFile())</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Set the password, encryption type, and comment</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.Password = password;</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.Encryption = EncryptionAlgorithm.WinZipAes256;</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// If a byte array was sent in then add it</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (fileByteArray != null) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.AddEntry(fileName, &quot;&quot;, fileByteArray); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Create the self extracting zip</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zip.SaveSelfExtractor(textBoxFolder.Text + &quot;\\\\&quot; + &quot;Self Extractor.exe&quot;, SelfExtractorFlavor.WinFormsApplication);</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Close the dialog</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.Close();</p>\r\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p>\r\n</p>\r\n<p>&nbsp;</p>\r\n<p>When I run the executable that is created I end up seeing a command prompt behind the form. &nbsp;I was under the impression that setting the SelfExtractorFlavor to WinFormsApplication was what controls the hiding and showing of the command prompt.</p>\r\n<p>Maybe there is a bug in the application or I may not be doing something quite right.</p>\r\n<p>Anyone have any ideas?</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n<p>Fred</p>",
    "PostedDate": "2009-08-20T12:55:04.443-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226028",
    "ThreadId": "66529",
    "Html": "<p>How are you running the executable that is created?&nbsp; Are you doing this from code?&nbsp; in&nbsp;a WinForms app?&nbsp; Can you show me the code?&nbsp;</p>",
    "PostedDate": "2009-08-20T13:34:36.023-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226034",
    "ThreadId": "66529",
    "Html": "<p>If you use the System.Diagnostics.Process class, and specify in the <a href=\"http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.aspx\">StartInfo</a>, WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden, you won't get a window in the background. Example:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">private</span> <span style=\"color:Blue\">void</span> button_Click(<span style=\"color:Blue\">object</span> sender, EventArgs e)\r\n{\r\n    p = <span style=\"color:Blue\">new</span> System.Diagnostics.Process\r\n    {\r\n        StartInfo = <span style=\"color:Blue\">new</span> System.Diagnostics.ProcessStartInfo\r\n        {\r\n            WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden,\r\n            FileName = <span style=\"color:#A31515\">@&quot;c:\\dinoch\\dev\\dotnet\\zip\\test\\CreateSfx2-console-archive.exe&quot;</span>,\r\n            Arguments = <span style=\"color:#A31515\">&quot;-o&quot;</span>\r\n        }\r\n    };\r\n    p.Start();\r\n    <span style=\"color:Green\">//p.WaitForExit(); // optional</span>\r\n}\r\n\r\n</pre>\r\n</div>\r\n<p>This has nothing to do with DotNetZip. It's a feature of System.Diagnostics.Process.</p>\r\n<p>Setting the SelfExtractorFlavor to WinFormsApplication, and running the&nbsp;resulting exe, will cause a Windows GUI to be displayed.&nbsp; It's not a command prompt.&nbsp; It's a small windows application&nbsp;with a few buttons on it.&nbsp;&nbsp; Example:</p>\r\n<p><img src=\"http://i28.tinypic.com/2ykm8ia.jpg\" alt=\"\"></p>\r\n<p>If you use WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden with a SFX that is a WinFormsApplication, and launch it the same way, no window will be displayed, and no files will be extracted.&nbsp; The self-extracting GUI app will just run, invisibly, waiting for a button click that never comes.</p>",
    "PostedDate": "2009-08-20T13:45:33.037-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226045",
    "ThreadId": "66529",
    "Html": "<blockquote style=\"border:solid .1em #ccc;font-style:italic;margin:.25em 1em 0 1em;padding:0 .25em 0 .25em\"><strong>Cheeso wrote:</strong><br>\r\n<p>How are you running the executable that is created?&nbsp; Are you doing this from code?&nbsp; in&nbsp;a WinForms app?&nbsp; Can you show me the code?&nbsp;</p>\r\n</blockquote>\r\n<p>Hey Cheeso,</p>\r\n<p>Using the code in my original question I end up creating an executable. &nbsp;We plan on the end user simply double clicking on this .exe file in order to run the self extractor like the one you've shown. &nbsp;When the user double clicks on the file I see the self-extractor but behind it I see the command window that I mentioned.</p>\r\n<p>Thanks for your quick responses.</p>\r\n<p>Fred</p>",
    "PostedDate": "2009-08-20T14:12:20.563-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226049",
    "ThreadId": "66529",
    "Html": "<p>ok, I see what you mean.</p>",
    "PostedDate": "2009-08-20T14:24:46.333-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226054",
    "ThreadId": "66529",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=8595\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2009-08-20T14:37:03.763-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226374",
    "ThreadId": "66529",
    "Html": "<p>This is fixed in v1.8.4.21.&nbsp; available now.</p>",
    "PostedDate": "2009-08-21T08:45:23.76-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "226723",
    "ThreadId": "66529",
    "Html": "<p>Thanks for the quick attention to this. &nbsp;Very appreciated.</p>\r\n<p>&nbsp;</p>\r\n<p>Fred</p>",
    "PostedDate": "2009-08-22T14:43:31.167-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]