Created
June 14, 2016 19:14
-
-
Save brad-anton/f8c7e4782f8e215eb4c70e38bf8a8a40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Make-Extension | |
{ | |
Param([string]$clsid, [string]$name, [string]$dll) | |
$extension = New-Object PSObject -Prop (@{'CLSID' = $clsid; | |
'Name' = $name; | |
'DLL' = $dll }) | |
$extension | |
} | |
$registry_keys = @( 'HKCU:\Software\Microsoft\Internet Explorer\Extensions', | |
'HKLM:\Software\Microsoft\Internet Explorer\Extensions', | |
'HKCU:\Software\Wow6432Node\Microsoft\Internet Explorer\Extensions', | |
'HKLM:\Software\Wow6432Node\Microsoft\Internet Explorer\Extensions' ) | |
ForEach ($key in $registry_keys) { | |
If (Test-Path $key ) { | |
$ids = Get-ChildItem $key -Name | |
ForEach ( $id in $ids ) | |
{ | |
$clsid = (Get-ItemProperty -Path $key\$id -Name ClsidExtension).'ClsidExtension' | |
$name, $dll = Lookup-Clsid $clsid | |
$extension = Make-Extension $clsid $name $dll | |
$extensions += $extension | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment