You have an Active Directory network and want to install printers using a logon script.
This is done using the logon script, a VBS script, and, optionally, IFMEMBER.
- Log into your DC.
- Verify via ADUC that every user has a logon script.
- Open %LOGONSEVER%NETLOGON in Windows Explorer.
- Create the file configure_printers.vbs. An example is given near the end of this article.
- Edit the logon script.
- Add the following line to the end:
rem Automatically add our printers.
Our example configure_printers.vbs script has the following:
Set net = CreateObject(“WScript.Network”)
‘ Set the default printer now
This works great to set the same printers for all users, including every user having the same default printer.
But what if you don’t want every user to have access to every printer? Or different users should have different printers? In that case, you need to use IFMEMBER (part of the Windows 2003 Resource Kit).
So by using IFMEMBER, we may have:
IF NOT ERRORLEVEL 1 GOTO :not_accounting_group
IF NOT ERRORLEVEL 1 GOTO :not_sales_group