Freelancer

670 palavras 3 páginas
# Copyright © 2008, Microsoft Corporation. All rights reserved.

#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

Relacionados

  • Freelancers
    602 palavras | 3 páginas
  • Freelancers
    1470 palavras | 6 páginas
  • Freelancers
    1445 palavras | 6 páginas
  • freelancers
    2414 palavras | 10 páginas
  • Freelancers
    2597 palavras | 11 páginas
  • Freelancers
    2543 palavras | 11 páginas
  • Freelancers
    1334 palavras | 6 páginas
  • freelancers
    857 palavras | 4 páginas
  • Freelancers
    2587 palavras | 11 páginas
  • Freelancer
    1324 palavras | 6 páginas