systeminformation 5.12.13 → 5.12.15
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/lib/audio.js +1 -1
- package/lib/battery.js +3 -3
- package/lib/bluetooth.js +1 -1
- package/lib/cpu.js +5 -5
- package/lib/filesystem.js +3 -3
- package/lib/graphics.js +2 -2
- package/lib/memory.js +1 -1
- package/lib/network.js +9 -9
- package/lib/osinfo.js +3 -3
- package/lib/printer.js +1 -1
- package/lib/processes.js +3 -3
- package/lib/system.js +7 -7
- package/lib/usb.js +1 -1
- package/lib/users.js +3 -3
- package/package.json +1 -1
package/lib/audio.js
CHANGED
|
@@ -191,7 +191,7 @@ function audio(callback) {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
if (_windows) {
|
|
194
|
-
util.powerShell('Get-
|
|
194
|
+
util.powerShell('Get-CimInstance Win32_SoundDevice | select DeviceID,StatusInfo,Name,Manufacturer | fl').then((stdout, error) => {
|
|
195
195
|
if (!error) {
|
|
196
196
|
const parts = stdout.toString().split(/\n\s*\n/);
|
|
197
197
|
for (let i = 0; i < parts.length; i++) {
|
package/lib/battery.js
CHANGED
|
@@ -225,9 +225,9 @@ module.exports = function (callback) {
|
|
|
225
225
|
if (_windows) {
|
|
226
226
|
try {
|
|
227
227
|
const workload = [];
|
|
228
|
-
workload.push(util.powerShell('Get-
|
|
229
|
-
workload.push(util.powerShell('(Get-
|
|
230
|
-
workload.push(util.powerShell('(Get-
|
|
228
|
+
workload.push(util.powerShell('Get-CimInstance Win32_Battery | select BatteryStatus, DesignCapacity, DesignVoltage, EstimatedChargeRemaining, DeviceID | fl'));
|
|
229
|
+
workload.push(util.powerShell('(Get-CimInstance -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity'));
|
|
230
|
+
workload.push(util.powerShell('(Get-CimInstance -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity'));
|
|
231
231
|
util.promiseAll(
|
|
232
232
|
workload
|
|
233
233
|
).then((data) => {
|
package/lib/bluetooth.js
CHANGED
|
@@ -204,7 +204,7 @@ function bluetoothDevices(callback) {
|
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
if (_windows) {
|
|
207
|
-
util.powerShell('Get-
|
|
207
|
+
util.powerShell('Get-CimInstance Win32_PNPEntity | select PNPClass, Name, Manufacturer | fl').then((stdout, error) => {
|
|
208
208
|
if (!error) {
|
|
209
209
|
const parts = stdout.toString().split(/\n\s*\n/);
|
|
210
210
|
parts.forEach((part) => {
|
package/lib/cpu.js
CHANGED
|
@@ -810,8 +810,8 @@ function getCpu() {
|
|
|
810
810
|
if (_windows) {
|
|
811
811
|
try {
|
|
812
812
|
const workload = [];
|
|
813
|
-
workload.push(util.powerShell('Get-
|
|
814
|
-
workload.push(util.powerShell('Get-
|
|
813
|
+
workload.push(util.powerShell('Get-CimInstance Win32_processor | select Name, Revision, L2CacheSize, L3CacheSize, Manufacturer, MaxClockSpeed, Description, UpgradeMethod, Caption, NumberOfLogicalProcessors, NumberOfCores | fl'));
|
|
814
|
+
workload.push(util.powerShell('Get-CimInstance Win32_CacheMemory | select CacheType,InstalledSize,Level | fl'));
|
|
815
815
|
workload.push(util.powerShell('(Get-CimInstance Win32_ComputerSystem).HypervisorPresent'));
|
|
816
816
|
|
|
817
817
|
Promise.all(
|
|
@@ -1207,7 +1207,7 @@ function cpuTemperature(callback) {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
if (_windows) {
|
|
1209
1209
|
try {
|
|
1210
|
-
util.powerShell('Get-
|
|
1210
|
+
util.powerShell('Get-CimInstance MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" | Select CurrentTemperature').then((stdout, error) => {
|
|
1211
1211
|
if (!error) {
|
|
1212
1212
|
let sum = 0;
|
|
1213
1213
|
let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0);
|
|
@@ -1448,7 +1448,7 @@ function cpuCache(callback) {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
if (_windows) {
|
|
1450
1450
|
try {
|
|
1451
|
-
util.powerShell('Get-
|
|
1451
|
+
util.powerShell('Get-CimInstance Win32_processor | select L2CacheSize, L3CacheSize | fl').then((stdout, error) => {
|
|
1452
1452
|
if (!error) {
|
|
1453
1453
|
let lines = stdout.split('\r\n');
|
|
1454
1454
|
result.l1d = 0;
|
|
@@ -1458,7 +1458,7 @@ function cpuCache(callback) {
|
|
|
1458
1458
|
if (result.l2) { result.l2 = parseInt(result.l2, 10) * 1024; }
|
|
1459
1459
|
if (result.l3) { result.l3 = parseInt(result.l3, 10) * 1024; }
|
|
1460
1460
|
}
|
|
1461
|
-
util.powerShell('Get-
|
|
1461
|
+
util.powerShell('Get-CimInstance Win32_CacheMemory | select CacheType,InstalledSize,Level | fl').then((stdout, error) => {
|
|
1462
1462
|
if (!error) {
|
|
1463
1463
|
const parts = stdout.split(/\n\s*\n/);
|
|
1464
1464
|
parts.forEach(function (part) {
|
package/lib/filesystem.js
CHANGED
|
@@ -152,7 +152,7 @@ function fsSize(callback) {
|
|
|
152
152
|
if (_windows) {
|
|
153
153
|
try {
|
|
154
154
|
// util.wmic('logicaldisk get Caption,FileSystem,FreeSpace,Size').then((stdout) => {
|
|
155
|
-
util.powerShell('Get-
|
|
155
|
+
util.powerShell('Get-CimInstance Win32_logicaldisk | select Caption,FileSystem,FreeSpace,Size | fl').then((stdout, error) => {
|
|
156
156
|
if (!error) {
|
|
157
157
|
let devices = stdout.toString().split(/\n\s*\n/);
|
|
158
158
|
devices.forEach(function (device) {
|
|
@@ -425,7 +425,7 @@ function blockDevices(callback) {
|
|
|
425
425
|
let drivetypes = ['Unknown', 'NoRoot', 'Removable', 'Local', 'Network', 'CD/DVD', 'RAM'];
|
|
426
426
|
try {
|
|
427
427
|
// util.wmic('logicaldisk get Caption,Description,DeviceID,DriveType,FileSystem,FreeSpace,Name,Size,VolumeName,VolumeSerialNumber /value').then((stdout, error) => {
|
|
428
|
-
// util.powerShell('Get-
|
|
428
|
+
// util.powerShell('Get-CimInstance Win32_logicaldisk | select Caption,DriveType,Name,FileSystem,Size,VolumeSerialNumber,VolumeName | fl').then((stdout, error) => {
|
|
429
429
|
util.powerShell('Get-CimInstance -ClassName Win32_LogicalDisk | select Caption,DriveType,Name,FileSystem,Size,VolumeSerialNumber,VolumeName | fl').then((stdout, error) => {
|
|
430
430
|
if (!error) {
|
|
431
431
|
let devices = stdout.toString().split(/\n\s*\n/);
|
|
@@ -1193,7 +1193,7 @@ function diskLayout(callback) {
|
|
|
1193
1193
|
if (_windows) {
|
|
1194
1194
|
try {
|
|
1195
1195
|
const workload = [];
|
|
1196
|
-
workload.push(util.powerShell('Get-
|
|
1196
|
+
workload.push(util.powerShell('Get-CimInstance Win32_DiskDrive | select Caption,Size,Status,PNPDeviceId,BytesPerSector,TotalCylinders,TotalHeads,TotalSectors,TotalTracks,TracksPerCylinder,SectorsPerTrack,FirmwareRevision,SerialNumber,InterfaceType | fl'));
|
|
1197
1197
|
workload.push(util.powerShell('Get-PhysicalDisk | select BusType,MediaType,FriendlyName,Model,SerialNumber,Size | fl'));
|
|
1198
1198
|
if (util.smartMonToolsInstalled()) {
|
|
1199
1199
|
try {
|
package/lib/graphics.js
CHANGED
|
@@ -772,9 +772,9 @@ function graphics(callback) {
|
|
|
772
772
|
// https://devblogs.microsoft.com/scripting/use-powershell-to-discover-multi-monitor-information/
|
|
773
773
|
try {
|
|
774
774
|
const workload = [];
|
|
775
|
-
workload.push(util.powerShell('Get-
|
|
775
|
+
workload.push(util.powerShell('Get-CimInstance win32_VideoController | fl *'));
|
|
776
776
|
workload.push(util.powerShell('gp "HKLM:\\SYSTEM\\ControlSet001\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}\\*" -ErrorAction SilentlyContinue | where MatchingDeviceId $null -NE | select MatchingDeviceId,HardwareInformation.qwMemorySize | fl'));
|
|
777
|
-
workload.push(util.powerShell('Get-
|
|
777
|
+
workload.push(util.powerShell('Get-CimInstance win32_desktopmonitor | fl *'));
|
|
778
778
|
workload.push(util.powerShell('Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorBasicDisplayParams | fl'));
|
|
779
779
|
workload.push(util.powerShell('Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Screen]::AllScreens'));
|
|
780
780
|
workload.push(util.powerShell('Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorConnectionParams | fl'));
|
package/lib/memory.js
CHANGED
|
@@ -504,7 +504,7 @@ function memLayout(callback) {
|
|
|
504
504
|
const FormFactors = 'Unknown|Other|SIP|DIP|ZIP|SOJ|Proprietary|SIMM|DIMM|TSOP|PGA|RIMM|SODIMM|SRIMM|SMD|SSMP|QFP|TQFP|SOIC|LCC|PLCC|BGA|FPBGA|LGA'.split('|');
|
|
505
505
|
|
|
506
506
|
try {
|
|
507
|
-
util.powerShell('Get-
|
|
507
|
+
util.powerShell('Get-CimInstance Win32_PhysicalMemory | select DataWidth,TotalWidth,Capacity,BankLabel,MemoryType,SMBIOSMemoryType,ConfiguredClockSpeed,FormFactor,Manufacturer,PartNumber,SerialNumber,ConfiguredVoltage,MinVoltage,MaxVoltage | fl').then((stdout, error) => {
|
|
508
508
|
if (!error) {
|
|
509
509
|
let devices = stdout.toString().split(/\n\s*\n/);
|
|
510
510
|
devices.shift();
|
package/lib/network.js
CHANGED
|
@@ -247,8 +247,8 @@ function parseLinesWindowsNics(sections, nconfigsections) {
|
|
|
247
247
|
function getWindowsNics() {
|
|
248
248
|
return new Promise((resolve) => {
|
|
249
249
|
process.nextTick(() => {
|
|
250
|
-
let cmd = 'Get-
|
|
251
|
-
cmd += 'Get-
|
|
250
|
+
let cmd = 'Get-CimInstance Win32_NetworkAdapter | fl *' + '; echo \'#-#-#-#\';';
|
|
251
|
+
cmd += 'Get-CimInstance Win32_NetworkAdapterConfiguration | fl DHCPEnabled' + '';
|
|
252
252
|
try {
|
|
253
253
|
util.powerShell(cmd).then((data) => {
|
|
254
254
|
data = data.split('#-#-#-#');
|
|
@@ -328,7 +328,6 @@ function getWindowsIfaceDNSsuffix(ifaces, ifacename) {
|
|
|
328
328
|
if (!dnsSuffix) { dnsSuffix = ''; }
|
|
329
329
|
return dnsSuffix;
|
|
330
330
|
} catch (error) {
|
|
331
|
-
// console.log('Error getting Connection-specific DNS suffix: ', error.message);
|
|
332
331
|
return 'Unknown';
|
|
333
332
|
}
|
|
334
333
|
}
|
|
@@ -501,7 +500,6 @@ function parseLinesDarwinNics(sections) {
|
|
|
501
500
|
function getDarwinNics() {
|
|
502
501
|
const cmd = '/sbin/ifconfig -v';
|
|
503
502
|
try {
|
|
504
|
-
// console.log('SYNC - Nics darwin 12');
|
|
505
503
|
const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n');
|
|
506
504
|
const nsections = splitSectionsNics(lines);
|
|
507
505
|
return (parseLinesDarwinNics(nsections));
|
|
@@ -620,7 +618,6 @@ function getDarwinIfaceDHCPstatus(iface) {
|
|
|
620
618
|
let result = false;
|
|
621
619
|
const cmd = `ipconfig getpacket "${iface}" 2>/dev/null | grep lease_time;`;
|
|
622
620
|
try {
|
|
623
|
-
// console.log('SYNC - DHCP status darwin 17');
|
|
624
621
|
const lines = execSync(cmd).toString().split('\n');
|
|
625
622
|
if (lines.length && lines[0].startsWith('lease_time')) {
|
|
626
623
|
result = true;
|
|
@@ -1317,7 +1314,7 @@ function networkStatsSingle(iface) {
|
|
|
1317
1314
|
let ifaceName = ifaceSanitized;
|
|
1318
1315
|
|
|
1319
1316
|
// Performance Data
|
|
1320
|
-
util.powerShell('Get-
|
|
1317
|
+
util.powerShell('Get-CimInstance Win32_PerfRawData_Tcpip_NetworkInterface | select Name,BytesReceivedPersec,PacketsReceivedErrors,PacketsReceivedDiscarded,BytesSentPersec,PacketsOutboundErrors,PacketsOutboundDiscarded | fl').then((stdout, error) => {
|
|
1321
1318
|
if (!error) {
|
|
1322
1319
|
const psections = stdout.toString().split(/\n\s*\n/);
|
|
1323
1320
|
perfData = parseLinesWindowsPerfData(psections);
|
|
@@ -1484,7 +1481,9 @@ function networkConnections(callback) {
|
|
|
1484
1481
|
});
|
|
1485
1482
|
}
|
|
1486
1483
|
if (_darwin) {
|
|
1487
|
-
let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"';
|
|
1484
|
+
// let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"';
|
|
1485
|
+
let cmd = 'netstat -natv | grep "tcp4\\|tcp6\\|udp4\\|udp6"';
|
|
1486
|
+
const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN';
|
|
1488
1487
|
exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) {
|
|
1489
1488
|
if (!error) {
|
|
1490
1489
|
|
|
@@ -1509,8 +1508,9 @@ function networkConnections(callback) {
|
|
|
1509
1508
|
peeraddress.pop();
|
|
1510
1509
|
peerip = peeraddress.join('.');
|
|
1511
1510
|
}
|
|
1512
|
-
|
|
1513
|
-
let
|
|
1511
|
+
const hasState = states.indexOf(line[5]) >= 0;
|
|
1512
|
+
let connstate = hasState ? line[5] : 'UNKNOWN';
|
|
1513
|
+
let pid = parseInt(line[8 + (hasState ? 0 : -1)], 10);
|
|
1514
1514
|
if (connstate) {
|
|
1515
1515
|
result.push({
|
|
1516
1516
|
protocol: line[0],
|
package/lib/osinfo.js
CHANGED
|
@@ -326,7 +326,7 @@ function osInfo(callback) {
|
|
|
326
326
|
result.release = result.kernel;
|
|
327
327
|
try {
|
|
328
328
|
const workload = [];
|
|
329
|
-
workload.push(util.powerShell('Get-
|
|
329
|
+
workload.push(util.powerShell('Get-CimInstance Win32_OperatingSystem | select Caption,SerialNumber,BuildNumber,ServicePackMajorVersion,ServicePackMinorVersion | fl'));
|
|
330
330
|
workload.push(util.powerShell('(Get-CimInstance Win32_ComputerSystem).HypervisorPresent'));
|
|
331
331
|
workload.push(util.powerShell('Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SystemInformation]::TerminalServerSession'));
|
|
332
332
|
util.promiseAll(
|
|
@@ -734,7 +734,7 @@ function versions(apps, callback) {
|
|
|
734
734
|
});
|
|
735
735
|
} else {
|
|
736
736
|
if (_windows) {
|
|
737
|
-
util.powerShell('Get-
|
|
737
|
+
util.powerShell('Get-CimInstance Win32_Service | select caption | fl').then((stdout) => {
|
|
738
738
|
let serviceSections = stdout.split(/\n\s*\n/);
|
|
739
739
|
serviceSections.forEach((item) => {
|
|
740
740
|
if (item.trim() !== '') {
|
|
@@ -1132,7 +1132,7 @@ 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
|
-
util.powerShell('Get-
|
|
1135
|
+
util.powerShell('Get-CimInstance Win32_ComputerSystemProduct | select UUID | fl').then((stdout) => {
|
|
1136
1136
|
let lines = stdout.split('\r\n');
|
|
1137
1137
|
result.hardware = util.getValue(lines, 'uuid', ':').toLowerCase();
|
|
1138
1138
|
exec(`${sysdir}\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid`, util.execOptsWin, function (error, stdout) {
|
package/lib/printer.js
CHANGED
|
@@ -184,7 +184,7 @@ function printer(callback) {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
if (_windows) {
|
|
187
|
-
util.powerShell('Get-
|
|
187
|
+
util.powerShell('Get-CimInstance Win32_Printer | select PrinterStatus,Name,DriverName,Local,Default,Shared | fl').then((stdout, error) => {
|
|
188
188
|
if (!error) {
|
|
189
189
|
const parts = stdout.toString().split(/\n\s*\n/);
|
|
190
190
|
for (let i = 0; i < parts.length; i++) {
|
package/lib/processes.js
CHANGED
|
@@ -335,7 +335,7 @@ function services(srv, callback) {
|
|
|
335
335
|
}
|
|
336
336
|
if (_windows) {
|
|
337
337
|
try {
|
|
338
|
-
let wincommand = 'Get-
|
|
338
|
+
let wincommand = 'Get-CimInstance Win32_Service';
|
|
339
339
|
if (srvs[0] !== '*') {
|
|
340
340
|
wincommand += ' -Filter "';
|
|
341
341
|
srvs.forEach((srv) => {
|
|
@@ -823,7 +823,7 @@ function processes(callback) {
|
|
|
823
823
|
});
|
|
824
824
|
} else if (_windows) {
|
|
825
825
|
try {
|
|
826
|
-
util.powerShell('Get-
|
|
826
|
+
util.powerShell('Get-CimInstance Win32_Process | select ProcessId,ParentProcessId,ExecutionState,Caption,CommandLine,ExecutablePath,UserModeTime,KernelModeTime,WorkingSetSize,Priority,PageFileUsage,CreationDate | fl').then((stdout, error) => {
|
|
827
827
|
if (!error) {
|
|
828
828
|
let processSections = stdout.split(/\n\s*\n/);
|
|
829
829
|
let procs = [];
|
|
@@ -1003,7 +1003,7 @@ function processLoad(proc, callback) {
|
|
|
1003
1003
|
if (procSanitized && processes.length && processes[0] !== '------') {
|
|
1004
1004
|
if (_windows) {
|
|
1005
1005
|
try {
|
|
1006
|
-
util.powerShell('Get-
|
|
1006
|
+
util.powerShell('Get-CimInstance Win32_Process | select ProcessId,Caption,UserModeTime,KernelModeTime,WorkingSetSize | fl').then((stdout, error) => {
|
|
1007
1007
|
if (!error) {
|
|
1008
1008
|
let processSections = stdout.split(/\n\s*\n/);
|
|
1009
1009
|
let procStats = [];
|
package/lib/system.js
CHANGED
|
@@ -343,7 +343,7 @@ function system(callback) {
|
|
|
343
343
|
}
|
|
344
344
|
if (_windows) {
|
|
345
345
|
try {
|
|
346
|
-
util.powerShell('Get-
|
|
346
|
+
util.powerShell('Get-CimInstance Win32_ComputerSystemProduct | select Name,Vendor,Version,IdentifyingNumber,UUID | fl').then((stdout, error) => {
|
|
347
347
|
if (!error) {
|
|
348
348
|
// let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0)[0].trim().split(/\s\s+/);
|
|
349
349
|
let lines = stdout.split('\r\n');
|
|
@@ -369,13 +369,13 @@ function system(callback) {
|
|
|
369
369
|
if (manufacturer.startsWith('xen')) { result.virtualHost = 'Xen'; }
|
|
370
370
|
if (manufacturer.startsWith('qemu')) { result.virtualHost = 'KVM'; }
|
|
371
371
|
}
|
|
372
|
-
util.powerShell('Get-
|
|
372
|
+
util.powerShell('Get-CimInstance MS_Systeminformation -Namespace "root/wmi" | select systemsku | fl ').then((stdout, error) => {
|
|
373
373
|
if (!error) {
|
|
374
374
|
let lines = stdout.split('\r\n');
|
|
375
375
|
result.sku = util.getValue(lines, 'systemsku', ':');
|
|
376
376
|
}
|
|
377
377
|
if (!result.virtual) {
|
|
378
|
-
util.powerShell('Get-
|
|
378
|
+
util.powerShell('Get-CimInstance Win32_bios | select Version, SerialNumber, SMBIOSBIOSVersion').then((stdout, error) => {
|
|
379
379
|
if (!error) {
|
|
380
380
|
let lines = stdout.toString();
|
|
381
381
|
if (lines.indexOf('VRTUAL') >= 0 || lines.indexOf('A M I ') >= 0 || lines.indexOf('VirtualBox') >= 0 || lines.indexOf('VMWare') >= 0 || lines.indexOf('Xen') >= 0) {
|
|
@@ -506,7 +506,7 @@ function bios(callback) {
|
|
|
506
506
|
}
|
|
507
507
|
if (_windows) {
|
|
508
508
|
try {
|
|
509
|
-
util.powerShell('Get-
|
|
509
|
+
util.powerShell('Get-CimInstance Win32_bios | select Description,Version,Manufacturer,ReleaseDate,BuildNumber,SerialNumber | fl').then((stdout, error) => {
|
|
510
510
|
if (!error) {
|
|
511
511
|
let lines = stdout.toString().split('\r\n');
|
|
512
512
|
const description = util.getValue(lines, 'description', ':');
|
|
@@ -664,8 +664,8 @@ function baseboard(callback) {
|
|
|
664
664
|
const workload = [];
|
|
665
665
|
const win10plus = parseInt(os.release()) >= 10;
|
|
666
666
|
const maxCapacityAttribute = win10plus ? 'MaxCapacityEx' : 'MaxCapacity';
|
|
667
|
-
workload.push(util.powerShell('Get-
|
|
668
|
-
workload.push(util.powerShell(`Get-
|
|
667
|
+
workload.push(util.powerShell('Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl'));
|
|
668
|
+
workload.push(util.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
|
|
669
669
|
util.promiseAll(
|
|
670
670
|
workload
|
|
671
671
|
).then((data) => {
|
|
@@ -797,7 +797,7 @@ function chassis(callback) {
|
|
|
797
797
|
}
|
|
798
798
|
if (_windows) {
|
|
799
799
|
try {
|
|
800
|
-
util.powerShell('Get-
|
|
800
|
+
util.powerShell('Get-CimInstance Win32_SystemEnclosure | select Model,Manufacturer,ChassisTypes,Version,SerialNumber,PartNumber,SKU | fl').then((stdout, error) => {
|
|
801
801
|
if (!error) {
|
|
802
802
|
let lines = stdout.toString().split('\r\n');
|
|
803
803
|
|
package/lib/usb.js
CHANGED
|
@@ -231,7 +231,7 @@ function usb(callback) {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
if (_windows) {
|
|
234
|
-
util.powerShell('Get-
|
|
234
|
+
util.powerShell('Get-CimInstance CIM_LogicalDevice | where { $_.Description -match "USB"} | select Name,CreationClassName,DeviceId,Manufacturer | fl').then((stdout, error) => {
|
|
235
235
|
if (!error) {
|
|
236
236
|
const parts = stdout.toString().split(/\n\s*\n/);
|
|
237
237
|
for (let i = 0; i < parts.length; i++) {
|
package/lib/users.js
CHANGED
|
@@ -207,9 +207,9 @@ function users(callback) {
|
|
|
207
207
|
}
|
|
208
208
|
if (_windows) {
|
|
209
209
|
try {
|
|
210
|
-
let cmd = 'Get-
|
|
211
|
-
cmd += 'Get-
|
|
212
|
-
cmd += 'Get-
|
|
210
|
+
let cmd = 'Get-CimInstance Win32_LogonSession | select LogonId,StartTime | fl' + '; echo \'#-#-#-#\';';
|
|
211
|
+
cmd += 'Get-CimInstance Win32_LoggedOnUser | select antecedent,dependent | fl ' + '; echo \'#-#-#-#\';';
|
|
212
|
+
cmd += 'Get-CimInstance Win32_Process -Filter "name=\'explorer.exe\'" | Select @{Name="sessionid";Expression={$_.SessionId}}, @{Name="domain";Expression={$_.GetOwner().Domain}}, @{Name="username";Expression={$_.GetOwner().User}} | fl' + '; echo \'#-#-#-#\';';
|
|
213
213
|
cmd += 'query user';
|
|
214
214
|
util.powerShell(cmd).then((data) => {
|
|
215
215
|
if (data) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.15",
|
|
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)",
|