https://www.mikesel.info/install-fonts-from-a-vbscript/

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"


  • Ahmed

    how to uninstall the font also using vbs ?

    • http://www.mikesel.info/ 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.

      Thanks
      Mike

  • Ahmed

    how to uninstall the font also using vbs ?

    • http://www.mikesel.info/ 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.

      Thanks
      Mike


Page 1 of 11

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!

Categories

* = required field

powered by MailChimp!