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 80070709
This 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.
Solutions
Check 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 Script
To 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 2006 '
------------------------------------------------------------------------------' 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"
Note 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"
 
Try
a different solution, download SolarWinds ipMonitor
Here is my thinking,
ipMonitor will give you valuable data about your network and servers.
This extra information just may unlock the solution to your error code.
One more thing, sometimes when troubleshooting you go around in circles;
therefore if you try a different, but related approach, you may just crack the
problem.
Free Download
of SolarWinds ipMonitor
Their topics and material are ideal for getting you started with VBScript. The
videos are easy to follow and you can control the pace. Try their free demo material and then see if you want to buy the full package.
See more about VB Script Training CD.
The extra features you get in your eBook
include, more pages full of detailed examples. Also, ten 'how to...'
sections, with screen shots showing which menus to use. Go for Guy's
eBook - and get a printable version with copy enabled and no expiry date.