mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
move windows_volumes and bitlocker to win-volumes
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
b0d8e3fe48
commit
624d61db43
3 changed files with 86 additions and 95 deletions
|
@ -1936,9 +1936,9 @@ function getSystemInformation(func) {
|
|||
if (process.platform == 'win32')
|
||||
{
|
||||
results.pendingReboot = require('win-info').pendingReboot(); // Pending reboot
|
||||
if (require('computer-identifiers').volumes_promise != null)
|
||||
if (require('win-volumes').volumes_promise != null)
|
||||
{
|
||||
var p = require('computer-identifiers').volumes_promise();
|
||||
var p = require('win-volumes').volumes_promise();
|
||||
p.then(function (res)
|
||||
{
|
||||
results.hardware.windows.volumes = cleanGetBitLockerVolumeInfo(res);
|
||||
|
@ -1946,12 +1946,6 @@ function getSystemInformation(func) {
|
|||
func(results);
|
||||
});
|
||||
}
|
||||
else if (require('computer-identifiers').volumes != null)
|
||||
{
|
||||
results.hardware.windows.volumes = cleanGetBitLockerVolumeInfo(require('computer-identifiers').volumes());
|
||||
results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
|
||||
func(results);
|
||||
}
|
||||
else
|
||||
{
|
||||
results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
|
||||
|
@ -4044,11 +4038,9 @@ function processConsoleCommand(cmd, args, rights, sessionid) {
|
|||
break;
|
||||
case 'bitlocker':
|
||||
if (process.platform == 'win32') {
|
||||
if (require('computer-identifiers').volumes_promise != null) {
|
||||
var p = require('computer-identifiers').volumes_promise();
|
||||
if (require('win-volumes').volumes_promise != null) {
|
||||
var p = require('win-volumes').volumes_promise();
|
||||
p.then(function (res) { sendConsoleText(JSON.stringify(cleanGetBitLockerVolumeInfo(res), null, 1), this.session); });
|
||||
} else if (require('computer-identifiers').volumes != null) {
|
||||
sendConsoleText(JSON.stringify(cleanGetBitLockerVolumeInfo(require('computer-identifiers').volumes()), null, 1), this.session);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue