Install a Font for All Users from the Command Line

Copy a .ttf/.otf font into C:\Windows\Fonts and register it under HKLM so every account and every program can use it.

WindowsfontsregistryFilesMedium risk
Copy the font file into %windir%\Fonts and add a REG_SZ value named "FontName (TrueType)" pointing to the file name under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts.

01Command

Command
$ copy "C:\Downloads\MyFont.ttf" "%windir%\Fonts\" && reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "MyFont (TrueType)" /t REG_SZ /d "MyFont.ttf" /f

02What it does

Right-clicking a font and choosing "Install" only installs it for the current user; "Install for all users" needs admin rights and does exactly what this command does — puts the file in the system Fonts folder and creates a registry entry that tells Windows the font exists. The registry value name must describe the font (e.g. "MyFont (TrueType)" for .ttf files, "(OpenType)" for .otf), and the data is just the file name, not the full path. New apps pick the font up after they restart; you can also call AddFontResource or reboot if an old program doesn't see it.

03Risk

RiskMedium risk
RequirementsRun Command Prompt as administrator. Replace both file names and the registry value text with your font's real names.
!Warning: You must replace MyFont with your actual font's names in both the copy and the registry command — a mismatched value name makes the font invisible. HKLM writes need an administrator prompt.

04Undo

Undo
$ reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "MyFont (TrueType)" /f && del "%windir%\Fonts\MyFont.ttf"

05Sources

  • AddFontResourceA function (wingdi.h)
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents how the system makes a font available: the font file must be placed in the Windows Fonts directory and registered under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts.
  • reg - SS64
    SS64 · technical · 2026-09-17
    Evidence: Reference for reg add / reg delete syntax used to create and remove the font registry value.

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions