Skip to content

Commit

Permalink
Update RMS.pm
Browse files Browse the repository at this point in the history
#499 It works in this combination. Please check the code for correctness. The registry path is the same on both Win32 and Win64
  • Loading branch information
yes1n committed Sep 26, 2023
1 parent fea8bfb commit b1843f0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/GLPI/Agent/Task/Inventory/Generic/Remote_Mgmt/RMS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ sub doInventory {
my $inventory = $params{inventory};
my $logger = $params{logger};

my $InternetID = OSNAME eq 'MSWin32' ? _getID_MSWin32(logger => $logger) : _getID(logger => $logger);
);
my $InternetID = _getID(logger => $logger);

if (defined($InternetID)) {
$logger->debug('Found InternetID : ' . $InternetID) if ($logger);

Expand All @@ -54,19 +54,14 @@ sub doInventory {
}

sub _getID {
# my (%params) = @_;
}

sub _getID_MSWin32 {

GLPI::Agent::Tools::Win32->use();
GLPI::Agent::XML->use();

my $internetid = getRegistryValue(
path => 'HKEY_LOCAL_MACHINE/SOFTWARE/Usoris/Remote Utilities Host/Host/Parameters/InternetId',
);

$internetid = hex2dec($clientid);
$internetid = hex2dec($internetid);

my $tree = GLPI::Agent::XML->new(string => $internetid)->dump_as_hash();

Expand Down

0 comments on commit b1843f0

Please sign in to comment.