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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding printers to users upon login

Status
Not open for further replies.

tjv

IS-IT--Management
Sep 19, 2001
100
0
0
US
Is there a way to set a policy so that when a user logins that is a member of a certain group it will automatically add a printer(s) that is in that group.
 

Check that link out.. I just got it today from a guy on here, but I know I saw a part that described how to add certain printers upon logging in using scripts.. "tis better to be thought of as a fool then open your mouth and remove all doubt" Mark Twain

"I should of been a doctor.." Me
 
You can always put users in a certain OU and then use Group Policy logon scripts with a scritp like the following. You will need to edit the "\\server\printer" parts with objects unique to your network and you may need to expand the array.


' VBScript Source File
'
' NAME: mapprinters.vbs
'
' AUTHOR: Mitch Huey, POD, Inc.
' DATE : 12/2/2002
'
' COMMENT: Maps network printers
'

Option Explicit

Dim x
Dim wshNetwork
Dim printer(4)

printer(0) = "\\server\printer"
printer(1) = "\\server\printer"
printer(2) = "\\server\printer"
printer(3) = "\\server\printer"
printer(4) = "\\server\printer"

On Error Resume Next

Set wshNetwork = WScript.CreateObject("WScript.Network")

' Add printers
For x = 0 To 4
wshNetwork.AddWindowsPrinterConnection printer(x)
Next
End If
 
We have used a small batch file for each location, that attachs to the users the right printers. It works for printers on the Server (through JetDirect boxes) or on workstations (something I am trying to reduce). The batch file needs to be in both the computer start-up script and the user's login script (and you need to switch them off when logging off or switching off).

It seems to me to be a clumsy way but it works for us.

If you would like the batch code I will try to note it down and post it on (I am at home and the computers are at work - sorry!)
 
Still not working. I get a VB error on line 21 char 1
 
hi,

Try to use "con2prt.exe" in your login scripts . this exe comes with Windows 2000 Zero Administration kit. this is the command line utility which installs the printers using batch files or login scripts. Create a login script using this exe will solve your problem. using this there are options fro deletimg all the printers abd installing as well as for setting the printer as a default printer.

You can download this exe from site called
HTH Aslam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top