How do you invoke the WinZip line command interface from a .net VB Script

I am attempting to selectively zip files from a .net WEB applicaiton.  My research so far has been in the driection of WSH but with no success.  Am I on the right path or should I use a different method?

Here is the code I am using.

                                 Dim wshell, intReturn
            wshell = server.createobject("")
                   intReturn = wshell.EXEC("%comspec% /c c:\Program Files\WinZip\wzzip", 0, True)        
            Response.Write( intReturn )

Who is Participating?
You can invoke WinZip process process using System.Diagnostics.Process object. There is no need to use CreateObject stuff.
You will have to fix permisisons on winzip app so that ASPNET user context can invoke it.

I would suggestusing open source library like SharpLib or other third party libraries that do not require to invoke an executable.
ricke07fe1Author Commented:
This approach appears to work, please note this code is VB Script.

It is necessary to first import the following class

<%@ Import Namespace="System.Diagnostics" %>

Then the following code will work

Dim startInfo As New ProcessStartInfo("wzzip.exe")
startInfo.Arguments = "d:\TestFolder\ d:\DataFolder\*.ptf"

Thankyou for your recommendation.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.