Инвентаризация ПО предприятия с помощью антивируса Касперского
Запросы к базе сервера администрирования касперского. (В моем случае mySQL, в качестве оболочки удобно использовать heidisql.exe)
"Имя программы, число установок"
select b.wstrdisplayname as name, count(*) as num
from hst_inventory_hstprds a, hst_inventory_products b
where a.nproduct=b.nid
group by wstrdisplayname
order by num desc;
---------------------------------------------------------------------------------
"Имя ПК с программой"
select c.strwinhostname as host, b.wstrdisplayname as name
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%Windows XP Service Pack 3%'
and c.nid=a.nhostid;
select c.strwinhostname as host, b.wstrdisplayname as name, a.tmInstallDate as idate
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%Microsoft Office%'
and b.wstrdisplayname not like '%iewer%'
and c.nid=a.nhostid;
---------------------------------------------------------------------------------
"Имя ПК с программой с датой установки"
select c.strwinhostname as host, b.wstrdisplayname as name, a.tmInstallDate as idate
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%Windows XP Service Pack 3%'
and c.nid=a.nhostid;
---------------------------------------------------------------------------------
"Имя ПК с программой с датой установки" поиск по имени ПК
select c.strwinhostname as host, b.wstrdisplayname as name, a.tmInstallDate as idate
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and c.strwinhostname like '%n3088%'
and c.nid=a.nhostid;
"обновления"
select c.strwinhostname as host, b.wstrdisplayname as name, a.tmInstallDate as idate
from hst_inventory_hstprds a, hst_inventory_patches b, Hosts c
where a.nproduct=b.nid
and c.strwinhostname like '%n3088%'
and c.nid=a.nhostid;
---------------------------------------------------------------------------------
"Имя патча, число установок"
select b.wstrdisplayname as name, count(*) as num
from hst_inventory_hstprds a, hst_inventory_patches b
where a.nproduct=b.nid
group by wstrdisplayname
order by num desc;
---------------------------------------------------------------------------------
"Имя ПК имя патча"
select c.strwinhostname as host, b.wstrdisplayname as name
from hst_inventory_hstprds a, hst_inventory_patches b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%KB2570791%'
and c.nid=a.nhostid;
KB2570791
Обновление безопасности для Windows XP (KB2124261)
---------------------------------------------------------------------------------
"Имя ПК имя патча и дата" - дата установки патча не хранится
select c.strwinhostname as host, b.wstrdisplayname as name, a.tmInstallDate as date
from hst_inventory_hstprds a, hst_inventory_patches b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%KB963707%'
and c.nid=a.nhostid;
KB2570791
Обновление безопасности для Windows XP (KB2124261)
---------------------------------------------------------------------------------
найти nProduct
select * from hst_inventory_patches a where a.wstrDisplayName like '%2570791%';
-------------------------
select c.strwinhostname as host
from Hosts c
where c.strwinhostname like 'N3088'
and c.nid=a.nhostid;
-------------------------
Microsoft Office Visio
Microsoft Office
---------------------------------
Hosts
nId
strWinHostName
strDisplayName
strDnsName
nIpAddress
host_ext_attr
nId
wstrComment
----------------------------------
Запрос компьютер имя коммент адрес-агента
select a.strDisplayName as DisplayName, a.strWinHostName as WinHostName, b.wstrComment as Comment,
a.strDnsName as DnsName, a.strAddress as AgentIP
from Hosts a, host_ext_attr b
where a.nId=b.nId;
Смотрим где стоит MSO
select c.strwinhostname as host, b.wstrdisplayname as name, a.tmInstallDate as idate
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%Microsoft Office%'
and b.wstrdisplayname not like '%iewer%'
and c.nid=a.nhostid;
----------------------------------------------------------------------------------------------------
select c.strwinhostname as host, b.wstrdisplayname as name
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%${n}%'
and c.nid=a.nhostid;
select c.strwinhostname as host, b.wstrdisplayname as name
from hst_inventory_hstprds a, hst_inventory_products b, Hosts c
where a.nproduct=b.nid
and b.wstrdisplayname like '%Adobe Photoshop%'
and c.nid=a.nhostid;