This article showed me how to install fonts from a script, but now I'm faced with the problem of removing them. How can I do that ? Any language is ok, I'll convert the info to what I need later.
EDIT: Okay, so I now know how to uninstall fonts ( most of the part at least ). I'm issuing calls to RemoveFontResource
. After that I use SendMessage
with parameters: 0xffff,0x001D,0,0
( HWND_BROACAST,WM_FONTCHANGE ... and I forgot what the other two parameters stand for ). The thing is, this deletes the font, but in the Control Panel
's Fonts
entry, the font still appears there ( even though if you try to delete it from there as well, it will say it cannot read from source file or disk.
So basically, I'm deleting a font in this order:
- deleting physically from the
C:\Windows\Fonts
- calling RemoveFontResource
- calling SendMessage
What's the proper way of uninstalling?