Computer Performance, Windows 2003, Exchange 2003, Logon Scripts

Code 80070709 - The Printer name is invalid

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"

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 Script

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"
 

Solarwinds IpMonitorTry 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

Computer Training Software - Recommended Training VideosGuy Thomas recommends Computer Training Software

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.


Do you need extra help?

For interpreting the WSH messages check Diagnose 800 errors.

For general advice try my 7 Troubleshooting techniques

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:

 


Download my Logon Script eBook for only $6.25

Logon ScriptThe 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.

  Jumbo Script 7 Package

 *


Google

Webcomputerperformance.co.uk

GFi Events Manager

Guy Recommends: GFi EventsManager

Here is a solution to monitor, manage and archive thousands of events that are generated by devices across your entire network.  Get your free evaluation copy of GFI EventsManager.

 

Home Copyright © 1999-2008 Computer Performance LTD All rights reserved

Please report a broken link, or an error.