Simply copying fonts into the fonts folder using a VB script doesn’t actually install them.

To install the fonts you have to use the following code:

Const FONTS = &H14&  Set objShell = CreateObject("Shell.Application")  Set objFolder = objShell.Namespace(FONTS)  objFolder.CopyHere "C:ScriptsMyfont.ttf"
Tagged with:  
  • Ahmed

    how to uninstall the font also using vbs ?

    • Mike Hudson

      Hello Ahmed

      Deleting the file but be the ‘reverse’ of the above code

      Set objFSO = CreateObject(“Scripting.FileSystemObject”)objFSO.DeleteFile(“C:WindowsFontsArial.ttf”)

      You would need to replace the file path with that of the font you wish to delete.


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!