If a roaming user normally logs on in building 1, you may not want them to print to the same printer (by default) if they logon in building 2. You can alter this behavior in a login script.

A users' default printer is defined at:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device

This type REG_SZ value has a default string value of PrinterName,winspool,LPT1:. When set for a network printer, the string value is \\ServerName\PrinterShare,Description,LPTn:. The description is not important so the string value can be expressed as \\ServerName\PrinterShare,,LPTn:.

There are many possible ways to effect this in a login script. Here is any easy one to understand and administer:

1. For each ComputerName in your organization, create a ComputerName.REG file that contains the appropriate setting for the default printer used by that PC and store it in the NetLogon share on your server(s). For example, computer JSI5 should use the HP1600C share name served by JSI2. Therefore, JSI5.REG should contain:

     REGEDIT4

     \[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\]
     "Device"="\\\\JSI2\\HP1600C,,LPT1:"

2. Issue the following command in your script:

     If exist "%LogonServer%\Netlogon\%ComputerName%.REG" regedit /S "%LogonServer%\Netlogon\%ComputerName%.REG"

NOTE: the /S switch of regedit.exe causes it to be Silent.

Of course, it you use W9x clients, you will have to set the missing environment variables ( see tip 120 ).