local ports are probably not supported, and certainly not from ASP....
On Tue, 9 Jan 2001 11:29:28 +1100, "Jan Welten" <jan@questa.com.au>
wrote:
>Hi!
>
>I'm lost!! Anyone got any idea why this doesn't work ???
>
><%
>
> Set objFS = CreateObject("Scripting.FileSystemObject")
> Set objWSHNet = CreateObject("WScript.Network")
>
> objWSHNet.AddPrinterConnection "LPT1", "<prtshare>", False, "<username>",
>"<password>"
>
> Set objPrinter = objFS.CreateTextFile("LPT1", True)
> objPrinter.Write("This is the message I'd like to print...")
> objPrinter.Close
>
> objWSHNet.RemovePrinterConnection "LPT1"
> Set objWSHNet = Nothing
> Set objFS = Nothing
> Set objPrinter = Nothing
>
>%>
>
>
>When swapping the <xxx> tags with real info, it just gives me the message
>"error 80070520 - A specified logon session does not exist. It may already
>have been terminated."
>
>I'm not using sessioncookies.. but why would I need to do that.. when
>username/password is already provided in the script ??? Any workarounds ???
>..or any easily implemented print-components ???
>
>..or would there maybe be a simple way of printing directly to a server
>defined printer without starting a session of the WScript.Network
>component??
>
>
>regards
>
>Jan Welten
>Sydney, Australia
>
>(copy of answers to my e-mail address please...
>
>