line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Win32::Environment; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
67364754
|
use strict; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
92
|
|
4
|
1
|
|
|
1
|
|
18
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
128
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1078
|
use FusionInventory::Agent::Tools::Win32; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
244
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub isEnabled { |
9
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
return !$params{no_category}->{environment}; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub doInventory { |
15
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
foreach my $object (getWMIObjects( |
20
|
|
|
|
|
|
|
class => 'Win32_Environment', |
21
|
|
|
|
|
|
|
properties => [ qw/SystemVariable Name VariableValue/ ] |
22
|
|
|
|
|
|
|
)) { |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
next unless $object->{SystemVariable}; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$inventory->addEntry( |
27
|
|
|
|
|
|
|
section => 'ENVS', |
28
|
|
|
|
|
|
|
entry => { |
29
|
|
|
|
|
|
|
KEY => $object->{Name}, |
30
|
|
|
|
|
|
|
VAL => $object->{VariableValue} |
31
|
|
|
|
|
|
|
} |
32
|
0
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |