you need administrative rights to fetch thisDo you? Win32::SystemInfo works with user privileges. And the module is reading from the Registry too. Addendum: It is using a combination of Win32::TieRegistry and the GetSystemInfo function from Win32::API. Here's the relevant function.
Yields on my system, running as normal user:use Win32::SystemInfo; use Data::Dumper; my %phash; Win32::SystemInfo::ProcessorInfo(%phash); print Dumper (\%phash);
$VAR1 = { 'Processor3' => { 'Identifier' => 'Intel64 Family 6 Model 60 + Stepping 3', 'ProcessorName' => 'Intel(R) Core(TM) i5-4 +440 CPU @ 3.10GHz', 'VendorIdentifier' => 'GenuineIntel', 'MHZ' => 3093 }, 'NumProcessors' => 4, 'Processor2' => { 'MHZ' => 3093, 'VendorIdentifier' => 'GenuineIntel', 'Identifier' => 'Intel64 Family 6 Model 60 + Stepping 3', 'ProcessorName' => 'Intel(R) Core(TM) i5-4 +440 CPU @ 3.10GHz' }, 'Processor0' => { 'MHZ' => 3093, 'VendorIdentifier' => 'GenuineIntel', 'ProcessorName' => 'Intel(R) Core(TM) i5-4 +440 CPU @ 3.10GHz', 'Identifier' => 'Intel64 Family 6 Model 60 + Stepping 3' }, 'Processor1' => { 'ProcessorName' => 'Intel(R) Core(TM) i5-4 +440 CPU @ 3.10GHz', 'Identifier' => 'Intel64 Family 6 Model 60 + Stepping 3', 'VendorIdentifier' => 'GenuineIntel', 'MHZ' => 3093 } };
In reply to Re^2: Need help with Win32::TieRegistry
by holli
in thread Need help with Win32::TieRegistry
by CrashBlossom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |