HOWTO: Set a User's Default Local Printer with a Logon Script
ID: Q196732
|
The information in this article applies to:
-
Microsoft Windows NT Server version 4.0, Terminal Server Edition
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help
topic in Regedt32.exe.
SUMMARY
When a user connects to a Terminal Server computer in a client session, he
or she may be locked down to only one application. If this application does
not allow for selecting the default printer, the user will not be able to
specify a printer other than the default. To make it possible for all users
to specify the printer closest to them, the default printer must be set
using a regini script.
NOTE: Regini.exe is available in the Windows NT Resource Kit.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys and
Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete
Information in the Registry" and "Edit Registry Data" Help topics in
Regedt32.exe. Note that you should back up the registry before you edit it.
If you are running Windows NT, you should also update your Emergency
Repair Disk (ERD).
- In Terminal Server, run Regedt32 and go to the following key:
HKEY_CURRENT_USER/Software/Microsoft/WindowsNT/Currentversion/Devices
Here you will see a list of your existing printers. An example of one
of the key values may look like this:
HP LaserJet 5Si : REG_SZ: winspool,Ne00
NOTE: This is a local printer, NOT a network printer.
The first text string is the text name of the printer, and the last two
numbers in Ne00 will be the order in which the printer was added to the
server for a TCP/IP printer. It could be, for example, LPT1: for a
direct connected printer. Take note of all the printers listed here.
These printer would have had to been installed by a local administrator.
- Create a text file and name it SomeFileName.ini. One of theses files
will be needed for each printer you need to assign as default. The file
should look like this:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Device = DELETE
HKEY_CURRENT_USER\Printers
DeviceOld = DELETE
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Device = "[text name of printer],winspool,Nexx:"
HKEY_CURRENT_USER\Printers
DeviceOld = "[text name of printer],winspool,Nexx:"
NOTE: Do not forget the colon (:).
NOTE: xx is the Ne number for the specific printer you would like to use
with this file.
- After all your files have been created for each printer, you must add
the following line to the logon script of each user:
regini [path]\SomeFileName.ini > Nul:
MORE INFORMATION
By default, only printers that are attached to a local port on the server
will be pushed to all users logging on to the Terminal Server computer.
This includes printers connected through TCP/IP printing.
Additional query words:
Keywords :
Version : winnt:4.0
Platform : winnt
Issue type : kbinfo
|