running wzunzip in vb

How can I run the wzunzip add on within a vb program.  I use the shell command and I can get the help to come up, but if I add parameters then it just blows by it without doing anything.  This is what I tested so far  Shell "C:\Program Files\WinZip\wzunzip".  From a command prompt the it would look like this.

wzunzip c:\program files\unzip\ c:\program files\unzip\unziptest

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
It probably needs quotes around the path names (This is untested since I don't have wzunzip):

Private Sub Command1_Click()
    Dim cmdLine As String
    cmdLine = Chr(34) & "C:\Program Files\WinZip\wzunzip" & Chr(34) & " " & Chr(34) & "c:\program files\unzip\" & Chr(34) & " " & Chr(34) & "c:\program files\unzip\unziptest" & Chr(34)
    Shell cmdLine
End Sub

Does this work?

Private Sub Command1_Click()
Shell Environ("ComSpec") & " /c wzunzip c:\program files\unzip\ c:\program files\unzip\unziptest"

End Sub
mgmhicksAuthor Commented:
Sorry no go.  Just runs right through the shell command.

if I use

Shell "C:\Program Files\WinZip\wzunzip "

i get the help screen like it took wzunzip, with no parameters, however if I try and add parameters it just runs right through it.

The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Éric MoreauSenior .Net ConsultantCommented:
The Accepted Solution above does not work for me

Shell "C:\Program Files\WinZip\WZUNZIP.EXE" "\\SERVER\Users\Geoff\"

does not work in The WZUNZIP.EXE command help/reference screen opens.

When I paste the same command in the Windows 7 Start-Run dialog box, It runs fine.

"C:\Program Files\WinZip\WZUNZIP.EXE" "\\SERVER\Users\Geoff\" in windows run works.
Never mind - I changed My code from:

"""" & Cmd & """"

Chr(34) & cmd & Chr(34)

it works now. I really dont know why it did not work. The """" code works on an XP machine. But I will not arque with success.
Mike TomlinsonMiddle School Assistant TeacherCommented:
For VB.Net, try something like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim File As String = "C:\Program Files\WinZip\WZUNZIP.EXE"
        Dim Arg As String = "\\SERVER\Users\Geoff\"
        Dim P As New Process
        P.StartInfo.FileName = File
        P.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(File)
        P.StartInfo.Arguments = Chr(34) & Arg & Chr(34)
    End Sub

Open in new window

All Courses

From novice to tech pro — start learning today.