Mercurial > pub > Impl
annotate _test/wmi.pl @ 259:b92f19630d33
Merge with 91bae9f41a9cf2d52f5cff5a5c3e7c8683c7d47e
| author | sergey |
|---|---|
| date | Fri, 21 Dec 2012 00:09:11 +0400 |
| parents | 0f3e369553bd |
| children |
| rev | line source |
|---|---|
| 49 | 1 #!/usr/bin/perl -w |
| 2 use strict; | |
| 3 | |
|
59
0f3e369553bd
Rewritten property implementation (probably become slower but more flexible)
wizard
parents:
49
diff
changeset
|
4 |
|
0f3e369553bd
Rewritten property implementation (probably become slower but more flexible)
wizard
parents:
49
diff
changeset
|
5 eval "use Win32::OLE; 1;" if $^ =~ /win/; |
| 49 | 6 |
| 7 my $wmi = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2"); | |
| 8 | |
| 9 my $colServices = $wmi->ExecQuery("select * from Win32_NetworkAdapterSetting"); | |
| 10 | |
| 11 print $_->Element,"\t",$_->Setting,"\n" foreach in $colServices; | |
| 12 | |
| 13 |
