Shell function problem.

  • Thread starter Thread starter MrKrich
  • Start date Start date
M

MrKrich

I use shell function to call winzip to unzip file. My
problem is I want it to show error if it get error such as
the file that it try to open is not .zip.
This is my code :
procID = Shell("C:\Program Files\Winzip\Winzip32.exe -min -
e -o -s c:\Temp\Myfile.Zip c:\Temp, , True)

At the moment the error message that I got is from winzip
itself.
 
Use System.Diagnostics.Process instead. You get an ExitCode value that,
assuming the application sets it, can be retrieved by your application to
determine whether or not an error occurred.
 
* "MrKrich said:
I use shell function to call winzip to unzip file. My
problem is I want it to show error if it get error such as
the file that it try to open is not .zip.
This is my code :
procID = Shell("C:\Program Files\Winzip\Winzip32.exe -min -
e -o -s c:\Temp\Myfile.Zip c:\Temp, , True)

At the moment the error message that I got is from winzip
itself.

Maybe 'System.Diagnostics.Process.Start' procides more information in
the returned 'Process' object. Nevertheless, you won't be able to turn
off the messagebox displayed by WinZip if there is no switch to do that
available.
 
Back
Top