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.

Silent uninstall and install Java Runtime Environment

Today I did a silent unistall for Java Runtime Environment 1.6.0 update 17 and made a silent install for the 32-bit 1.6.0 update 37 on our Windows 7 64-bit domain member computers.

Silent Uninstall string for update JRE 1.6.0_17:

MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216017FF} /qn


Install string for update JRE 1.6.0_37:

jre-6u37-windows-i586.exe /s IEXPLORER=1 MOZILLA=1 REBOOT=Suppress ADDLOCAL=ALL

Disable enable updates and check for updates:

Add DWORD value:  EnableAutoUpdateCheck=0
TO: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy

Change: EnableJavaUpdate=1 to EnableJavaUpdate=0
In: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy

Remove: SunJavaUpdateSched
From: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run

Hide systemtray icon

HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Plug-in\1.6.0_37DWORD:HideSystemTrayIcon
value:1