This content has been marked as final. Show 1 reply
Are you running the batch file or the dos command while logged in as the
same user ColdFusion service is configured to run under? If ColdFusion
is running under the default "Local System" account, try turning on the
"Allow service to interact with the desktop" checkbox on the "Log On"
tab for the ColdFusion service, or set the service to log in with an
account you know has permissions to the remote printer.
> Good day all. i have a really confussing problem... Let me break it down
> I have written an application that requires barcodes. My Printer is a PPLB
> printer (not really important). So i create a file on the server (This is about
> all that works fine).....
> The printer is a network printer. so on the server i set up the capture " net
> use LPT2 \\<machinename>\\<printersharename> /persistent:yes
> (What the above does for those that do not know is set up a vitual printer
> port so if you print to lpt2 it goes to the network printer)
> The command works perfectly..... Now the only thing i have to do is send the
> file to the printer....
> If im on the server and type "COPY /B c:\filetosend LPT2: " note the Colon
> after LPT2 must be there it works perfectly.
> But from anything else it doesnt..
> What i have tried:
> 1) I tried running the command via cfexecute and CFX_consolecommand which is
> available at http://www.intrafoundation.com that however does not work
> 2) Thinking i was smart i decided to write a bat file.... Easy. I wrote the
> file then used cfexecute and consolecommand to run the file. With output
> enabled The error says "File Not Found" This i have checked the file is there
> and LPT port is setup.
> As i said if i type the command in command prompt it works perfectly.
> Now just to through another spanner in the works. if i run the bat file from
> double clicking in windows or in command propt type print.bat. (the name of the
> bat file i created) it works perfectly..... Can someone explain this
> So what i have determined is that:
> 1) When i type the command or run the bat file from command prompt it works.
> 2) It does not work via cfexecute or commandconsole.
> With some more testing If i leave the colon out after LPT2 it says "0 Files
> Copied" so i think the colon is giving the problem...
> Any help would be appreciated with this regard....
> Another program maybe etc