Jump to content

Recommended Posts

Posted

Hi,

 

I was just wondering how other people map network printers on a PC room basis (rather than user basis)?

 

We've been using vbscript logon/logoff scripts which look at the name of the PC to determine which room it in and then maps to the printer in the room, as sets it as the default. The printers are network printers and there is a shared printer setup for each printer on the server.

 

But I noticed that MS describes another method for deploying printers on a compuer basis, whereby a printer deployment exe is placed into the startup script of a GPO and a printer management app is used on the server to setup groups of computers. The book I was looking at was for Windows 2008 R2, but I understand that this method was introduced in Windows 2003.

 

What method are people using at their College/School? And how well does it work?

 

Thanks,

 

Bruce.

 

Leeds, UK.

Posted (edited)

There's many ways of doing it; I go with the simplest one (IMHO): I have a share on a server containing batch files (one for each room) containing the following (substitute your own server and printer name):

RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /n "\\Cpsappsrv1\room2_colour"

to connect a printer, and

RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "\\Cpsappsrv1\room2_colour"

to set the default printer. Note that these are CaSe SeNsItIvE!

 

Then I set a shortcut in the (all users) startup group of the machine, when it's deployed after being imaged (or just put it in the image), pointing to the correct file for the room it's in. Simples!

Edited by BatchFile
  • Thanks 1
Posted
There's many ways of doing it; I go with the simplest one (IMHO): I have a share on a server containing batch files (one for each room) containing the following (substitute your own server and printer name):

RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /n "\\Cpsappsrv1\room2_colour"

to connect a printer, and

RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "\\Cpsappsrv1\room2_colour"

to set the default printer. Note that these are CaSe SeNsItIvE!

 

Then I set a shortcut in the (all users) startup group of the machine, when it's deployed after being imaged (or just put it in the image), pointing to the correct file for the room it's in. Simples!

 

I've used the same script but found that running them from a GPO you need to be an administrator. Can these run from the startup folder as an ordinary user?

  • Thanks 1
Posted
I've used the same script but found that running them from a GPO you need to be an administrator. Can these run from the startup folder as an ordinary user?

 

They can on XP. They can on Vista too as long as the machine has "seen" a printer of the same type beforehand and therefore doesn't require a driver install (so I run all the scripts before imaging). 7 - not sure, haven't tried yet, but probably as Vista??

  • Thanks 2
Posted

Group Policy Preferences - users settings, but linked to a computer OU - works fine, with loopback processing enabled in merge mode.

also look at 'point & print' settings to allow silent driver installation.

This way there's no scripts, no batch files, etc.

  • Thanks 1
  • 4 weeks later...
Posted (edited)

Thank you for your ideas everyone. I've done a little more research myself as well.

 

It appears that the method that I described was first introduced in Windows 2003 and is still available in Windows 2008 and R2, but has one serious limitation in my view. Although it allows you to map a printer on a PC or user basis, it won't allow you to set it as the default. With the prelifera of printers and MS image writers that can build up, I consider being able to set a printer as the default as essential.

 

Using the the Group Policy "Preferences" (which were introduced in 2008) looks like a really powerful and simple solution. It allows you to push out a printer(s) on a per user or per PC basis within a GPO. Not only that, but it also allows you to set one as a default AND even seems to allow you to remove all existing printers (before mapping a printer and making it the default). One downside is that the Group Policy Preferences apply only to Vista/Win7 machines but won't apply to XP machines, but there is an update available which allows them to work in XP, which I have now set WSUS to push out to all PCs. Thank you Tumbleweed for suggesting this solution.

 

Thanks for the other suggestion, but we are really looking at moving away from scripting to map printers. The only method that meets our requirements seems to be the Group Policy Preferences.

 

One potential problem I do see with it is this;

 

In my experience, mapping for a user seems to work better from a technical point of view than creating a printer on the machine itself (e.g. automatic driver download from server, centralised settings picked up on the clients, one centralised print queue), but in a classroom environment you usually want to map on a per PC(s) basis, rather than per user(s).

 

Enabling loopback processing will get around this (thanks again TW :cool:), but when I have enabled this in the past it has sometimes caused unexpected problems (i.e. logon scripts running twice). I think this may have been because we linked logon scripts to the domain and this caused the logon script to filter down down two paths (to both the computer object and the user object) resulting in the User section of the GPO (including the scripts) to apply twice. I guess that the answer to this would be to move any global logon scripts (e.g. any set in the Default Domain Policy) from a GPO linked to the domain, to the College Users OU? Althoigh, I am still unsure how LBP would affect logon scripts that are linked to AD Sites.

 

Other than that niggle, the use of Preferences in Group Policy to deploy printers on a per IT Room OU basis looks like the ideal solution. But why did it take MS so long to come up with good way to deploy printers to computers in a domain? :rolleyes:

 

Thanks,

 

Bruce.

 

Leeds / Doncaster.

Edited by Bruce123
Posted

You can apply printers in the User Policy but towards the Computer.

 

We have a "All Users" policy, within the user side preferences we have printers applied based on the OU or Group that they are in. We do this via the "Item Level targetting".

The only issues with this was when I tried to apply a policy to just one computer, where I had to create a new group for it, and apply the policy to that, rather than use the DNS or NetBIOS name.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • 43 When would you like EduGeek EDIT 2025 to be held?

    1. 1. Select a time period you can attend


      • I can make it in June\July
      • I can make it in August\Sept
      • Other time period. Comment below
      • Either time

×
×
  • Create New...