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, we need the font file we want to deploy. For this example, let's assume we want to deploy the "STD-Regular (OpenType)" font.
The aim is to copy the font file into 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're going to create a Group Policy Object (GPO) so that the batch script can be run when domain computers start up.
And voila…
Contact :