I’m tring to write a script that’ll install a folder of fonts acrross our domain, I’ll push it out using group policy.
I understand that it’s not enough to just copy the fonts to C:\windows\fonts these days and that you need to use the shell.application to register the fonts. Howver if I run :
Set objShell = CreateObject(“Shell.Application”)
Set objFolder = objShell.Namespace(“C:\fonts”)
Set objFolderItem = objFolder.ParseName(“sbd_____.pfm”)
Nothing happens, with either otf,ttf or .pfm fonts. The fonts are copied to the fonts folder but don’t show up in apps or in the registry.
The fonts only install if I add : objFolderItem.InvokeVerb(“Install”)
Is this line literally doign the same thing as i do if I manually install the font when right clicking the file?
My powershell script looks like :
$FONTS = 0x14
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.Namespace($FONTS)
Again, this only copies the fonts, they don’t show up in apps of the registry. Is there an equivalent in powershell for objFolderItem.InvokeVerb(“Install”)?
I managed to find that the font folders have a verb named &install which is the install option from the fonts contextual menu. There must be a way to run that? Invoke-Item?
Thanks fro any help.