Link to home
Start Free TrialLog in
Avatar of prosit
prositFlag for United States of America

asked on

Using the Process to launch a program

Hello,

I have some code that launches a process to unzip some files.

        Dim myproc As Process = New Process
        myproc.StartInfo.WorkingDirectory = Chr(34) & Folder & Chr(34)
        myproc.StartInfo.FileName = Chr(34) & rar & Chr(34)
        myproc.StartInfo.Arguments = "x -Y " & Chr(34) & Folder & "\*.zip" & Chr(34)
        myproc.Start()
        MsgBox(myproc.ExitCode)
        myproc.WaitForExit()

If I open a dos box and do the equivalent it works perfectly, but for some reason this exists with exitcode 0 and nothing happens...

Any ideas?

tnx
~j
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial