473,320 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Running WinZip command line from VB.Net

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
3 14112
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Steve | last post by:
Is there anyone with experience using the Winzip command line add-in? I can't get it to create the zip file with a space in the file name. Using: RetValue = Shell("C:\winzip\wzzip.exe...
2
by: Jim | last post by:
I all, I have a database on a user's network drive with the following path: E:\NewDB\StatsData.mdb I want to create a small "Utilities" database that the user can launch which will run WinZip...
7
by: Pengyu | last post by:
How to call up WinRAR or WinZip to decompress files without bring up WinRAR or WinZip windows? Just like the "Extract here" if you right click an rar/zip file using your mouse. Thank you very...
15
by: Karl | last post by:
Hi all, I regularly use FTP to place Self Extracting Zip files on the web for remote users to update their datafiles. Works very nicely. I have automated the creation of the initial zip file (...
1
by: Josec84 | last post by:
Im writing a script and need help. I need to extract a file using the command prompt. Are there commands to extract files or unzip files(without downloading any add-ons)??? Let's say i have a file...
1
by: Sue | last post by:
Hi (Also posted in getting started group) Is it possible to have a Macro that runs (importing tables) at a specific time each day without user input. Also wondered if its possible to use access...
51
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under...
6
by: tvaughan77 | last post by:
Hi, I have some code that I want to use to run a command line utility and I want to be able to run it from an aspx page running under IIS. The command line utility is a local utility running on...
1
by: seanwalsh | last post by:
Hi I have a zip file that is encrypted with a tricky password, which I need to extract from a .bat file. The password is: -33,33_(}33"33*33=33|33^%33 So I try this line in a .bat...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.