Troubleshooting Code 80070709 – The Printer name is invalid Introduction to Error Code 80070709 This error code, 80070709 usually occurs when you try to map a printer. There maybe a mistake in the WSH object, for example the wrong printer name. The Symptoms You Get The script does not execute as you hoped, instead you get a WSH error message. The probable scenario is that you are trying to create a Windows logon script. The Cause of Code 80070709This is an easy error code to track down. The Printer name in your script does not exist. Check your spelling. See Error: The printer name is invalid. Look for clues particularly the Line: number (14) Char 1: often lies! it just means that the whole line will not execute. SolutionsCheck in the script for the name you have used for the Printer. Does the printer in the script exist? To check open a CMD shell and type net view. Either create a printer with the name in the script, or better, modify your script to reflect the real name of the printer. ‡ Example 1 of ScriptTo be frank, the examples aren’t particularly useful because the error is specific to the name of your server or printer share. Incidentally, after all these years I am still suspicious of share names with spaces. ‘ PrintersClient – Windows Logon Script. ‘ VBScript – Connect a network printer with AddWindowsPrinterConnection ‘ Version 2.2 – July 2010 ‘ —————————————————————–‘ Option Explicit Dim objNetwork, strUNCPrinter1, strUNCPrinter2 Dim strUNCPrinter3, strUNCPrinter4 strUNCPrinter1 = "\\MEDIA-2\HP DeskJet 670C" strUNCPrinter2 = "\\MEDIA-1\Clio" strUNCPrinter3 = "\\MEDIACENTER\HP LaserJet 4200 PCL 6" strUNCPrinter4 = "\\\\MEDIACENTER\HP LaserJet 4240 PCL 6" Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection strUNCPrinter1 objNetwork.AddWindowsPrinterConnection strUNCPrinter2 objNetwork.AddWindowsPrinterConnection strUNCPrinter3 objNetwork.AddWindowsPrinterConnection strUNCPrinter4 WScript.Quit ‘ End of Guy’s Windows printer script.   Example 2 of ScriptNote Line 4: The error – \\lucy4\dottey. What this means is that lucy4 is the correct server, but the printer dottey does not exist. ‘ VBScript. Dim net Set net = Createobject("WScript.Network") net.AddWindowsPrinterConnection "\\lucy4\dottey", "Dot Matix"   Guy Recommends: WMI Monitor and It’s Free!
Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems. Fortunately, SolarWinds have created the WMI Monitor so that you can examine these gems of performance information for free. Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server. Download your free copy of WMI Monitor
Do you need additional help? Give something back? Would you like to help others? If you have a good example of this error, then please email me, I will publish it with a credit to you:
If you like this page then please share it with your friends About The Author

ComputerPerfomance.co.uk uses cookies. More info.
|