donderdag 17 januari 2013

Group policy logoff script runs twice

Our solution is at the bottom of this document

Some of our users needed a scanner and scanner software on a dedicated Windows 7 machine.
The software has the ability to scan and print directly to a plotter located in the office.
The users want to log on to this machine with their own domain user account.

However, their default printer is not the plotter and they don't want to change their default printer after they log on, and there is no option in the software to select another printer but the default printer.....

My collegue has written an VB script that's check the default printer at logon on this machine, changes this to the plotter, and a VB script that sets the original printer as default again at logoff.

This first scripts has to run at logon, the second at logoff.

We copied the scripts to c:\program files (x86)\Printer Scipt

The logon scripts is run through:

HKLM\Software\Microsoft\Windows\Current version\Run


We placed the logoff script in the local group policy on the dedicated machine

User Configuration -> Windows Settings -> Scripts (logon/logoff) -> logoff

However the logoff script was started twice.....

That's because we have Group Policy Loopback enabled in the Computer OU in Active Directory.
Solution:

We created a new group policy on this OU with Group Policy loopback disabled, assigned an security group to this Group policy, added the machine to this security group. We set this policy to be enforced.

Geen opmerkingen:

Een reactie posten