mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 23:41:42 +00:00
updated
This commit is contained in:
parent
ea2aed0df0
commit
49eb70f989
|
@ -45,17 +45,17 @@ scope.setTaskmgr = function(buffer) {
|
||||||
|
|
||||||
// detect antivirus from security center
|
// detect antivirus from security center
|
||||||
scope.detectAntivirus = function() {
|
scope.detectAntivirus = function() {
|
||||||
var detectedItems = [];
|
var displayNames = [];
|
||||||
|
|
||||||
var objWMIService = GetObject("winmgmts:\\.\root\SecurityCenter2");
|
var objWMIService = GetObject("winmgmts:\\.\root\SecurityCenter2");
|
||||||
var colItems = objWMIService.ExecQuery("SELECT * FROM AntiVirusProduct");
|
var colItems = objWMIService.ExecQuery("SELECT * FROM AntiVirusProduct");
|
||||||
var enumItems = new Enumerator(colItems);
|
var enumItems = new Enumerator(colItems);
|
||||||
for (; !enumItems.atEnd(); enumItems.moveNext()) {
|
for (; !enumItems.atEnd(); enumItems.moveNext()) {
|
||||||
var objItem = enumItems.item();
|
var objItem = enumItems.item();
|
||||||
detectedItems.push(objItem.displayName);
|
displayNames.push(objItem.displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return detectedItems;
|
return displayNames;
|
||||||
};
|
};
|
||||||
|
|
||||||
return scope;
|
return scope;
|
||||||
|
|
|
@ -69,7 +69,6 @@ global.exit = function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
// Private APIs / Utility functions
|
// Private APIs / Utility functions
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue
Block a user