Solved

ZIP FILE/DIRECTORY WITH PASSWORD

Posted on 2013-06-25
15
301 Views
Last Modified: 2013-07-04
Hi All,

I want to zip file/directory with password.

How could I do it ?

Thank you.
0
Comment
Question by:emi_sastra
  • 7
  • 5
  • 3
15 Comments
 
LVL 12

Accepted Solution

by:
mwochnick earned 300 total points
ID: 39276914
Utilize SharpZipLib
http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx


There's an example using SharpZipLib first in C# then in VB
https://github.com/icsharpcode/SharpZipLib/wiki/Zip-Samples
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39276930
Hi mwochnick,

Is there any native from VS ?

Thank you.
0
 
LVL 12

Assisted Solution

by:mwochnick
mwochnick earned 300 total points
ID: 39276972
you could look at the ZipArchive class in .NET 4.5, but I'm not sure if it has a password capability.
http://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive.aspx
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 1

Author Comment

by:emi_sastra
ID: 39277008
Ok.

If I use 3rd party zip, what should I copy to client computer ?

Could we use rar to do so, zip and password using VB Code ?

Thank you.
0
 
LVL 12

Expert Comment

by:mwochnick
ID: 39277923
you should be able to use any of the zip clients that support the zip format.
Winzip
7zip
etc
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39278178
With a 3rd party DLL, you can deploy this DLL as part of your application so it would work on client computers. With a program like RAR, this program will be required to be installed on client computers if you need to zip/unzip from your program so DLL is the way to go in my opinion.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39278398
Hi CodeCruiser,

- if you need to zip/unzip from your program so DLL is the way to go in my opinion.
If I use rar, what dll do I need ?

Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39278481
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39278508
Where is the dll file reside ?

Do I have to add it to references ?

Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39279496
Yes. It will reside in same folder as your program.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39295367
I am sorry, just back.

-Yes. It will reside in same folder as your program.
I mean where is the dll of the 3rd party rar and what is the name ?

Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39297332
Any particular reason for using rar? Free zip libraries can easily be downloaded. I have not seen many for rar (there is a paid chilkot component).
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39298753
-Any particular reason for using rar? Free zip libraries can easily be downloaded. I have not seen many for rar (there is a paid chilkot component).
No, I meant any zip libraries. I've never noticed the dll from zip librariy. Usually I just install and use it. Where is the dll reside and what is its name to be used inside VB ?

Thank you.
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 200 total points
ID: 39300096
It would reside in GAC if its not in your bin folder. It should also be in program files folder of that library.
0
 
LVL 1

Author Closing Comment

by:emi_sastra
ID: 39301047
Hi All,

Thank you very much for your help.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now