Page 2 of 3

Re: Simple WinZip Program

Posted: Thu Jul 28, 2011 9:12 am
by Axel
gille wrote:
Nice program!

I have a question: (Normally in a new topic)
How can you extract rar-files in VB.NET?
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)
UnRAR.zip

This is a function I made for it
Code: Select all
Private Sub Extract(ByVal rarFile as string,ByVal extractdir as string)
Shell(Application.StartupPath + "UnRar.exe" + " x -y " + rarFile + " " + extractdir)
End sub
to use it
Code: Select all
Extract("C:\File.rar", "C:\Directory")
ofcourse you replace C:\File.rar with your rar file location and C:\Directory with the directory where you want to extract it
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

Re: Simple WinZip Program

Posted: Thu Jul 28, 2011 10:06 pm
by gille
Thank you! I will test it tomorrow. ;)

Re: Simple WinZip Program

Posted: Fri Jul 29, 2011 8:52 am
by gille
It doesn't work. :(

Re: Simple WinZip Program

Posted: Fri Jul 29, 2011 10:05 am
by MrAksel
gille wrote:
It doesn't work. :(
Replace
Code: Select all
Application.StartupPath + "UnRar.exe"
with
Code: Select all
Application.StartupPath + "\UnRar.exe"

Re: Simple WinZip Program

Posted: Fri Jul 29, 2011 9:15 pm
by gille
Nope... And it doesn't give an error!?

Re: Simple WinZip Program

Posted: Fri Jul 29, 2011 9:21 pm
by Axel
Did you copy the UnRar.exe to the folder where your exe is ?

Re: Simple WinZip Program

Posted: Fri Jul 29, 2011 9:32 pm
by Napster1488
I have good Code,on how to use Command Line Progz like UnRAR.
I gonna Post a Full Code later ;)

Re: Simple WinZip Program

Posted: Sat Jul 30, 2011 8:41 am
by gille
@ Axel: Yes :?
@ Napster1488: I can't wait :D

Re: Simple WinZip Program

Posted: Sat Jul 30, 2011 10:00 am
by Napster1488
In next Hours ill be not at Home,
so i will do a Advanced Code to use UnRAR later for ya :)

Re: Simple WinZip Program

Posted: Sat Jul 30, 2011 1:36 pm
by Bogoh67
why would you want to extract something in vb? unless you have downloaded something for your application(e.g. updates, ect.) in a rar file, but wouldnt it be easier to just not have it in a rar file or are you trying to make a program like 7zip winrar?