#12341 limit invnetory on windows basic options

This commit is contained in:
Jonathan 2023-11-30 12:53:59 +01:00
parent 607d7e36e5
commit ee6717aa06
2 changed files with 2 additions and 2 deletions

View File

@ -643,7 +643,7 @@ if (enterprise_installed()) {
} }
} }
} else { } else {
if (preg_match('/.vbs/', $row['raw']) === 1) { if (preg_match('/.vbs/', $row['raw']) === 1 && preg_match('/nettraffic.vbs/', $row['raw']) === 0 && preg_match('/software_installed.vbs/', $row['raw']) === 0 && preg_match('/df.vbs/', $row['raw']) === 0 && preg_match('/win_cf.vbs/', $row['raw']) === 0) {
if ($row['disabled'] === 1) { if ($row['disabled'] === 1) {
$enable_inventory = 0; $enable_inventory = 0;
} else { } else {

View File

@ -1298,7 +1298,7 @@ if ($update_agent) {
} }
// Inventory switch enable when basic options are enabled. // Inventory switch enable when basic options are enabled.
if (preg_match('/.vbs/', $row['raw']) === 1) { if (preg_match('/.vbs/', $row['raw']) === 1 && preg_match('/nettraffic.vbs/', $row['raw']) === 0 && preg_match('/software_installed.vbs/', $row['raw']) === 0 && preg_match('/df.vbs/', $row['raw']) === 0 && preg_match('/win_cf.vbs/', $row['raw']) === 0) {
if ($enable_inventory === 1) { if ($enable_inventory === 1) {
if ($row['disabled'] === 1) { if ($row['disabled'] === 1) {
$agent->enablePlugins($row['raw']); $agent->enablePlugins($row['raw']);