![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Specified port is unknown 80070704 Some Vista clients intermittently receive the following when their printer-mapping logon script runs: Windows Script Host Line: 37 Char: 1 Error: The specified port is unknown. Code: 80070704 Source: (null) I've pasted an excerpt from the script below. Line 37 is the first one beginning with "ObjNetwork.AddWindowsPrinterConnection". Note that if I delete the printers and run the script manually, the printers are added correctly. Thanks in advance. (Luke) Option Explicit Dim objNetwork Dim strDomain Dim strUser Dim Network 'THIS CODE GRABS THE LOGGED-ON USER - THE LOOP PART MAKES IT WORK W/ LEGACY CLIENTS Set ObjNetwork=WScript.CreateObject("WScript.Network") If LCase(ObjNetwork.ComputerName) <> "gwctx1" Then Set Network = CreateObject("Wscript.Network") do while strUser="" strUser=Network.UserName wscript.sleep 100 loop end if strDomain="Gardnerwhite" Const PrinterShare1 = "\\sv-directory1\Brother-B&W" Const PrinterShare2 = "\\sv-directory1\Brother-Color" Const PrinterShare3 = "\\sv-directory1\Brother-High Res" '***Everyone gets these printers*** ObjNetwork.AddWindowsPrinterConnection PrinterShare1 ObjNetwork.AddWindowsPrinterConnection PrinterShare2 ObjNetwork.AddWindowsPrinterConnection PrinterShare3 |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Specified port is unknown 80070704 "Luke Morehead" <LukeMorehead@xxxxxx> wrote in message news:7CA19230-DFD9-42D1-8896-4E9579E124BD@xxxxxx Quote: > Some Vista clients intermittently receive the following when their > printer-mapping logon script runs: > > Windows Script Host > Line: 37 > Char: 1 > Error: The specified port is unknown. > Code: 80070704 > Source: (null) > > I've pasted an excerpt from the script below. Line 37 is the first one > beginning with "ObjNetwork.AddWindowsPrinterConnection". Note that if I > delete the printers and run the script manually, the printers are added > correctly. Thanks in advance. > (Luke) script runs again but *not* manually? I would expect an attempt to add a printer connection might fail if that connection already exists, although the error message seems a bit off. You could just try doing corresponding "ObjNetwork.AddWindowsPrinterConnection" calls for those printers already connected. Or just test for the connection and avoid adding if it is already there. /Al Quote: > > Option Explicit > > Dim objNetwork > Dim strDomain > Dim strUser > Dim Network > > 'THIS CODE GRABS THE LOGGED-ON USER - THE LOOP PART MAKES IT WORK W/ > LEGACY > CLIENTS > > Set ObjNetwork=WScript.CreateObject("WScript.Network") > If LCase(ObjNetwork.ComputerName) <> "gwctx1" Then > > Set Network = CreateObject("Wscript.Network") > do while strUser="" > strUser=Network.UserName > wscript.sleep 100 > loop > end if > > strDomain="Gardnerwhite" > > Const PrinterShare1 = "\\sv-directory1\Brother-B&W" > Const PrinterShare2 = "\\sv-directory1\Brother-Color" > Const PrinterShare3 = "\\sv-directory1\Brother-High Res" > > > '***Everyone gets these printers*** > ObjNetwork.AddWindowsPrinterConnection PrinterShare1 > ObjNetwork.AddWindowsPrinterConnection PrinterShare2 > ObjNetwork.AddWindowsPrinterConnection PrinterShare3 |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Specified port is unknown 80070704 I deleted the printers, then logged off and back on and received the same error message. None of the three printers were added by the script. I then ran the script manually and got the same error; again no printers were added. I browsed to the printer on the network via Windows Explorer, right-clicked on one of the printers and selected "Connect" from the context menu. I got the error, "Windows cannot connect to the printer. The specified port is unknown." I tried using the "Add Printer" wizard to add a printer from Active Directory; same error. Does it seem that this thread now belongs in a Vista group? "Al Dunbar" wrote: Quote: > What happens if you delete the printers then logoff/logon so the logon > script runs again but *not* manually? > > I would expect an attempt to add a printer connection might fail if that > connection already exists, although the error message seems a bit off. You > could just try doing corresponding "ObjNetwork.AddWindowsPrinterConnection" > calls for those printers already connected. Or just test for the connection > and avoid adding if it is already there. > > > /Al > > "Luke Morehead" <LukeMorehead@xxxxxx> wrote in message > news:7CA19230-DFD9-42D1-8896-4E9579E124BD@xxxxxx Quote: > > Some Vista clients intermittently receive the following when their > > printer-mapping logon script runs: > > > > Windows Script Host > > Line: 37 > > Char: 1 > > Error: The specified port is unknown. > > Code: 80070704 > > Source: (null) > > > > I've pasted an excerpt from the script below. Line 37 is the first one > > beginning with "ObjNetwork.AddWindowsPrinterConnection". Note that if I > > delete the printers and run the script manually, the printers are added > > correctly. Thanks in advance. > > (Luke) > > > > Option Explicit > > > > Dim objNetwork > > Dim strDomain > > Dim strUser > > Dim Network > > > > 'THIS CODE GRABS THE LOGGED-ON USER - THE LOOP PART MAKES IT WORK W/ > > LEGACY > > CLIENTS > > > > Set ObjNetwork=WScript.CreateObject("WScript.Network") > > If LCase(ObjNetwork.ComputerName) <> "gwctx1" Then > > > > Set Network = CreateObject("Wscript.Network") > > do while strUser="" > > strUser=Network.UserName > > wscript.sleep 100 > > loop > > end if > > > > strDomain="Gardnerwhite" > > > > Const PrinterShare1 = "\\sv-directory1\Brother-B&W" > > Const PrinterShare2 = "\\sv-directory1\Brother-Color" > > Const PrinterShare3 = "\\sv-directory1\Brother-High Res" > > > > > > '***Everyone gets these printers*** > > ObjNetwork.AddWindowsPrinterConnection PrinterShare1 > > ObjNetwork.AddWindowsPrinterConnection PrinterShare2 > > ObjNetwork.AddWindowsPrinterConnection PrinterShare3 > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Specified port is unknown 80070704 "Luke Morehead" <LukeMorehead@xxxxxx> wrote in message news:10A1E2D4-916E-4D6E-9A98-53018E2CAA4B@xxxxxx Quote: >I deleted the printers, then logged off and back on and received the same > error message. None of the three printers were added by the script. I > then > ran the script manually and got the same error; again no printers were > added. > > I browsed to the printer on the network via Windows Explorer, > right-clicked > on one of the printers and selected "Connect" from the context menu. I > got > the error, "Windows cannot connect to the printer. The specified port is > unknown." I tried using the "Add Printer" wizard to add a printer from > Active Directory; same error. Does it seem that this thread now belongs > in > a Vista group? But it could be a server issue or a security issue. /Al Quote: > "Al Dunbar" wrote: > Quote: >> What happens if you delete the printers then logoff/logon so the logon >> script runs again but *not* manually? >> >> I would expect an attempt to add a printer connection might fail if that >> connection already exists, although the error message seems a bit off. >> You >> could just try doing corresponding >> "ObjNetwork.AddWindowsPrinterConnection" >> calls for those printers already connected. Or just test for the >> connection >> and avoid adding if it is already there. >> >> >> /Al >> >> "Luke Morehead" <LukeMorehead@xxxxxx> wrote in message >> news:7CA19230-DFD9-42D1-8896-4E9579E124BD@xxxxxx Quote: >> > Some Vista clients intermittently receive the following when their >> > printer-mapping logon script runs: >> > >> > Windows Script Host >> > Line: 37 >> > Char: 1 >> > Error: The specified port is unknown. >> > Code: 80070704 >> > Source: (null) >> > >> > I've pasted an excerpt from the script below. Line 37 is the first one >> > beginning with "ObjNetwork.AddWindowsPrinterConnection". Note that if >> > I >> > delete the printers and run the script manually, the printers are added >> > correctly. Thanks in advance. >> > (Luke) >> > >> > Option Explicit >> > >> > Dim objNetwork >> > Dim strDomain >> > Dim strUser >> > Dim Network >> > >> > 'THIS CODE GRABS THE LOGGED-ON USER - THE LOOP PART MAKES IT WORK W/ >> > LEGACY >> > CLIENTS >> > >> > Set ObjNetwork=WScript.CreateObject("WScript.Network") >> > If LCase(ObjNetwork.ComputerName) <> "gwctx1" Then >> > >> > Set Network = CreateObject("Wscript.Network") >> > do while strUser="" >> > strUser=Network.UserName >> > wscript.sleep 100 >> > loop >> > end if >> > >> > strDomain="Gardnerwhite" >> > >> > Const PrinterShare1 = "\\sv-directory1\Brother-B&W" >> > Const PrinterShare2 = "\\sv-directory1\Brother-Color" >> > Const PrinterShare3 = "\\sv-directory1\Brother-High Res" >> > >> > >> > '***Everyone gets these printers*** >> > ObjNetwork.AddWindowsPrinterConnection PrinterShare1 >> > ObjNetwork.AddWindowsPrinterConnection PrinterShare2 >> > ObjNetwork.AddWindowsPrinterConnection PrinterShare3 >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Unknown device - creative game port | Vista General | |||
| Does Microsoft have an alternate port to port 25 for sending email | Vista mail | |||
| a Unknown Serial Port | Vista hardware & devices | |||
| The port is unknown | Vista print fax & scan | |||
| USB hard drive won't work on a USB 2 port but will on a USB 1.1 port.Why? | Vista General | |||