rss logo

How to Deploy Fonts in Windows Using GPO (Group Policy Objects)

Microsoft logo

I needed to deploy a font across multiple computers in a Microsoft Windows Active Directory environment. Surprisingly, Windows doesn't offer a native way to distribute fonts using Group Policy Objects (GPO). To work around this limitation, I created a batch script that runs at startup via Group Policy, ensuring the font is installed automatically when users log on.

Font file

First, obtain the font file you want to deploy. In this example, we'll use the "STD-Regular (OpenType)" font as a reference.

Icon of the STD-Regular.otf font file on a Windows desktop

The objective is to copy the font file to the "C:\Windows\Fonts" directory on each target machine that requires the font.

Batch Script

Key Commands Explained

  • Check the Windows Registry to determine whether the STD-Regular (OpenType) font is already installed:
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" | findstr "STD-Regular (OpenType)"
  • Copy the font file from the SYSVOL folder in Active Directory to the C:\Windows\Fonts directory:
copy \\std.local\SYSVOL\std.local\scripts\STD-Regular.otf C:\Windows\Fonts\
  • Add an entry for the font in the Windows Registry so the system recognizes it:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "STD-Regular (OpenType)" /t REG_SZ /d STD-Regular.otf /f

Complete batch script

  • Save the following script in the C:\Windows\SYSVOL\sysvol\yourdomain.local\scripts\ directory on your Active Directory server:
@echo off

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" | findstr "STD-Regular (OpenType)"

IF %ERRORLEVEL% == 0 goto END

copy \\std.local\SYSVOL\std.local\scripts\STD-Regular.otf C:\Windows\Fonts\

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "STD-Regular (OpenType)" /t REG_SZ /d STD-Regular.otf /f

:END
  • On your Active Directory server, save both the batch script and the STD-Regular.otf font file in the C:\Windows\SYSVOL\sysvol\std.local\scripts\ directory:
Windows File Explorer showing font.bat and STD-Regular.otf files in the SYSVOL scripts folder

Create a Group Policy Object

To automate the font installation process, we’ll create a Group Policy Object (GPO) that executes the batch script when domain computers start up.

  • Open the Active Directory Users and Computers console:
Run Active Directory Users and Computers
  • Move the computers where the font should be installed into the Workstations Organizational Unit (OU):
Run Active Directory Users and Computers
  • Open the Group Policy Management console:
Run Group Policy Management Console
  • Create a new Group Policy Object (GPO):
Create a GPO
  • Assign a descriptive name to the new GPO (e.g., "Deploy - font"):
New GPO creation window with 'Deploy - font' entered as the name and OK button highlighted
  • Edit the newly created Group Policy Object (GPO):
Context menu showing the 'Edit' option selected for the 'Deploy - font' GPO under Group Policy Objects
  • Navigate to Computer Configuration > Policies > Windows Settings > Scripts (Startup/Shutdown). Then right-click on Startup and select Properties:
Group Policy Management Editor with 'Startup' script selected and 'Properties' option highlighted
  • Click Add…, then Browse to locate and select the font.bat script file:
Sequence showing how to add a startup script in GPO: clicking Add, then Browse, then selecting font.bat in the SYSVOL scripts folder

And voila… The font deployment is now automated across domain computers at startup!