MyPCHealth

 

 


Group Policy Essentials

I have recently developed a Windows 7 Group policy for our network. Unfortunately i have to say it was an absolute nightmare. But i hope this page will make some of the nightmare settings to lock down windows 7 easier for you to deploy as i spent stupid amounts of hours sorting it out.

The Items that i found most difficulty in sorting when developing my group policy where the following::

Remove the Libraries icon from the navigation pane in windows explorer.

To remove the lirbaries icon that sits in the navigation pane in windows explorer you need to change a registry setting on the computer. The key we need to look at is the following :

HKEY_CLASSES_ROOT\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder

With the item called "Attributes" of type REG_DWORD. To make the item disappear we need to change the items attribute to b090010d and if you want it to be shown (default) the hexidecimal number needs to be b080010d. Unfortuantely this is not quite as straight forward as just changing it because the permissions to the this key require a high level of access. So deploy this setting from a group policy we need to make 2 changes, the permissions to the key and the setting itself.

 

Changing the permissions of the key in group policy.

 

 

You should have now given the computer access to this key and it will now allow you to change it by using the registry settings in group policy. If you dont give permissions to the key it will not allow it to be change and the libraries will not be hidden.

 

Hide Library icon in Windows Explorer navigation pane

 

Remove Libraries Icon using VBScript

Please see below for some vbscript that will remove the library icon from the navigation pane. This has been tested locally on a windows machine. If you wish to deploy across a network i would suggest further testing until you are sure you are happy with the results.

Code

'FIRST SECTION MAKE SURE PERMISSIONS ON REGISTRY KEY ARE ALLOWED

' Create temp file with the script that regini.exe will use
'
set oFSO = CreateObject("Scripting.FileSystemObject")
strFileName = oFSO.GetTempName
set oFile = oFSO.CreateTextFile(strFileName)
oFile.WriteLine "HKEY_CLASSES_ROOT\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder [1 5 7 11 17]"
oFile.Close

' Change registry permissions with regini.exe
'
set oShell = CreateObject("WScript.Shell")
oShell.Run "regini " & strFileName, 8, true

' Delete temp file
'
oFSO.DeleteFile strFileName

 

'SECOND SECTION SET CORRECT REGISTRY SETTING

const HKEY_CLASSES_ROOT = &H80000000
dim strKeypath

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv")

'Set path to registry key and dword value
strKeyPath = "CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder"
strValueName = "Attributes"

'Change Value needed to hide library ... 2962227469 to hide , 2961178893 to reveal
oReg.SetDWORDValue HKEY_CLASSES_ROOT,strKeyPath,strValueName,2962227469




Disclaimer: By using any of the software mentioned in this document you are adhering to their terms and conditions of use. I do not accept any responsibility for any loss, damage or disruption to your data or computer system that may occur while using the software mentioned in this document.
Site Map | Privacy Policy | Contact Us
| Best viewed in 1024 * 768 or above | ©2008 www.MyPcHealth.co.uk