[
  {
    "Id": "208672",
    "ThreadId": "61506",
    "Html": "<p style=\"margin:0cm 0cm 10pt\"><span lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">With <span>&nbsp;</span>version 1.8.4.5. of the Mobile the DotNetZip <span>&nbsp;</span>library I have a question (compact Framework 3.5). When I update a File in a password protected Zip. Then de updated file itself in the Zip is not password protected anymore (w.a.w. I can extract it without PW), While the rest of the files still have password protection. How can I set password protection on the file I update?</span></span></span></p>\r\n<p style=\"margin:0cm 0cm 10pt\"><span lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">here the code&nbsp;I used:\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">Dim</span> ZipToUpdate <span style=\"color:Blue\">As</span> <span style=\"color:Blue\">String</span> = <span style=\"color:#A31515\">&quot;\\Program Files\\Shell\\Zipfile.dat&quot;</span>\r\n<span style=\"color:Blue\">Dim</span> FileToUpdate <span style=\"color:Blue\">As</span> <span style=\"color:Blue\">String</span> = <span style=\"color:#A31515\">&quot;\\Storage Card\\Shell\\File.txt&quot;</span>\r\n<span style=\"color:Blue\">Using</span> MyZip <span style=\"color:Blue\">As</span> ZipFile = ZipFile.Read(ZipToUpdate)\r\nMyZip.UpdateFile(FileToUpdate, <span style=\"color:#A31515\">&quot;&quot;</span>)\r\n      MyZip.Password = <span style=\"color:#A31515\">&quot;12345678&quot;</span>\r\n      MyZip.Save()\r\n<span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Using</span></pre>\r\n</div>\r\n</span></span></span></p>",
    "PostedDate": "2009-07-05T06:53:31.173-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "208679",
    "ThreadId": "61506",
    "Html": "<p>Set the Password property before you call UpdateFile().&nbsp;</p>\r\n<pre>Dim ZipToUpdate As String = &quot;\\Program Files\\Shell\\Zipfile.dat&quot;\r\nDim FileToUpdate As String = &quot;\\Storage Card\\Shell\\File.txt&quot;\r\nUsing MyZip As ZipFile = ZipFile.Read(ZipToUpdate)\r\n    MyZip.Password = &quot;12345678&quot;\r\n    MyZip.UpdateFile(FileToUpdate, &quot;&quot;)\r\n    MyZip.Save()\r\nEnd Using\r\n</pre>\r\n<p>Some additional info - In your code, after ZipFile.Read(), you call UpdateFile(). At this point there is no Password property set on the MyZip variable. (in other words, the PAssword is Nothing) So, no password is used when adding/updating any new entries, as you do with UpdateFile(). If you later set a password on the ZipFile instance, it does not apply to all entries in the zip file. It applies only to entries subsequently added or updated. In your code, it applies to no entries, because you don't add or update any entries after setting the Password.</p>\r\n<p>For more on this, see the doc for the ZipFile.Password property.</p>",
    "PostedDate": "2009-07-05T07:48:28.383-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "208697",
    "ThreadId": "61506",
    "Html": "<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">Hi</span></span></span></p>\r\n<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\"><strong>Great thanks for your quick response&hellip;.</strong><br>And Yes that did it, Now it Works like a charm. </span></span></span></p>\r\n<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">PS. Can&rsquo;t open HTML doc, left pane is visible right one <span style=\"\">&nbsp;</span>not..</span></span></span></p>\r\n<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">Thanks again!</span></span></span></p>\r\n<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">Mike</span></span></span></p>",
    "PostedDate": "2009-07-05T12:13:44.413-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "208702",
    "ThreadId": "61506",
    "Html": "<p>Mike,</p>\r\n<p>From the home page:</p>\r\n<p><strong>I cannot view the CHM documentation. The error is: &quot;This program cannot display the webpage.&quot; or, &quot;The address is invalid.&quot; Is there an error with the chm file?<br></strong>No, there is no problem with the CHM file. You have likely encountered a problem with Windows protection of files downloaded from less trusted locations. To view the chm file, within Windows Explorer, right-click on the CHM file, select properties, and Unblock it (button in lower part of properties window).</p>",
    "PostedDate": "2009-07-05T12:34:28.337-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "208723",
    "ThreadId": "61506",
    "Html": "<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">Cheeso,</span></span></span></p>\r\n<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-family:Calibri;font-size:small\">Sorry, overlookt on the home page, was to bussy reading the discussions..<br>And </span></span><span style=\"\" lang=EN-US><span style=\"font-family:Calibri;font-size:small\">I Never </span></span><span style=\"line-height:115%;font-family:'Verdana','sans-serif';font-size:10pt\" lang=EN-US>noticed</span><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\"> the UnBlock button there. UnBlocked the file and now&nbsp;I Can read it&hellip;<br></span></span></span>\r\n<p style=\"margin:0cm 0cm 10pt\"><span style=\"\" lang=EN-US><span style=\"font-size:small\"><span style=\"font-family:Calibri\">Many thanks again.</span></span></span></p>\r\n<p><span style=\"line-height:115%;font-family:'Calibri','sans-serif';font-size:11pt\" lang=EN-US>Mike</span></p>\r\n<p><span style=\"line-height:115%;font-family:'Calibri','sans-serif';font-size:11pt\" lang=EN-US><span style=\"color:#008080\"><em><span style=\"font-family:Segoe UI;font-size:small\">&quot;Still one hour to go in Sunday, do you never sleep ;-)&quot;</span></em></span></span></p>\r\n</p>",
    "PostedDate": "2009-07-05T13:57:24.4-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]