I needed to deploy a font in a Microsoft Windows Active Directory environment. Surprisingly, it appears that there is no built-in method to distribute fonts using Group Policy Objects (GPO). To achieve this, I created a batch script that runs at startup when users log on through Group Policy Objects.
First things first, we need to have the font file that we want to deploy. For this example, let's assume we want to deploy the "STD-Regular (OpenType)" font.
The goal is to copy the font file to the "C:\Windows\Fonts" directory on each target machine where we want to deploy the font.
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" | findstr "STD-Regular (OpenType)"
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
@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
To automate the font installation process, we will create a Group Policy Object (GPO) that executes the batch script when computers start up.
And voila…
Contact :