systeminformation 5.10.1 → 5.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/osinfo.js +7 -7
- package/lib/processes.js +11 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -982,6 +982,7 @@ Written by Sebastian Hildebrandt [sebhildebrandt](https://github.com/sebhildebra
|
|
|
982
982
|
- Maria Camila Cubides [MariaCamilaCubides](https://github.com/MariaCamilaCubides)
|
|
983
983
|
- Aleksander Krasnicki [plakak](https://github.com/plakak)
|
|
984
984
|
- Alexis Tyler [OmgImAlexis](https://github.com/OmgImAlexis)
|
|
985
|
+
- Simon Smith [si458](https://github.com/si458)
|
|
985
986
|
|
|
986
987
|
OSX Temperature: credits here are going to:
|
|
987
988
|
|
package/lib/osinfo.js
CHANGED
|
@@ -1132,13 +1132,13 @@ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
|
|
|
1132
1132
|
if (process.arch === 'ia32' && Object.prototype.hasOwnProperty.call(process.env, 'PROCESSOR_ARCHITEW6432')) {
|
|
1133
1133
|
sysdir = '%windir%\\sysnative\\cmd.exe /c %windir%\\System32';
|
|
1134
1134
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
util.
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
result.
|
|
1135
|
+
util.powerShell('Get-WmiObject Win32_ComputerSystemProduct | fl *').then((stdout) => {
|
|
1136
|
+
// let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0)[0].trim().split(/\s\s+/);
|
|
1137
|
+
let lines = stdout.split('\r\n');
|
|
1138
|
+
result.hardware = util.getValue(lines, 'uuid', ':').toLowerCase();
|
|
1139
|
+
exec(`${sysdir}\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid`, util.execOptsWin, function (error, stdout) {
|
|
1140
|
+
parts = stdout.toString().split('\n\r')[0].split('REG_SZ');
|
|
1141
|
+
result.os = parts.length > 1 ? parts[1].replace(/\r+|\n+|\s+/ig, '').toLowerCase() : '';
|
|
1142
1142
|
if (callback) {
|
|
1143
1143
|
callback(result);
|
|
1144
1144
|
}
|
package/lib/processes.js
CHANGED
|
@@ -324,7 +324,16 @@ function services(srv, callback) {
|
|
|
324
324
|
}
|
|
325
325
|
if (_windows) {
|
|
326
326
|
try {
|
|
327
|
-
|
|
327
|
+
let wincommand = "Get-WmiObject Win32_Service";
|
|
328
|
+
if (srvs[0] !== '*') {
|
|
329
|
+
wincommand += ' -Filter "';
|
|
330
|
+
for (let i = 0; i < srvs.length; i++) {
|
|
331
|
+
wincommand += `Name='${srvs[i]}' or `;
|
|
332
|
+
}
|
|
333
|
+
wincommand = `${wincommand.slice(0,-4)}"`;
|
|
334
|
+
}
|
|
335
|
+
wincommand += ' | fl *';
|
|
336
|
+
util.powerShell(wincommand).then((stdout, error) => {
|
|
328
337
|
if (!error) {
|
|
329
338
|
let serviceSections = stdout.split(/\n\s*\n/);
|
|
330
339
|
for (let i = 0; i < serviceSections.length; i++) {
|
|
@@ -338,7 +347,7 @@ function services(srv, callback) {
|
|
|
338
347
|
if (srvString === '*' || srvs.indexOf(srvName) >= 0 || srvs.indexOf(srvCaption) >= 0) {
|
|
339
348
|
result.push({
|
|
340
349
|
name: srvName,
|
|
341
|
-
running: (started === '
|
|
350
|
+
running: (started.toLowerCase() === 'true'),
|
|
342
351
|
startmode: startMode,
|
|
343
352
|
pids: [pid],
|
|
344
353
|
cpu: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.2",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|