annotate _test/wmi.pl @ 57:bf59ee1cd506

Web application main class functionality
author wizard
date Fri, 05 Mar 2010 13:59:29 +0300
parents 16ada169ca75
children 0f3e369553bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
1 #!/usr/bin/perl -w
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
3
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
4 use Win32::OLE;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
5
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
6 my $wmi = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
7
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
8 my $colServices = $wmi->ExecQuery("select * from Win32_NetworkAdapterSetting");
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
9
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
10 print $_->Element,"\t",$_->Setting,"\n" foreach in $colServices;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
11
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
12