Hi,

I have a link on my interface which runs a template that has a <cfexecute. Basically I 
want to output the results to the screen.

If I run this command on the server at a command prompt it works just fine.

C:\>net print \\SERVERNAME\TESTPRN


Name                         Job #      Size            Status

-------------------------------------------------------------------------------
testprn Queue                   0 jobs                      *Printer Active*
The command completed successfully.



If I put this into my <cfexecute I get an error?

Error Occurred While Processing Request
Error Diagnostic Information
Error processing CFFILE

Error attempting to read 'prn.log.' The process cannot access the file because it is 
being used by another process. (error 32)

The error occurred while processing an element with a general identifier of (CFFILE), 
occupying document position (53:6) to (55:27).


Date/Time: 06/05/03 11:30:38
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Remote Address: 127.0.0.1
Query String: strPrinter=testprn
 

See below code.

<cfset ShowQueueExe ="c:\winnt\system32\net.exe">

<cfexecute name="#ShowQueueExe#"
   arguments="testprn"
   outputFile ="prn.log"
   timeOut="60">
</cfexecute>

<cflock timeout="5" name="readfile" type="READONLY">
<cffile action="READ"
   file="prn.log"
   variable="strFile">
</cflock>

<pre>
        <font class="wdirlinks">#Replace(sr,chr(10),"<br>","ALL")#</font>
</pre>


What am I doing wrong? Is there a better way of doing this?





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to