| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Library to execute wmi (Windows Management Instrumentation) commands.
npm install node-wmiMethods
Constructor that generates an instance of the Query class.
Arguments
Return Value The Query method returns an instance of the query class.
Chainable API Chainable api methods exists to set each property for the query. To use the chainable api, call the method of the name of the property which you would like to set with the first argument being the value of the property and an optional second argument being a callback function to execute the query.
Callback The callback has the signature of (err, result). The callback can be supplied as the second argument to either the constructor or any of the chainable functions. The callback is the first and only parameter for the exec method.
Examples
// Object usage
var wmi = require('node-wmi');
wmi.Query({
class: 'Win32_BIOS'
}, function(err, bios) {
console.log(bios);
});// Chainable API reference with exec method
var wmi = require('node-wmi');
wmi.Query().class('Win32_BIOS').exec(function(err, bios) {
console.log(bios);
});// Using callback in chainable api
var wmi = require('node-wmi');
wmi.Query().class('Win32_LogicalDisk', function(err, disks) {
console.log(disks);
});| Back | FazBrowse Home | New Git URL |