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

Default Printer through Group Policy

Status
Not open for further replies.

fallb06

MIS
Jun 20, 2006
18
US
I have a printer script that if I run it locally or place it in my startup folder, it will map me to a default printer. If I set up this script to run through the user portion of group policy for any domian user, it works. The problem is I want this script to run under the computer portion of group policy.

I work in a school and I have organized my computers by classrooms in Active Directory. I want to be able to place a startup script on each particular classroom OU.

Our print server is Windows 2003 R2 (release 2). R2 comes with a nice printer management MMC and I think I recognized different options in group policy that has to do with printing.

Any advice is greatly appreciated.
 
Just curious but why do you want to assign the printer to the computer rather that the printer? It's easy to just add a mapping to a printer on a print server at user logon.

You know what Jack Burton always says at a time like this...
 
i find it much easier to just install the printer on the local admin on the machine, through a script or how ever one time, and not worry about it through the GPO, then when what ever user logs on, the printer for that system in that room is already there, one less thing to worry about

GL either way

Life is not a journey to the grave with the intention
of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up,
totally worn out, and loudly proclaiming

--"WOW-- What a Ride!"
 
I have to assign it to the computer because the user (students) go to different classrooms.

I would like to avoid doing it through local admin because we have 200 computers and we reimagine them a lot. Students get viruses, adaware, new software configuration, etc, the reasons go on and on. Imagining through a ghost server during school breaks is really easy to do.

I appreciate both of your responses.
 
That was great jonhg. I tried that but it still doesn't work. When I first read it I thought that that was it!! One other clue I can give is that I put an echo in the startup script, which basically just opens a pop up window saying "you have connected successfully to art printer" when the computer boots up. The pop up window shows up!, but the art printer still isn't there. Here is the actual script that works perfectly if you place it in your startup folder of if you just double click it.
Code:
Option Explicit
Dim objNetwork, strUNCPrinter
strUNCPrinter = "\\srv3\Art"
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.AddWindowsPrinterConnection strUNCPrinter
objNetwork.SetDefaultPrinter "\\srv3\Art"
WScript.Echo "Check the Printers folder for : " & strUNCPrinter
WScript.Quit
I've tried logging in as domain admin and as a student user but no luck. Security tab applies to authenticated users. Thanks to everyone for all the good advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top