function getDiskSerialNum(callBack){
const si = require('systeminformation');
si.diskLayout(callBack);
}
getDiskSerialNum(function (r) {
var disCode = r[0].serialNum;
var text = '';
if (nullOrEmpty(disCode))
text = 'Error';
else
text = disCode;
aelrt('机器码' + text);
});
发布评论
评论(1)
resolved
使用systeminformation模块(https://github.com/sebhildebr...)
代码如下:
参考:https://stackoverflow.com/que...