# encoding: ascii
# api: powershell
# title: Antivirus path
# description: This script returns a path where antivirus has been installed. It doesn’t use WMI (thanks a lot to greg zakharov for this trick).
# version: 0.1
# author: Olivia Wild
# license: CC0
# x-poshcode-id: 6246
# x-archived: 2016-10-18T13:19:25
# x-published: 2016-03-05T17:27:00
#
#
Get-ChildItem Registry::HKCR\CLSID | ForEach-Object {
$x = (Get-ItemProperty 'Registry::HKCR\Component Categories\*' |
Where-Object {$_ -match 'antivirus'}).PSChildName
}{
if ((Get-ChildItem "$($_.PSPath)\Implemented Categories" -ea 0).PSChildName -eq $x) {
Split-Path (Get-ItemProperty "$($_.PSPath)\InprocServer32").'(default)'
break
}
}