Need to install Custom Windows Fonts

need to copy fonts in default windows fonts folder, but getting error as below.

Command succeeded extract b3c32717623eee0ba0c067fe5e51c8154a62866e (action:156721)
Retry error, attempt 9 failed for MoveFile (C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download\Custom-Medium.otf ,C:\Windows\Fonts)

Command failed (Move of ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download\Custom-Medium.otf’ to ‘C:\Windows\Fonts’ failed (0 - File error “class FileFoundError” on “C:\Windows\Fonts”)) move __Download\Custom-Medium.otf “C:\Windows\Fonts” (action:156721)

You seem to be missing a backslash after the site name…should be
actionsite\Download

Sorry it is pasting here in that format only, backslash seems to vanishing here before an underscore (_download) . Please consider a backslash:

But now the issue is i can see my custom fonts via cmd but they are not visible in the Fonts folder. Maybe they are not getting installed correctly. and the registry path is also not showing them under
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

Command failed (Copy of ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite\ _Download\Custom-Medium.otf’ to ‘C:\Windows\Fonts\Custom-Medium.otf’ failed (80 - File error “class FileFoundError” on “C:\Windows\Fonts\Custom-Medium.otf” : “Windows Error 0x50%: The file exists.”)) copy __Download\Custom-Medium.otf “C:\Windows\Fonts\Custom-Medium.otf” (action:156723)

Ah, ok then. There are a couple of things going on.

The ‘copy’ ActionScript command will not overwrite an existing file. In your case it looks like “Custom-Medium.otf” already exists in the C:\Windows\Fonts folder. You’d have to delete it from there before you can copy over the new one.

Also, for new fonts, just dropping the font into the Fonts folder is not enough to “install” it for Windows. There were scripts I’ve used to register the fonts with Windows in the past, but a quick google makes it look like some things have changed. Have a look at https://jordanmalcolm.com/deploying-windows-10-fonts-at-scale/ and see whether that’s helpful at all.

1 Like

Thats a Great link @JasonWalker …this script is running successfully manually . But not executing via software distribution task. Its says it completed, only the fonts getting copied successfully but no registry values are getting created

rem //**Begin Command Marker
echo Command: PowerShell.exe -ExecutionPolicy Bypass -nologo -noninteractive -file .\Fonts.ps1 >> "{parameter “logFolder”}{parameter “logFile”}"
set errorlevel=
PowerShell.exe -ExecutionPolicy Bypass -nologo -noninteractive -file .\Fonts.ps1 >> “{parameter “logFolder”}{parameter “logFile”}” 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker

Command succeeded (Exit Code=0) wait run.bat (action:156757)
Command succeeded parameter “returnCode” = “0” (action:156757)
Command succeeded (0) exit {parameter “returnCode”} (action:156757)

By default all of the commands run in 32-bit mode…try adding
action uses wow64 redirection false
To your action, anywhere before the ‘wait run.bat’ command

@JasonWalker Issue has been resolved and we are able to install fonts. Needed to change the font folder which has done the trick. without using action uses wow64 redirection false
Thanks for your quick support.

Modified From
$FontFolder = “\NetworkShare\FontsFolder”

To
$FontFolder = “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download”

2 Likes