Re: pushprinterconnection.exe



Here's how I've done it in the past, and it is applied per computer:

First you create a couple of printer shares on your print server, or
workgroup server that is part of the domain. Then you create a VB script
(sample code below) that when executed adds the printer. Now set this
script to run when any user logs in, and it runs with system level privs,
meaning no user interaction, and full access to add the printer. The only
issue is that you'll need to organize your computers according to printer.
So if you have your accounting dept. printing to the accounting printer, you
need to put the accounting computers in their own OU. More below:

Steps (assumes Win2k3):
-Create printer share called "accounting" (instructions for that beyond the
scope).
-Create script. Sample script is below. Put it in a share that you'll be
able to get to later, and make sure everyone can read from the share (I
advise setting perms at the file level.).
-Create OU called "accounting"
-Open Active Directory for Users and Computers
-Click to expand your internal domain name.
-Right-click on the top level and choose New -> Organizational Unit
-Give it the name "accounting"
-Move the OU to wherever you'd like later after all of this has been
tested to work.
-Move your accounting computers to that OU.
-They might be in the "computers" container. If not, locate the
appropriate ones, select them, then right-click and choose "Move . . ."
-Select the accounting OU that you just created to move those computers
into it.
-Create policy that runs the script when ANY user logs in on computers the
policy applies to:
-Right-click on your new accounting OU, and choose properties.
-Click on "Group Policy"
-Click "Open" to open the GPMC. If that "open" button isn't there, be
sure you've installed SP1, and the GPMC.
-When gpmc opens, navigate to find your OU.
-Right-click and choose "create and link a GPO here"
-It will ask for a name. Type in "accounting printers policy" or the
like.
-right-click the OU again so that the newly created GPO shows on the
right-hand pane of the gpmc window.
-Right-click the GPO and choose "edit"
-In the editor window, navigate to Computer configuration ->
Adminsitrative Templates -> System -> Logon.
-Double-click on "Run these programs at user logon."
-Click "enable" then click "show"
-It will pop up a new window, now click on "add" and type in the full
UNC path to the add printer script (sample below) that you want to run.
-Click Ok and apply to close out of all those windows, then sync your
domain controllers.

Now you reboot your clients, and as long as they are set to refresh their
policy upon reboot, they'll acquire the new printer settings. To force the
policy update, run the command:

gpupdate /force.

Can you tell me if these instructions worked for you? I've been using this
method now for years, and it has saved me countless hours of manual labor,
and I hope it works for you as well.

Thanks,
Pair

Below is the code. Save it to a .vbs file, and run it manually to see how
it works. I've commented things out with a single quote.

'The on error resume next line is important. Leave it there.
on error resume next
set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = CreateObject("WScript.Network")
Set filesys = Wscript.CreateObject("Scripting.FileSystemObject")
WshNetwork.AddWindowsPrinterConnection "\\printserver\accounting"
WshNetwork.SetDefaultPrinter "\\printserver\accounting"


"arglong" <arglong@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:347B469B-4EBF-46EC-A625-EDFE561E8B9B@xxxxxxxxxxxxxxxx
Yes, as long as it pushes the printer per computer and not per user.

thanks,

Arglong

"TwistedPair" wrote:

Actually when I say "different method" it still uses Active Directory,
but
also uses scripting to accomplish the same task.

Thanks,
Pair

"arglong" <arglong@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:04F56F14-E801-4B5C-9147-3CEA7EC164C6@xxxxxxxxxxxxxxxx
I installed Server 2003 R2 for the printer management console and I'm
having
problems. I'm trying to create a group policy per computer and I cannot
create a logon script because I get an error message every time I try
to
copy
it. It says cannot copy pushprinterconnection: Access is denied. Make
sure
the disk is not full or srite protected and that the files is not
currently
in use.

I can create the group policy per user with no problems. It is the per
computer that is causing me all the trouble. HELP. School is starting
soon.
I'm the tech coordinator and I need to have the printers deployed ASAP.





.