Re: Simple WinZip Program
Posted: Thu Jul 28, 2011 9:12 am
gille wrote:Nice program!You can do it by the command line version of winrar , which is free and you can include it in your application (You should read the license.txt which is at the bottom of the page)
I have a question: (Normally in a new topic)
How can you extract rar-files in VB.NET?
This is a function I made for it
Code: Select all
to use itPrivate Sub Extract(ByVal rarFile as string,ByVal extractdir as string)
Shell(Application.StartupPath + "UnRar.exe" + " x -y " + rarFile + " " + extractdir)
End sub
Code: Select all
ofcourse you replace C:\File.rar with your rar file location and C:\Directory with the directory where you want to extract itExtract("C:\File.rar", "C:\Directory")
works fine for me , tell me if it doesn't for you
oh and you need to place UnRar.exe(from the zip I uploaded) in the directory where your application.exe is(if its in the debug folder, place unrar.exe in the debug folder ;) )
(I put alot of efford in this one)
****** ***** ****** UnRAR - free utility for RAR archives
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
****** ******* ****** License for use and distribution of
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** ** ** ** ** ** FREEWARE version
~~~~~~~~~~~~~~~~
The UnRAR utility is freeware. This means:
1. All copyrights to RAR and the utility UnRAR are exclusively
owned by the author - Alexander Roshal.
2. The UnRAR utility may be freely distributed. It is allowed
to distribute UnRAR inside of other software packages.
3. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS".
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT
YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING
OR MISUSING THIS SOFTWARE.
4. Neither RAR binary code, WinRAR binary code, UnRAR source or UnRAR
binary code may be used or reverse engineered to re-create the RAR
compression algorithm, which is proprietary, without written
permission of the author.
5. If you don't agree with terms of the license you must remove
UnRAR files from your storage devices and cease to use the
utility.
Thank you for your interest in RAR and UnRAR.
Alexander L. Roshal