The script below uses REG query to lookup the Internet Explorer Trusted Sites list, when managed by Group Policy this list is greyed out in the GUI.
@echo off :: TrustedSites.cmd
:: Display Trusted sites and Intranet sites for /f "tokens=* skip=2 delims=" %%G in ('reg query "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey"') do ( call :sub "%%G") pause goto :eof :sub set _ie=%1 set _ie=%_ie:"=% set _ie=%_ie:REG_SZ= - % set _ie=%_ie: 0= My Computer% set _ie=%_ie: 1= Local Intranet Zone% set _ie=%_ie: 2= Trusted sites Zone% set _ie=%_ie: 3= Internet Zone% set _ie=%_ie: 4= Restricted Sites Zone% echo %_ie%
The subroutine is used to decode the five Zone numbers and provide a more meaningful output.
"Me, I'm dishonest, and you can always trust a dishonest man to be dishonest.
Honestly, it's the honest ones you have to watch out for...” ~ Captain Jack Sparrow (played by Johnny Depp)
Related:
REG - Registry: Read, Set, Export, Delete keys and values.