Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using REGEDIT/REGINI to set default printer on Terminal server

Status
Not open for further replies.

themikehyde

IS-IT--Management
Feb 20, 2003
61
US
Hello, We have replaced our antique 95 systems with thin clients. They are setup fine and have printers connected using LPD. The printers work fine. Now what I am trying to do is have the default printer set based on the terminal they are logged into. The following appears to set the printer (When viewed in regedit) but when the users views the printer list, there are none marked as default. Any ideas??

method 1:
Login script:
-----------------------
echo %clientname%
echo %computername%
If exist "%LogonServer%\Netlogon\%clientname%.REG" regedt32 /S "%LogonServer%\Netlogon\%Clientname%.REG"

axel008.reg
--------------------------
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]
"Device"="\\\\AXEL008\\AXPRT008,winspool,Ne15:"


Method 2:
----------
Login script
---------------
echo %clientname%
echo %computername%
If exist "%LogonServer%\Netlogon\%clientname%.ini" regini "%LogonServer%\Netlogon\%Clientname%.ini" > Nul:

axel008.ini
------------
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 = "\\\\AXEL008\\AXPRT008,winspool,Ne15:"

HKEY_CURRENT_USER\Printers
DeviceOld = "\\\\AXEL008\\AXPRT008,winspool,Ne15:"



Thanks,
Mike
 
Don't you have to do this first: "ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows", "Device")" and then add printer connection if it doesn't exist?
 
Thanks for the response. I didn't think so since all the printers are local to the Terminal Server.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top