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


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.


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.


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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