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")
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
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.
What happens if you do:
$objFolderItem = $objFolder.Self $objFolderItem.InvokeVerb("Install")
Should I add those to my script or execute on their own? If I execute on their own nothing seems to happen. No fonts are installed in the font folder.
ok, I added those lines to the end of my script.....the fonts are copied over, but not available to any apps.
The install progress bar doesn't appear the way it does when you run the vb version of the install command.
Found this article on msdn. At the bottom in the comments section, there is a powershell script.
You must be logged in to reply to this topic.