VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Extract the list of installed TTF fonts using Win32_FontInfoAction WMI class

by Karthikeyan (187 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Unknown Difficulty
Originally Published: Tue 11th May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Extract the list of installed TTF fonts using Win32_FontInfoAction WMI class

Rate Extract the list of installed TTF fonts using Win32_FontInfoAction WMI class



On Error Resume Next
Computer = "."
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_FontInfoAction")
Set OutFile = CreateObject("WScript.Shell")
Const ForAppending = 2
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set TextFile = FileSystem.OpenTextFile ("c:\Fonts.txt", ForAppending, True)
TextFile.WriteLine "Fonts Details as follows......"
TextFile.WriteLine
TextFile.WriteLine "***********************************************************************"
For Each Font in Items
TextFile.WriteLine Font.File
Next
TextFile.WriteLine "***********************************************************************"
TextFile.Close
OutFile.Run "notepad.exe c:\Fonts.txt",1,True

Download this snippet    Add to My Saved Code

Extract the list of installed TTF fonts using Win32_FontInfoAction WMI class Comments

No comments have been posted about Extract the list of installed TTF fonts using Win32_FontInfoAction WMI class. Why not be the first to post a comment about Extract the list of installed TTF fonts using Win32_FontInfoAction WMI class.

Post your comment

Subject:
Message:
0/1000 characters