By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

Running WinZip command line from VB.Net

P: n/a
Rob
No way this should be that difficult...

I have a program that does a file watch on a folder. When
a file is created in this folder, I simply want to zip it
up using WinZip (with the command line version of
WinZip). I have been unable to do so with any success. I
have been using DTE.ExecuteCommand to try and get this
working but the error "Command "wzzip.exe" is not valid."
keeps popping up.

Any help would be appreciated.

Thanks,
Rob
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Rob" <ro*@d-conztrakt.com> scripsit:
I have a program that does a file watch on a folder. When
a file is created in this folder, I simply want to zip it
up using WinZip (with the command line version of
WinZip). I have been unable to do so with any success. I
have been using DTE.ExecuteCommand to try and get this
working but the error "Command "wzzip.exe" is not valid."
keeps popping up.


Have a look at the 'System.Diagnostics.Process.Start' method and the
'ProcessStartInfo' class.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
Hi Rob,
While I don't know what type of distribution you are planning to use with
your application I can safely recommend that you not use the WinZip
command-line interface. For one I think there's a built-in compression
library in .net. For two there's also some windows API compression commands
if .NET doesn't have its own. For three there are number of excellent
freeware .dll options like ZLib and 7-Zip's (I don't know the name of the
file, but there is one and 7-Zip is currently the best universal compression
format that's publicly available). As far as I know you can't legally or
easily distribute WinZip command-line support. For one the user would have
to have WinZip + the command-line add-on or you'd have to install them. I
doubt WinZip Computing would allow you to do that with a little $. Not to
mention users would want to have your program installed and not WinZip too
as this would adversely affect their file associations, start menu, and free
disk space.
Cheers,
Christian
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:et**************@TK2MSFTNGP12.phx.gbl...
"Rob" <ro*@d-conztrakt.com> scripsit:
I have a program that does a file watch on a folder. When
a file is created in this folder, I simply want to zip it
up using WinZip (with the command line version of
WinZip). I have been unable to do so with any success. I
have been using DTE.ExecuteCommand to try and get this
working but the error "Command "wzzip.exe" is not valid."
keeps popping up.


Have a look at the 'System.Diagnostics.Process.Start' method and the
'ProcessStartInfo' class.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

P: n/a
Rob

Christian and Herfried,

Thanks for the quick responses. The application is for
the company I work for and will not be distributed. The
machine that will house the application will have WinZip
on it. I just realized that I can use the "Shell" command
for what I need, but I will also take a closer look at the
built-in .NET compression lib as I believe that is a
better way to go.

Thanks again for the feeback.

Rob
-----Original Message-----
Hi Rob,
While I don't know what type of distribution you are planning to use withyour application I can safely recommend that you not use the WinZipcommand-line interface. For one I think there's a built- in compressionlibrary in .net. For two there's also some windows API compression commandsif .NET doesn't have its own. For three there are number of excellentfreeware .dll options like ZLib and 7-Zip's (I don't know the name of thefile, but there is one and 7-Zip is currently the best universal compressionformat that's publicly available). As far as I know you can't legally oreasily distribute WinZip command-line support. For one the user would haveto have WinZip + the command-line add-on or you'd have to install them. Idoubt WinZip Computing would allow you to do that with a little $. Not tomention users would want to have your program installed and not WinZip tooas this would adversely affect their file associations, start menu, and freedisk space.
Cheers,
Christian
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in messagenews:et**************@TK2MSFTNGP12.phx.gbl...
"Rob" <ro*@d-conztrakt.com> scripsit:
> I have a program that does a file watch on a folder. When > a file is created in this folder, I simply want to zip it > up using WinZip (with the command line version of
> WinZip). I have been unable to do so with any success. I > have been using DTE.ExecuteCommand to try and get this
> working but the error "Command "wzzip.exe" is not valid." > keeps popping up.


Have a look at the 'System.Diagnostics.Process.Start' method and the 'ProcessStartInfo' class.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.