Adding Printers to users at login

B

Brandon

How to I add printers to users at there first login. i
would like to script it but i dont know the command i've
referenced KB189105 but that didnt work. also is there a
way to do it via group policies.
 
O

OregonSteve

Greetings-

Yes, you would most certainly want to add it to a GPO, under User
Configuration, Windows Settings, Scripts, Logon
Here are excerpts from documents I've found:

*********
Inside the script is where the magic takes place. One of the methods I use
is the printui.dll. If you're not familiar with this, just type this (case
sensitive) at a start/run prompt:



rundll32 printui.dll,PrintUIEntry /?



Below is a small example of what you can do in a WSH script. The PC that
runs this section of the script will assign the printer RM114-DJ that is
shared on the machine RM114-04. It will also install the print drivers to
the PC running this script. The second printui statement will make this
printer the default printer.



DJPrinterConnect = "rundll32 printui.dll,PrintUIEntry /in
/n\\RM114-04\RM114-DJ /q"

SetDefaultPrinter = "rundll32 printui.dll,PrintUIEntry /y
/n\\RM114-04\RM114-DJ"

WSHShell.Run DJPrinterConnect,0,True

WSHShell.Run SetDefaultPrinter,0,True

***************************



The following code uses the AddWindowsPrinterConnection method to connect a
network printer to a Windows NT/2000 computer system.

[VBScript]

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

PrinterPath = "\\printserv\DefaultPrinter"

WshNetwork.AddWindowsPrinterConnection PrinterPath

[JScript]

var WshNetwork = WScript.CreateObject("WScript.Network");

var PrinterPath = "\\\\printserv\\DefaultPrinter";

WshNetwork.AddWindowsPrinterConnection(PrinterPath);



**********************

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top