I needed to deploy a font in a Microsoft Windows Active Directory environment. Surprisingly, 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 goal is to copy the font file to the "C:\Windows\Fonts" directory on each target machine where the font needs to be deployed.
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) so that the batch script runs when domain computers start up.
And voila…
Contact :