bugfix system.sku (windows)
This commit is contained in:
parent
3a2ad2fa18
commit
ec5aa8d473
@ -168,8 +168,6 @@ function system(callback) {
|
||||
resolve(result);
|
||||
}
|
||||
if (_windows) {
|
||||
// exec('wmic csproduct get', function (error, stdout) {
|
||||
// TODO: refactor /value
|
||||
exec(util.getWmic() + ' csproduct get /value', opts, function (error, stdout) {
|
||||
if (!error) {
|
||||
// let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0)[0].trim().split(/\s\s+/);
|
||||
@ -179,7 +177,14 @@ function system(callback) {
|
||||
result.version = util.getValue(lines, 'version', '=');
|
||||
result.serial = util.getValue(lines, 'identifyingnumber', '=');
|
||||
result.uuid = util.getValue(lines, 'uuid', '=');
|
||||
result.sku = util.getValue(lines, 'skunumber', '=');
|
||||
exec(util.getWmic() + ' /namespace:\\\\root\\wmi path MS_SystemInformation get /value', opts, function (error, stdout) {
|
||||
if (!error) {
|
||||
let lines = stdout.split('\r\n');
|
||||
result.sku = util.getValue(lines, 'systemsku', '=');
|
||||
}
|
||||
if (callback) { callback(result); }
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
if (callback) { callback(result); }
|
||||
resolve(result);
|
||||
@ -316,7 +321,6 @@ function baseboard(callback) {
|
||||
});
|
||||
}
|
||||
if (_windows) {
|
||||
// TODO: check BIOS windows
|
||||
exec(util.getWmic() + ' baseboard get /value', opts, function (error, stdout) {
|
||||
if (!error) {
|
||||
let lines = stdout.toString().split('\r\n');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user