Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slow mapping network printers

Status
Not open for further replies.

dtwell99

Technical User
Aug 7, 2001
30
GB
Hi All,
Has anyone had an issue where it takes at least 20-30 seconds (sometimes longer) to map a network printer with a VB script? Currently running 2008 R2 remote desktop services and mapping printers to a 2008 R2 print server. I have tried many different printers and drivers and still get the same results. I also have the same issue when deploying with group policy. Any ideas?
 
will you post an example of your vb mapping script?

is the network slow? this should never take more than a few seconds.

Correctly asked questions will receive a better answer.
 
See below for script example. I can't see any issues with the network and mapping printers from a 2003 print server to TS 2003 is instant. It's only when mapping from RDS 2008 and Windows 7 that things really slow down.

'suppress error messages
'on error resume next

Dim WshNetwork

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\server\burithp4
 
so the client pc is windows 7, and it remote desktop's into a 2008 server?

try this script just to see:

=========================================================
Dim objNetwork, strLocal, strUNCPrinter1
strUNCPrinter1 = "\\server\burithp4"

Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter1

WScript.Quit
=========================================================

Are you running a windows domain?

My posts are my opinion. However if I link a Microsoft Article it doesn't mean I necessarily always agree with it.
 
Thanks for helping look at this issue. I have tried you script and printer mapped in roughly 5 seconds. If I use the original script I posted then it still maps in around 5 secs. If I add additional printers to the script the 1st maps in 5 secs, the second one takes a further 20secs and the third takes another 25, 50 secs total to map 3 printers.

If I then try and map them individually they all map in roughly 5 secs.

This is the script I am running:

Dim WshNetwork

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\SERVER\warprt06"
WshNetwork.AddWindowsPrinterConnection "\\SERVER\WARPRT08"
WshNetwork.AddWindowsPrinterConnection "\\SERVER\WARPRT10"

The print server is on a domain.
 
Try removing the printers first, then adding them, that might be causing the slowness

=================================================
Option Explicit
Dim objNetwork, strUNCPrinter1, strUNCPrinter2, strUNCPrinter3
strUNCPrinter1 = "\\SERVER\warprt06"
strUNCPrinter2 = "\\SERVER\WARPRT08"
strUNCPrinter3= "\\SERVER\WARPRT10"
Set objNetwork = CreateObject("WScript.Network")
On Error Resume Next
objNetwork.RemovePrinterConnection strUNCPrinter1, true, true
On Error Resume Next
objNetwork.RemovePrinterConnection strUNCPrinter2, true, true
On Error Resume Next
objNetwork.RemovePrinterConnection strUNCPrinter3, true, true
On Error Resume Next
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
On Error Resume Next
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
On Error Resume Next
objNetwork.AddWindowsPrinterConnection strUNCPrinter3
On Error Resume Next
WScript.Quit
=================================================

*sorry my scripts look sloppy, at least they work usually lol*

My posts are my opinion. However if I link a Microsoft Article it doesn't mean I necessarily always agree with it.
 
This is starting to look like a printer driver issue. I have been testing with the generic text drivers and I have no issues with printers mapping. As soon as I use anything from HP then it takes ages. I have seen a couple of posts regarding hpzbdi.dll causing issues with slow printer mapping.
 
We have been experiencing the same issue with our Windows Server 2008 R2 64bit print server and 64bit Windows 7 Clients.

Sometimes it can take up to 5-6 minutes for a printer to be added.

Has anyone found a solution to this problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top