Windows – Using SCCM and WMI to retrieve Font information

sccmwindowswmi

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?

Best Answer

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!