I often publish a desktop in my projects and most of the times the new favorites folder in the explorer has to be removed because it’s not easily managed. I found the following method is pretty straightforward and works too.
Yuri Haak and a couple of other smart guys figured this out on the RESUG forum so I took their tips and made some automation possible. To change the reg keys that can remove the favorites from the explorer you first have to change the rights on the registry key, I did this by using Helge Klein’s SetACL which is an easy tool for such small (but tricky) adjustments.
The following command lines can be used:
“SetACL_x64.exe -on “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder” -ot reg -actn ace -ace “n:Administrators;p:full”
“SetACL_x64.exe -on “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder” -ot reg -actn ace -ace “n:Administrators;p:full”
After setting the appropriate rights you can change the reg keys so that the Favorites aren’t displayed anymore, I did this by using the following reg file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
“Attributes”=dword:a9400100
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
“Attributes”=dword:a9400100
To use this you can save the text into a .reg file and import the file by using the following command:
regedit -s Disable_Favorites.reg
After a reboot the Favorites folder won’t be displayed in the Explorer anymore.
Note: Do this on a test server first before you implement this on your production environtment.
Kees Baggerman
Latest posts by Kees Baggerman (see all)
- Nutanix AHV and Citrix MCS: Adding a persistent disk via Powershell – v2 - November 19, 2019
- Recovering a Protection Domain snapshot to a VM - September 13, 2019
- Checking power settings on VMs using powershell - September 11, 2019
- Updated: VM Reporting Script for Nutanix with Powershell - July 3, 2019
- Updated (again!): VM Reporting Script for Nutanix AHV/vSphere with Powershell - June 17, 2019
Hi Kees,
I think the first SetACL command should read “SetACL_x64.exe -on “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder” -ot reg -actn ace -ace “n:Administrators;p:full” (no Wow6432Node)?
Thanks, Iain
Hi Iain, you’re spot on. Changed the examples. Thanks!