4

I need to be able to inventory the information about the fonts currently installed in our machines (around 200,000). It seems some users installed fonts they were not supposed to (due to licensing restrictions and so on) and now the company is facing legal problems.

Problem is: I know how to deploy packages through SCCM, but I have no familiarity whatsoever with inventorying and development. I went online looking for a solution and got something like this:

For Each objFont in colItems
    Set m = objFolder.ParseName(objFont.Name)
    foundry = objFolder.GetDetailsOf(m, 5)
    'msgbox fabricante
    objFile.WriteLine (objFont.Path & vbtab & objFont.Name & vbtab & foundry)
Next

This script works fine, For my machine. But to be able to gather that info from all the machines, I was told I'd have to turn that into a WMI class, that the inventory would then call and receive/treat the output. Is that possible?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Henrique
  • 41
  • 3

2 Answers2

4

I've done something similar, but with Altiris rather than SCCM. (I imagine you could also run it through Group Policy.) Not using WMI, but just scripting. What I would have done:

  1. Create a network share. Give the user who'll be running the script (System Center Management service user, whatever) write access to the share.
  2. Modify the script so that the file written to is the computer name (strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ))
  3. Use Log Parser to spit the data into something more readable (SQL?)

On the other hand, it looks like you can do custom software reporting for SCCM by file type, so it might be easier to just have it collect files with the extension .fon and .ttf in the %windir%\fonts directory. This is basically what someone suggested on TechNet.

Good luck!

Katherine Villyard
  • 18,550
  • 4
  • 37
  • 59
  • Thank you very much, Katherine! I have already implemented your steps 1 and 2, and we right now are trying to come up with a vbs (and not WMI/PS, we are not a dev team :( ) that would be distributed to the machines and, once there, would create the report and save it into that share. At the end, we'd have around 200,000 reports, that would have to be united into one gigantic xls (?) file through yet another vbs. Hopefully that'll work. Your inputs would be greatly appreciated! – Henrique Feb 02 '15 at 17:51
3

You can use the Win32_FontInfoAction class to retrieve information on installed fonts that have been registered at the same time that the associated software element was installed. I highlighted that definition b/c the class is blank on my machine, presumably b/c I have not installed any fonts. However, I'll answer this question as it might work for you:

I would run a report to determine which fonts are installed by querying that class on each computer. If you decide to just run a query, as opposed to a report, you can easily turn that query into a new collection with some copy pasta and a few changes, like what particular fonts are out of license, once you see how they appear in the wmi repo.

https://msdn.microsoft.com/en-us/library/aa394150(v=vs.85).aspx

MDMoore313
  • 5,581
  • 6
  • 36
  • 75
  • Thanks, BigHomie! I tried using Win32_FontInfoAction since the first time, but this class won't retrieve exactly the information I need the most, the Foundry value, which contains the manufacturer of the font. We plan on filtering the reports using this so we can focus on the critical ones. I have the code here but unfortunately I couldn't use it to that end. Do you know any other way to retrieve that info? Thanks again! – Henrique Feb 02 '15 at 17:42
  • Sorry, I've got nothing outside of maybe doing a software inventory on .ttf files and filter on the ones that are in the font folder, I think that might have already been suggested though? – MDMoore313 Feb 02 '15 at 17:46