New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wmic

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wmic

Wrapper around the WMIC Windows command interface.

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
4.4K
-3.84%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 12 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts