Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a bunch of log on scripts which have to be applied at session log on. Some of them are correctly applied, but I have one for printers connection, which don't work every time.

At first time login, printers are not present. At second-time login, printers are connected.

There are many users, and each user have to login twice! I mean, only for printers, as others scripts are applied at first time.

How can I force printers connection at first time login?

Here is the VBScript:

Dim objNetwork
Set objNetwork = CreateObject("WScript.Network") 

objNetwork.AddWindowsPrinterConnection "\\server\Ricoh"
objNetwork.SetDefaultPrinter "\\server\Ricoh"

objNetwork.AddWindowsPrinterConnection "\\server\Canon"
objNetwork.AddWindowsPrinterConnection "\\server\Sharp"

Script is located under GPO in User configuration and users are in the OU-related GPO.


share|improve this question
How long are you waiting upon initial logon? The first connection to the printer could require the client to download and install the drivers from the print server. –  jscott Nov 8 '10 at 12:18
The user without printers was logged since 15 minutes when he asked me why no printers were present. So I suggested him to logout then login, and the printers were added magically. –  Velcro Nov 8 '10 at 14:02
Is it possible to add printer connection at computer level, so these printers keep present when other user logs in? –  Velcro Nov 9 '10 at 5:18
I will try the following: rundll32 printui.dll,PrintUIEntry /in /n /y \\server\Ricoh -and/or- pushprinterconnection.exe (along with the Print Management Console) –  Velcro Nov 9 '10 at 21:05
OK, so there is a f*cking bug when printers are connected. The rundll32 method works well, but setting default printer can only by applied when printer has been updated and ready to use by Windows (that mean some minutes later). –  Velcro Nov 10 '10 at 15:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.