[
  {
    "Id": "284275",
    "ThreadId": "82745",
    "Html": "<p>hii,</p>\r\n<p>m using this library to make a selfextracter for my file..but i want in this&nbsp; that..when i extract (or double click the .exe file) it ll not show any window(console or window).</p>\r\n<p>is it possible??</p>\r\n<p>&nbsp;</p>\r\n<p>thanx</p>",
    "PostedDate": "2010-02-01T07:41:45.977-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "284517",
    "ThreadId": "82745",
    "Html": "<p>If you call SaveSelfExtractor() and specify in the self extractor options, Quiet = True, and Flavor = ConsoleApplication, then, when you double click the resulting EXE, you will get a console window that appears briefly, then disappears. Normally it is visible for less than one second.</p>\r\n<p>There's no way to make a completely invisible Self extracting EXE, using just the library.</p>\r\n<p>If you don't like the options available from the API, You can also write your own self-extractor logic.&nbsp; See <a href=\"http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=70602#Post245865\">this post</a> for information and hints.</p>",
    "PostedDate": "2010-02-01T19:06:37.827-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "284650",
    "ThreadId": "82745",
    "Html": "<p>Thanx Cheeso,</p>\r\n<p>I have tried your suggested solution it worked well,its better for case of consoleApplication flavor but in windowsApplication flavor it shows jus progress bar.</p>\r\n<p>But ISn't it possile that in consoleApplication flavor it would not show any console windows(not just for 1/2 sec).completely silent extraction.??</p>\r\n<p>i have tried events which are provided with ZipFile class. i tried to do something at the time of extraction.</p>\r\n<p>&nbsp;</p>\r\n<p>snippet::</p>\r\n<p>public void MakeExtracter()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Zip = new ZipFile();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract = new SelfExtractorSaveOptions();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Zip.ExtractProgress += Zip_ExtractProgress;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _entry=_sourcestr; //_sourcestr is the string variable containg the files;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.Description = &quot;Tru-i Suite&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.DefaultExtractDirectory=@&quot;.\\&quot;;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.Flavor = SelfExtractorFlavor.ConsoleApplication;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.IconFile = _iconstr;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.Quiet = true;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.RemoveUnpackedFilesAfterExecute = true;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (_entrystr != null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {Selfextract.PostExtractCommandLine = _entrystr;} <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OutputPath = _outputstr;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selfextract.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Zip.SaveSelfExtractor(OutputPath, Selfextract);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (Exception ex)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(ex.ToString() +&quot;\\nERROR ::&nbsp; There is some error while creating extracter of the give source files &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>\r\n<p>&nbsp;</p>\r\n<p>void Zip_ExtractProgress(object sender, ExtractProgressEventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (e.EventType == ZipProgressEventType.Extracting_BeforeExtractEntry)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Console.WriteLine(&quot;Extraction Started..And Test Screen&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IntPtr hWnd = FindWindow(null, Console.Title);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (hWnd != IntPtr.Zero)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShowWindow(hWnd, 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>Is it right to use this event like above.it is not responding anything..Can you please help me.?</p>",
    "PostedDate": "2010-02-02T02:34:41.513-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "284981",
    "ThreadId": "82745",
    "Html": "<p>It is not possble, or I don't know of a way to do it, to provide a console application that does not actually use the console.</p>\r\n<p>It is possible to write a winforms application that does not actually show anything.&nbsp; But the self-extractor in DotNetZip does not do that; it shows a progress bar.&nbsp;</p>\r\n<p>In theory, I could add a feature like that.&nbsp; But today you have to write it yourself.</p>\r\n<p>&nbsp;</p>\r\n<p>Regarding your other question about events; the ExtractProgress method is used when you extract.&nbsp; The ZipFile class calls the Extractprogress event handler, once for each entry as it is being extracted.&nbsp; But your code does not extract any entries.&nbsp; Instead you are calling SaveSelfExtractor().&nbsp;&nbsp; Because you are not doing extract operations, the ExtractProgress never gets called.&nbsp;</p>\r\n<p>I think you are misunderstanding something.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-02-02T14:21:37.247-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "284983",
    "ThreadId": "82745",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=10144\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-02-02T14:23:34.393-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "285788",
    "ThreadId": "82745",
    "Html": "Hii,\r\ni am trying to customize the SaveSelfExtractor()\r\nBut i just remove all the lines where it uses ionic.snk file then it showing me error\r\n\r\nERROR ::\r\nError reading resource file '..\\Zip Partial DLL\\Resources\\ZippedResources.zip' -- 'The system cannot find the file specified. '\tZip Partial DLL\r\n\r\nHow can i resolve this error??.\r\n\r\n",
    "PostedDate": "2010-02-04T06:30:17.84-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "285994",
    "ThreadId": "82745",
    "Html": "<p>Ask yourself if you really need to re-build the library.</p>\r\n<p>I referenced a post above that shows you how to create your own self-extractor without re-building the library. It's much simpler than re-building the library.</p>\r\n<p>To directly answer your question - I don't know why your build is not working. If I wanted to diagnose the build error I would look closely through the build log to try to see if there are any indications there of a problem.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-02-04T15:30:25.717-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "286117",
    "ThreadId": "82745",
    "Html": "<p>thanx cheeso,</p>\r\n<p>but i just change the CommandLineSelfExtractorStub.cs file and build the library again..But i would not building .If you can suggest me any other solution except rebuilding the library then .</p>\r\n<p>from the referenced post you had provided .i couldn't get how can i use the library any try to customize the code in my way.</p>\r\n<p>I simply want that there should not be any commandprompt open when i try to execute selfextractor file. and for this i am doing this.</p>\r\n<p>please suggest me some solution which you think willl help me.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-02-04T23:57:01.383-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "286121",
    "ThreadId": "82745",
    "Html": "if this could help you to resolve error::\r\n\r\nSystem.ArgumentException: The stream must be non-null\r\n\r\nParameter name: zipStream\r\n\r\n   at Ionic.Zip.ZipFile.Read(Stream zipStream, TextWriter statusMessageWriter, Encoding encoding, EventHandler`1 readProgress) in D:\\Downloads\\DotNetZip-src-v1.9.1.2\\DotN\r\netZip\\Zip Partial DLL\\ZipFile.Read.cs:line 836\r\n\r\n   at Ionic.Zip.ZipFile._SaveSfxStub(String exeToGenerate, SelfExtractorSaveOptions options) in D:\\Downloads\\DotNetZip-src-v1.9.1.2\\DotNetZip\\Zip Partial DLL\\ZipFile.Save\r\nSelfExtractor.cs:line 734\r\n\r\n   at Ionic.Zip.ZipFile.SaveSelfExtractor(String exeToGenerate, SelfExtractorSaveOptions options) in D:\\Downloads\\DotNetZip-src-v1.9.1.2\\DotNetZip\\Zip Partial DLL\\ZipFile\r\n.SaveSelfExtractor.cs:line 625\r\n\r\n",
    "PostedDate": "2010-02-05T00:14:48.617-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "286177",
    "ThreadId": "82745",
    "Html": "<p>I don't know what that exception is for.&nbsp; I understood you were having trouble building the source code.&nbsp; The exception seems to be a different problem entirely.&nbsp; Can we focus on one problem at a time, please?</p>\r\n<p>Regarding the suggestion you requested, for building a silent self-extractor.&nbsp;&nbsp; As I said above, two different times, my suggestion is: <strong>please read this post</strong>:<br> <a href=\"http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=70602#Post245865\">http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=70602#Post245865</a>&nbsp; and do what it says.</p>\r\n<p>Have you done this?&nbsp; What results did you get?&nbsp; I know you want your problem to be solved.&nbsp; But I am providing answers and you seem to be ignoring them.&nbsp; Then you ask the question again.&nbsp; My answer is still the same.&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-02-05T04:38:07.45-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "286210",
    "ThreadId": "82745",
    "Html": "thanx cheeso,\r\ni have resolved the problem.and successfully build the source code..In the above link you provided,i simply can't get how can you just write your own code for Self-Extractor()..where we are using the library.\r\n",
    "PostedDate": "2010-02-05T05:27:35.42-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "286212",
    "ThreadId": "82745",
    "Html": "<p>&gt; i simply can't get how can you just write your own code for Self-Extractor()..where we are using the library.</p>\r\n<p>Compile your custom self-extractor logic into an EXE.&nbsp; During extraction, the EXE should read itself, as a zipfile.&nbsp;</p>\r\n<p>Then, when saving the zip file, open a stream.&nbsp; Write the bytes from the exe to the stream.&nbsp; then save the zipfile to the same stream.&nbsp; Close the stream.&nbsp; The resulting file is both an exe and a zipfile.&nbsp;</p>",
    "PostedDate": "2010-02-05T05:33:13.863-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "286232",
    "ThreadId": "82745",
    "Html": "Thanx Cheeso\r\n",
    "PostedDate": "2010-02-05T06:10:54.823-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]