in reply to Enumerate Win32 Fonts
also,there are other properties of Win32_FontInfoAction class that can be queried eg description,file,version. You can use constants wbemFlagReturnImmediately and wbemFlagForwardOnly opting for faster execution. Creating Faster Queries by Using a Forward-only Eumeratoruse strict; use Win32::OLE('in'); my $computer = "my_pc"; #your computer name as it appears in the cont +rol panel's system menu my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\roo +t\\CIMV2") or die "WMI connection failed.\n"; my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_FontInfo +Action", "WQL"); foreach my $objItem (in $colItems) { print "Caption: $objItem->{Caption}\n"; print "FontTitle: $objItem->{FontTitle}\n"; print "File: $objItem->{File}\n"; print "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Enumerate Win32 Fonts
by slloyd (Hermit) on Jan 22, 2008 at 15:57 UTC | |
by nikosv (Deacon) on Jan 22, 2008 at 20:55 UTC |