Printing to a network printer via ASP
I'm trying to write some data out to a tag printer via ASP. The data needs to go out through LPT2:, which is mapped to the shared printer.
I've tried using a FSO to write to it directly. I've even managed to write a script for windows scripting host and invoke it from ASP, using standard output redirection (">") to redirect output to a file with no problems.
However, I can't seem to send writes to LPT2: from ASP, even through the other script.
It works perfectly fine if I invoke the WSH script at a command prompt using precisely the same command line, but when I do it from inside an ASP page, I get nothing.
Are there some permissions for the port I have to set or some such? I honestly have no idea how to get it to work.
If it is relevant, LPT2: is a mapped port for a network printer.
The command line in question I'm trying to fire off from ASP is: "%comspec% /c cscript C:\HttpRequester.vbs http://localhost/FullTagRun.asp?OrderNo=" & Request("OrderNo") & " > LPT2:" which works perfectly fine if I use a filename rather than LPT2:, but the data needs to go out via LPT2:.