0

I'm looking for a file that is responsible for installing fonts in Windows 10. I want to give permissions to this file to normal user, but I cannot locate it.

1 Answers1

0

I'm looking for a file that is responsible for installing fonts in Windows 10.

Read How do I install a font from the Windows command prompt? thread; for instance, run the following code snippet in an elevated command prompt (see the GeneQ's answer):

… you have to write a Windows shell script to do that. Copying alone won't install the font: you also need to register the font, e.g.

copy /B "FontName.ttf" "%WINDIR%\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "FontName (TrueType)" /t REG_SZ /d FontName.ttf /f

So what is launched while installing fonts via rightclick? You can find fontext.dll library in the registry:

==> reg query HKCR /ve /s | findstr /I "InstallFont"
HKEY_CLASSES_ROOT\fonfile\shellex\ContextMenuHandlers\InstallFont
HKEY_CLASSES_ROOT\otffile\shellex\ContextMenuHandlers\InstallFont
HKEY_CLASSES_ROOT\pfmfile\shellex\ContextMenuHandlers\InstallFont
HKEY_CLASSES_ROOT\ttcfile\shellex\ContextMenuHandlers\InstallFont
HKEY_CLASSES_ROOT\ttffile\shellex\ContextMenuHandlers\InstallFont

==> for /F "delims=" %G in ('reg query HKCR /ve /s ^| findstr /I "InstallFont"') do @reg query %G /ve

HKEY_CLASSES_ROOT\fonfile\shellex\ContextMenuHandlers\InstallFont
    (Default)    REG_SZ    {1a184871-359e-4f67-aad9-5b9905d62232}

HKEY_CLASSES_ROOT\otffile\shellex\ContextMenuHandlers\InstallFont
    (Default)    REG_SZ    {1a184871-359e-4f67-aad9-5b9905d62232}

HKEY_CLASSES_ROOT\pfmfile\shellex\ContextMenuHandlers\InstallFont
    (Default)    REG_SZ    {1a184871-359e-4f67-aad9-5b9905d62232}

HKEY_CLASSES_ROOT\ttcfile\shellex\ContextMenuHandlers\InstallFont
    (Default)    REG_SZ    {1a184871-359e-4f67-aad9-5b9905d62232}

HKEY_CLASSES_ROOT\ttffile\shellex\ContextMenuHandlers\InstallFont
    (Default)    REG_SZ    {1a184871-359e-4f67-aad9-5b9905d62232}


==> reg query "HKLM\SOFTWARE\Classes\CLSID\{1a184871-359e-4f67-aad9-5b9905d62232}" /s

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{1a184871-359e-4f67-aad9-5b9905d62232}
    (Default)    REG_SZ    Microsoft Windows Font Context Menu Handler

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{1a184871-359e-4f67-aad9-5b9905d62232}\InProcServer32
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\fontext.dll
    ThreadingModel    REG_SZ    Apartment


==> reg query "HKCR\Wow6432Node\CLSID\{1a184871-359e-4f67-aad9-5b9905d62232}" /s

HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{1a184871-359e-4f67-aad9-5b9905d62232}
    (Default)    REG_SZ    Microsoft Windows Font Context Menu Handler

HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{1a184871-359e-4f67-aad9-5b9905d62232}\InProcServer32
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\fontext.dll
    ThreadingModel    REG_SZ    Apartment
JosefZ
  • 13,855