4

I want to make an unattended Windows 10 x64 LTSC (1809). I've installed a number of fonts with Powershell via the Powershell script in the following repository: here

enter image description here

That worked fine, but that work just in the current user. when I trying to create a new user, I can't see my new fonts. New fonts are only installed on the current user. But I want them to be installed on all users.

Windows had two option to install fonts in current user Or all users: enter image description here

I think this script just install fonts in current user and should be had a command to install in all users. This is my Power-Shell Command:

$SourceDir   = "InstallFont\"
$Source      = "InstallFont\*"
$Destination = (New-Object -ComObject Shell.Application).Namespace(0x14)
$TempFolder  = "C:\Windows\Temp\Fonts"


New-Item -ItemType Directory -Force -Path $SourceDir

New-Item $TempFolder -Type Directory -Force | Out-Null

Get-ChildItem -Path $Source -Include '*.ttf','*.ttc','*.otf' -Recurse | ForEach {
    If (-not(Test-Path "C:\Windows\Fonts\$($_.Name)")) {

        $Font = "$TempFolder\$($_.Name)"
        
        # Copy font to local temporary folder
        Copy-Item $($_.FullName) -Destination $TempFolder
        
        # Install font
        $Destination.CopyHere($Font,0x10)

        # Delete temporary copy of font
        Remove-Item $Font -Force
    }
}

So how will change this code or is there a way to install new fonts in all users in PowerShell. Any help is appreciated.

2
  • Hi @somebadhat . Can you help me?
    – Mehdi
    Commented Oct 22, 2020 at 6:50
  • The solution is here : jordanmalcolm.com/deploying-windows-10-fonts-at-scale Just copy the font and insert the needed line in the registry. For the registry part, I installed the font and exported what I found in HKLM. I now have a .reg file I can import with "regedit /s file.reg" Commented Nov 25, 2021 at 12:25

0

You must log in to answer this question.

Browse other questions tagged .