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

What's the best way to set-up a user's printers using NETLOGON.bat?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

With Windows 2000 and higher, you can use a VBScript as the logon script instead of just a batch file. From there, it's very simple.

Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\server\HP LaserJet"

VBScript can also handle typical logon functions such as mapping drives and running programs, in case you netlogon.bat is also doing other things. Google will turn up lots of pages helping with the syntax.

share|improve this answer

Additionally, you can install printers through Group Policy if you are using Windows XP or later and have installed the Group Policy Client Side Preferences on your clients (see kb943729).

If you don't have Windows 2008 domain controllers, you will need a Vista SP1 client or Windows 2008 server with RSAT installed in order to setup client side preferences through the Group Policy management console.

share|improve this answer

From a batch file:

rundll32 printui.dll,PrintUIEntry /in /n \\server\printer

Here is a complete article on the usage: http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.