Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brad-anton/f8c7e4782f8e215eb4c70e38bf8a8a40 to your computer and use it in GitHub Desktop.
Save brad-anton/f8c7e4782f8e215eb4c70e38bf8a8a40 to your computer and use it in GitHub Desktop.
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