Install Fonts to Workstations

From Wiki

Jump to:navigation, search

Creator: Guest

Script Language: VBS

Forum topic Link:

Create a Folder to house all your additional fonts on a network share e.g. \\%SERVERNAME%\%SHARE%\FONTS

Copy the new font to that share e.g. Twiggy-Bold.ttf

Install the new font onto a workstation.

Using regedit browse to the following Key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

Make a note of the new fonts registry information.

Add this new information to the VB script

Create a new GPO and add the script to run at computer start up

Assign to computers

The font will be available after a restart of the PC with no need for an admin logon.

To update the script quickly I just created a shortcut to the policy folder and then just copy the updated VB script when I have added new fonts.

And here's the code

<vb>' ****************************************************************************

' Copy Fonts From Network Share To C:\WINDOWS\FONTS Folder Of Workstation

' ****************************************************************************

Set WshShell = CreateObject("WScript.Shell")

WshShell.Run "xcopy.exe ""\\%SERVERNAME%\%SHARE \FONTS"" ""C:\windows\fonts"" /C /I /S /E /H /Y /Q", 1,True

' ****************************************************************************

' Imports The Registry Information For The New Fonts - Add A New Line For Each New Font

' Example : WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\%FONT REG KEY%", "%FONT REG KEY ENTRY%", "REG_SZ"

' ****************************************************************************

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\Twiggy-Bold (TrueType)", "Twiggy-Bold.ttf", "REG_SZ"

WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\Twiggy-Light (TrueType)", "Twiggy-Light.ttf", "REG_SZ" </vb>