Copy link to clipboard
Copied
I have been using cfexexcute and WinZip to Zip and encrypt some files and have run into a fairly strange problem. It seems that cfexecute works fine on smaller files, but when the source files start to run into the multi-megabyte range, cfexecute attempts to launch wzzip, but then just hangs and times out. I can exexcute the offending commands from the command prompt perfectly and I have also set the ColdFusion service to run with more than enough privileges. Server is currently running CF8 on Windows 2003. Incidently, this limitation does not seem to exist with CF8 running on a 64 bit platform. Has anyone else run into this problem?
Copy link to clipboard
Copied
Maybe it makes sense to try to pack and unpack the Zip file using tag cfzip?
Copy link to clipboard
Copied
I would love to, but I am using AES 256 encryption on the Zip files and that is not yet supported by the CFZIP tag. So...I need to figure out how to get around this apparent CFEXECUTE limitation.
Copy link to clipboard
Copied
I haven't used command-line version of WinZip but try IZArc's command-line .exe (http://www.izarc.org/download.html). Perhaps it requires less resources and can run under constraints of <cfexecute>. I use the command-line version outside scope of CF and it works well.
Copy link to clipboard
Copied
I have been fighting with the exact same problem for about a week now and have finally found a mesh of solutions that solve the problem. I can dynamical write a .bat file that has the code for the command line script of winzip but then I have to use the cfexecute call to call the CMD.EXE and not the .bat directly.
<cftry>
<cfif FileExists(#ZipBatFile#)>
<cffile action="DELETE" File="#ZipBatFile#">
</cfif>
<cfset batch_file_output="#chr(34)#c:\program files\winzip\wzzip#chr(34)# -ybc -s#vIHASecure# -b#EventFilePath# #EventFilePath#Attachments.zip #DraftFilePath#*.*">
<cffile action="write" file="#ZipBatFile#" output="#batch_file_output#" addnewline="no">
<cfset argString = '/c #ZipBatFile# 2>&1 ' >
<cfexecute name="c:\WINDOWS\system32\cmd.exe"
arguments="#argString#"
timeout="5"
outputFile="#EventLogPath#ZipEvents#vCorresEventID#.txt"/>
<cfcatch type = "Any">
error code
</cfcatch>
</cftry>
Copy link to clipboard
Copied
Just a thought, but have you tried using parameters in the .bat file %1 %2, etcetera instead of generating the file each time?
Copy link to clipboard
Copied
Good thought, Thanks