Freelancer
#Localization Data
Import-LocalizedData -BindingVariable localizationString -FileName IEBrowseWeb_TroubleShooter
. .\CL_Utility.ps1
#Get Module name and Guid from registry, then add into IE add-on modules hashtable function GetModuleInfo([string]$module_guid = $(throw "No module guid is specified"), [System.Collections.Hashtable]$ModulesHash)
{
[string]$moduleKey = "Registry::HKEY_CLASSES_ROOT\CLSID\" + $module_guid + "\InprocServer32" if(-not (Test-Path $moduleKey)) { $moduleKey = "Registry::HKEY_CLASSES_ROOT\WOW6432NODE\CLSID\" + $module_guid + "\InprocServer32" } if(Test-Path $moduleKey) { $prop = Get-ItemProperty -path $moduleKey if ($prop -ne $null) { $moduleName = Split-Path -leaf $prop."(default)" if(-not $ModulesHash.Containskey($module_guid)) { $ModulesHash.Add($module_guid, $moduleName) } } }
}
#Get Registry sub items then add into IE add-on modules hashtable function GetRegSubItems([string]$Reg_path = $(throw "No Registry path is specified"), [System.Collections.Hashtable]$ModulesHash)
{
if(Test-Path $Reg_path) { $RegKey = Get-Item -path $Reg_path foreach($name in $RegKey.GetSubKeyNames()) { GetModuleInfo $name $ModulesHash } }
}
#Get Registry properties then add into IE add-on modules hashtable function GetRegProperties([string]$Reg_path = $(throw "No Registry path is specified"), [System.Collections.Hashtable]$ModulesHash)
{
if(Test-Path $Reg_path) { $RegKey = Get-Item -path $Reg_path #add each property into hashtable for ($i=0; $i -lt $RegKey.Property.Length; $i++) { GetModuleInfo $RegKey.Property[$i] $ModulesHash } }
}
#retrieve IE add-on modules' guid and name from registry