View Full Version : Solved: Shell Help
pundabuyer
11-07-2008, 02:35 PM
I am trying to Shell Winzip.....
Private Sub CommandButton2_Click()
PW = "aaaaaaaaaaaa"
WinZipApp = "C:\Program Files\WinZip\WINZIP32.EXE"
FileToZip = "C:\Users\Andy\Desktop\Book2.xls"
ZippedFile = "C:\Users\Andy\Desktop\Book2.zip"
Call Shell(WinZipApp & " -a -ycaes256 -s" & PW & FileToZip & ZippedFile, 0)
End Sub
I Get a winzip parameter validation error!!
Any Ideas?
Demosthine
11-08-2008, 09:27 PM
Evening there.
You need to add a space within the quotations between:
-s and PW
PW and FileToZip
FileToZip and ZippedFile
Scott
pundabuyer
11-09-2008, 09:47 AM
I get the same error? Could you re-create the code?and have a go yourself for me?
Thanks
pundabuyer
11-09-2008, 09:48 AM
PW = "aaaaaaaaaaaa"
WinZipApp = "C:\Program Files\WinZip\WINZIP32.EXE"
FileToZip = "C:\Users\Andy\Desktop\Book2.xls"
ZippedFile = "C:\Users\Andy\Desktop\Book2.zip"
Call Shell(WinZipApp & " -a -ycaes256 -s " & PW & " " & FileToZip & " " & ZippedFile, 0)
Demosthine
11-09-2008, 11:20 AM
Good Morning.
Well, after going off and installing WinZip, I found that you can no longer use the default WinZip Version with the CommandLine. I don't know when they changed that, but it would appear you've found the CommandLine Add-On.
I installed Version 10.0 with Add-On 2.2.
The first thing I found is that you have to change your WinZipApp to reference WzZip.Exe, not WinZip32.Exe.
Second, because you are referencing the full path for WinZip and there is a space in it, you need to enclose it in quotations. I would do the same for both the FileToZip and ZippedFile.
Once that was fixed, running the resulting line manually through the Command Prompt, it gives an error that "Option -s must come before -yc."
Lastly, your ZippedFile argument must come before your FiletoZip argument.
Call Shell(WinZipApp & " -a -s" & PW & " -ycaes256 " & ZippedFile & " " & FileToZip, 0)
Take care.
Scott
pundabuyer
11-09-2008, 12:40 PM
Thanks Scott I have recreated that now!
You are a star!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.