| 4.33.6 |
2021-01-02 |
diff --git a/docs/index.html b/docs/index.html
index f96886b..56ebbd9 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -169,7 +169,7 @@
systeminformation
- Current Version: 4.33.6
+ Current Version: 4.33.7
diff --git a/lib/battery.js b/lib/battery.js
index 48a7248..d211924 100644
--- a/lib/battery.js
+++ b/lib/battery.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/cli.js b/lib/cli.js
index 30bdd5b..1e92ce4 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -5,6 +5,11 @@
// ==================================================================================
// cli.js
// ----------------------------------------------------------------------------------
+// Description: System Information - library
+// for Node.js
+// Copyright: (c) 2014 - 2021
+// Author: Sebastian Hildebrandt
+// ----------------------------------------------------------------------------------
// License: MIT
// ==================================================================================
diff --git a/lib/cpu.js b/lib/cpu.js
index 2e23e35..345d1ae 100644
--- a/lib/cpu.js
+++ b/lib/cpu.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/docker.js b/lib/docker.js
index 5f1f045..6251d87 100644
--- a/lib/docker.js
+++ b/lib/docker.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/dockerSocket.js b/lib/dockerSocket.js
index 704050a..86c68d4 100644
--- a/lib/dockerSocket.js
+++ b/lib/dockerSocket.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/filesystem.js b/lib/filesystem.js
index edcc0e0..8e1cbdf 100755
--- a/lib/filesystem.js
+++ b/lib/filesystem.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/graphics.js b/lib/graphics.js
index 46a9235..8363268 100644
--- a/lib/graphics.js
+++ b/lib/graphics.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
@@ -378,11 +378,15 @@ function graphics(callback) {
if (_windows) {
try {
const basePath = util.WINDIR + '\\System32\\DriverStore\\FileRepository';
- const dirContent = fs.readdirSync(basePath);
- const candidateDirs = dirContent.filter(dir => dir.startsWith('nv'));
- const targetDir = candidateDirs.find(dir => {
- const content = fs.readdirSync([basePath, dir].join('/'));
- return content.includes('nvidia-smi.exe');
+ // find all directories that have an nvidia-smi.exe file
+ const candidateDirs = fs.readdirSync(basePath).filter(dir => {
+ return fs.readdirSync([basePath, dir].join('/')).includes('nvidia-smi.exe');
+ });
+ // use the directory with the most recently created nvidia-smi.exe file
+ const targetDir = candidateDirs.reduce((prevDir, currentDir) => {
+ const previousNvidiaSmi = fs.statSync([basePath, prevDir, 'nvidia-smi.exe'].join('/'));
+ const currentNvidiaSmi = fs.statSync([basePath, currentDir, 'nvidia-smi.exe'].join('/'));
+ return (previousNvidiaSmi.ctimeMs > currentNvidiaSmi.ctimeMs) ? prevDir : currentDir;
});
if (targetDir) {
diff --git a/lib/index.js b/lib/index.js
index 3c77372..8f22129 100755
--- a/lib/index.js
+++ b/lib/index.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// Contributors: Guillaume Legrain (https://github.com/glegrain)
diff --git a/lib/internet.js b/lib/internet.js
index 30c2e12..1360204 100644
--- a/lib/internet.js
+++ b/lib/internet.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/memory.js b/lib/memory.js
index ac662b0..5afe5fa 100644
--- a/lib/memory.js
+++ b/lib/memory.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/network.js b/lib/network.js
index 3d3ed96..85f1fcc 100644
--- a/lib/network.js
+++ b/lib/network.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/osinfo.js b/lib/osinfo.js
index c1ffdd2..e90a769 100644
--- a/lib/osinfo.js
+++ b/lib/osinfo.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/processes.js b/lib/processes.js
index b558990..857905f 100644
--- a/lib/processes.js
+++ b/lib/processes.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/system.js b/lib/system.js
index db66f16..19bda21 100644
--- a/lib/system.js
+++ b/lib/system.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/users.js b/lib/users.js
index a1589a4..32cced8 100644
--- a/lib/users.js
+++ b/lib/users.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/util.js b/lib/util.js
index 3a9b51f..5a2e772 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/virtualbox.js b/lib/virtualbox.js
index 958ef6b..3138c8d 100644
--- a/lib/virtualbox.js
+++ b/lib/virtualbox.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT
diff --git a/lib/wifi.js b/lib/wifi.js
index c5ec608..997ab46 100644
--- a/lib/wifi.js
+++ b/lib/wifi.js
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------------
// Description: System Information - library
// for Node.js
-// Copyright: (c) 2014 - 2020
+// Copyright: (c) 2014 - 2021
// Author: Sebastian Hildebrandt
// ----------------------------------------------------------------------------------
// License: MIT