wmic

Wrapper around the WMIC Windows command interface.

MIT 17 个版本
安装
npm install wmic
yarn add wmic
pnpm add wmic
bun add wmic
README

wmic

Wrapper around the Windows WMIC interface for Node.js.

Example

var wmic = require('wmic');

// equivalent of 'wmic nic get list'
wmic.get_list('nic', function(err, nics) {
  // console.log(err || nics);
})

Usage

wmic.get_value(section, value, conditions, callback)

Returns a single value from wmic, for example to get the hostname:

wmic.get_value('computersystem', 'name', null, function(err, value) {
  console.log(value) // Your Hostname
})

wmic.get_values(section, value, conditions, callback)

Returns an array of values from wmic, for example to list hard drives:

wmic.get_values('logicaldisk', 'name, volumename', null, function(err, values) {
  console.dir(values) // An array of disks
})

Credits

Written by Tomas Pollak, with the help of contributors.

Small print

(c) Fork Ltd, MIT licensed.

版本列表
1.1.1 2022-03-12
1.1.0 2022-03-11
1.0.1 2021-08-20
1.0.0 2021-04-23
0.5.0 2020-08-06
0.4.1 2021-08-20
0.4.0 2020-01-21
0.3.0 2016-12-16
0.2.0 2016-07-19
0.1.0 2016-05-27
0.0.7 2014-10-04
0.0.6 2014-09-29
0.0.5 2014-08-24
0.0.4 2014-08-24
0.0.3 2014-08-12
0.0.2 2014-05-21
0.0.1 2014-03-28