Jump to content

Recommended Posts

Posted

Morning All,

 

I'm in the process of setting up printers on Group Policy, this is my first time doing it in an environment using Roaming Profiles.

 

The problem is, when a user logs on to a machine with a printer targetted to the machines' OU, that printer installs, but when the user logs off and logs on to another machine in a different OU they get the printer targetted to that OU too, so eventually the user will have every printer available installed, instead of just the ones relevant to the room they are in.

 

I have tried adding 'Delete All' to the policy (see attached screenshot) and putting it at number 1 in the order but it still doesn't work reliably..

 

Any advise would be great please!

 

Cheers

 

Scott

 

printers.jpg

Posted

I do something similar to your setup, but I also have a log off script included in the GPO (well, to be honest I have a separate GPO that ONLY runs this logoff script, I just adjusted the processing order for the OU).

 

But, that aside. The logoff script runs a program called "adprintx.exe" (google it or search on here) with a /F switch. It forces a delete of shared printer connections on the log off. Seems to work more reliably now

 

 

:EDIT

 

Got the name of the executable wrong

  • Thanks 1
Posted

Thanks for that themightmrp, I'll test that out.

 

This afternoon however, what I have come to realise is - when a user logs on to a machine, they get the correct printer for the machine and the previous printer(s) but if the user logs off and back on to the same machine, the rogue printer(s) delete and they are left with the correct printer.

 

Obviously we can't make users log on twice, has anyone else come across this at all?

 

Thanks,

Posted

I seem to remember we had this issue too (it was 4 years ago we went Windows 7 so I'm a bit vague) certainly we ended up putting vbs scripts on each PC that would first delete any existing networked printer, then connect to a specified printer. We then have a different script for each room and a script with no final 'connect to this printer' for PCs with no access to a printer.

 

We mainly do follow me printing now, so less of a problem.

 

Meldrew

Posted
@Scottyboy99 - what you are describing is pretty much identical to the weirdness we were getting. The logoff script calling adprintx.exe was my solution :) If it deletes the shared printers when a user logs off then they won't exist (hopefully) on the next machine they log into.
  • Thanks 1
Posted (edited)

Yeh had this too very annoying. Created a User GPO in the Pupils OU that contained the following log off script VBS. Works a treat.

 

User Configuration (Enabled)

Policies

Windows Settings

Scripts

Logoff

For this GPO, Script order: Not configured

Name: PrintersLogoff.vbs

 

And contents of PrintersLogoff.vbs:

 

Set wshNetwork = CreateObject("WScript.Network")
on Error Resume Next

'Deletes all network printers
Set clPrinters = wshNetwork.EnumPrinterConnections
On Error Resume Next
For i = 0 to clPrinters.Count - 1 Step 2
wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true
Next

 

Basically, it deletes any mapped network printers for the pupil on logoff, but leaves the printer drivers on the PC. When the pupil logs in next the drivers are already on the PCs so the printers get re-mapped in less than a second.

Edited by PotNoodleTech
  • 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



×
×
  • Create New...