How to Deploy fonts using Configuration Manager

In this post we will see steps on how to deploy fonts using Configuration Manager. If you have been tasked with deploying fonts using SCCM this post should help you. A font is a set of printable or displayable text characters in a specific style and size.

One of the most popular outline font software programs on today’s computers is TrueType fonts. TrueType fonts come with both Windows and Macintosh operating systems. Normally if you want to install a font the easiest way is to double-click on a font file to open the font preview and select ‘Install‘. But if you want to deploy the same font on multiple computers, we have to make use of script that does the job.

When you deploy a script (SCCM Package) to install the font, the user that is logged on to the computer will not be able to use or see these new fonts until they log out and log in back. If you run this script on a standalone computer the fonts are installed and can be seen used by users.

The strange thing is when SCCM deploys the same package and runs the same script the fonts gets installed correctly but they appear to be missing. After a log off and login the fonts can be seen.

How to deploy fonts using Configuration Manager

First of all download the install_fonts script from here. It’s a text file, download and save it to a folder. Next, change the extension of the file from .txt to .vbs. Copy the script file and font to a shared folder. The font that I be deploying is Marlboro font which is available free for Download.

How to deploy fonts using Configuration Manager 2012 R2

Open the script file with notepad or any editor, set the font source path to the location where the font is located. You just need to specify the path up to the folder where the font is present. Save and close the file.

How to deploy fonts using Configuration Manager 2012 R2

In Configuration Manager console, choose Software Library. In the Software Library workspace, expand Application Management, and then choose Packages. Right click Packages and click Create Package. Specify the Name, Source folder and click Next.

How to deploy fonts using Configuration Manager 2012 R2

Choose the Program Type as Standard Program. Click Next.

How to deploy fonts using Configuration Manager 2012 R2

Specify the Name for the standard program, enter the Command line as cscript.exe filename.vbs. Choose the program to run whether or not a user is logged on. click Next.

How to deploy fonts using Configuration Manager 2012 R2

Click Next.

How to deploy fonts using Configuration Manager 2012 R2

On the completion wizard click Close.

How to deploy fonts using Configuration Manager 2012 R2

After the package is created, click on the package and at the bottom pane, click the Programs tab. Right click the Program and click Properties.

On the General tab, choose After running option to Configuration Manager logs user off. As I mentioned in the beginning of the post that when the script installs new font, until the user logs out and logs in back the font is not seen. Click Apply and OK.

How to deploy fonts using Configuration Manager 2012 R2

Testing the Font Deployment in SCCM

Right click on the package and Distribute the content to the DP. Once the content is available with the DP, right click the package and click Deploy. Deploy the package to the desired collection. Choose the deployment purpose as Available or Required.

Since a log off is required after we deploy this package, I will be deploying this package as Available. A log off notification will be seen by user when the software is is installed from the Software Center. After you deploy the package, wait for few minutes, the package will be available for install in the software center. To install the software click Install Selected.

How to deploy fonts using Configuration Manager 2012 R2

After the software is installed, the status is now Pending Logoff. To log off click on Logoff.

How to deploy fonts using Configuration Manager 2012 R2

After the user logs in, on the client computer, launch the Control Panel, click on Fonts and in the search bar type the font name. You can see that the font Marlboro Regular is in list of fonts.

How to deploy fonts using Configuration Manager 2012 R2

On the client computer open execmgr.log file for troubleshooting the deployment. In the below screenshot we see that the Marlboro font has been installed successfully.

How to deploy fonts using Configuration Manager 2012 R2

So how do you verify whether the font is available for use ?. Open Ms Word or notepad, look for changing the default fonts and you will see the installed font under Fonts.

How to deploy fonts using Configuration Manager 2012 R2

119 Comments

  1. Avatar photo Scott Wells says:

    Ah, I see. This script now installs fonts per user since Microsoft has made changes to how fonts install. So this script will always install the fonts to the current user’s profile even if they are already installed as the check to see if the font is installed is now broken.

  2. hi Prajwal,

    Can you please share me the fonts latest script to support for Win ltsc 22h2.

  3. Hi Prajawal,

    Tried to install fonts Win 10 21h2 and Configuration manager 2111 Deployment success but could not see any font installed in the font folder. please help with this

  4. Avatar photo Erik Carlsen says:

    Hi my friend Prajwal, do you have the script for windows 10 1809 and up?

    Thanks,

    Erik

  5. Hi Prajwal,
    Thanks a lot bro, we are learning much from you. i run the thatdeployemnt as mention and it is appearing in software center also it is installing and login off.
    But the fonts are not showing in font folder. kindly find below execmgr.log. i am using in MECM 2010.

    ]LOG]!>

    1. the fonts folder view is only refreshed after user logs off and on again

  6. Avatar photo Daniel Dodds says:

    Hi Prajwal,

    Did you get a script to work with 1809 and newer? Could I get the updated one if available?

    Thank you!

  7. Avatar photo Chanuka De Vas Gunawardane says:

    Hi Praj,

    I need the script as well. Can you share?

  8. Avatar photo Tyler H Barwick says:

    This PS script works when running in PowerShell. I attempted to run this as an application but I can’t get the detection rule to work. I tried to select the font string in the registry at HKLM\Software\Microsoft\WindowsNT\Font but it fails. If anyone else can get this to work I’d love to hear your solution.

    $FONTS = 0x14;
    $FromPath = “\\<UNC Path>”;
    $ObjShell = New-Object -ComObject Shell.Application;
    $ObjFolder = $ObjShell.Namespace($FONTS);
    $CopyOptions = 4 + 16;
    $CopyFlag = [String]::Format(“{0:x}”, $CopyOptions);

    foreach($File in $(Get-ChildItem -Path $FromPath)){
      If (Test-Path “c:\windows\fonts\$($File.name)”){
      }
      Else{
        $ObjFolder.CopyHere($File.fullname, $CopyFlag);
        New-ItemProperty -Name $File.name -Path “HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts” -PropertyType string -Value $File 
      }
    }

  9. I need the updated script for deploy Fonts for sccm also via Mail, if possible.
    Thank you very much.

  10. Any luck getting this working on 1809 and newer?

  11. Avatar photo AdminTest says:

    I plz need the updated scriped too via Mail if possible.
    Thx you much.

  12. Hi Praj,
    Love all your articles, literally life savers.

    I’m having issues with this, it simply doesn’t work on Win10 1809 for me. It will state it has installed, the exit code is 0, but nothing happens (even after a log off)

    I can run a batch file we created in-house to install fonts, but I wanted to streamline it and put it into SCCM which is how I found your article…But alas!

    Any help appreciated! I can see a few people have said they can’t get it working, so wondering if there has been any further input on that front?

      1. Okay awesome. I’ve tried doing similar using PSEXEC but it runs into permission errors. We did have another powershell option but not sure if i can get that working.

        Look forward to it either way 🙂

      2. I have found another script, but soon as its in SCCM it either sits there ‘installing’ or says ‘installed’ and doesn’t actually install.

        Running the script outside of SCCM works though.

      3. @Prajwal
        Another script i have working outside of SCCM wants to prompt ‘Yes’ for overwriting the Font (despite it not being installed), this only happens once its in a Package in SCCM, outside it works fine (and doesn’t prompt)

        !

        1. If it doesn’t work with SCCM, then how will you deploy it to enterprise systems ?.

          1. That is my point, it needs to work in SCCM. As soon as it gets put in there it doesn’t work because the font installation prompt is asking for confirmation.

            Apparently, that prompt is separate and doesn’t respond to ‘Yes to all’ option flags.

          2. I have a current working script in SCCM if you wanted to take a look and adjust or anything Praj, not mine but i’ve had to adapt it to include fonts with spaces in its names.

            1. Yes, send it to me and I will take a look at it. I am also working on another script.

              1. Sent an email via your Contact Link on website, same email address as on here. 🙂

                Probably messy but has worked on multiple test systems so far.

  13. This does not work on Win 10 1809 or above. is there a script that can be used for those OSs that will place the fonts at c:\windows\fonts

  14. Avatar photo Siddharth Venkatachalam says:

    Hello Prajwal,

    Can this script be modified to strFontSourcePath = “Present working directory”? Can you please guide

  15. Avatar photo jake davidoff says:

    Not working on !809 on for me either looks like it runs fine then logoff and no new fonts 🙁 anyone find a solution?

  16. Avatar photo Liam O'Malley says:

    Does not work on Windows 10 1909 any suggestions?

    1. Avatar photo Liam O'Malley says:

      Script goes through and user gets logged off but the fonts are not there

    2. Avatar photo David Ohana says:

      same here – not realy install the fonts on 1909

  17. Avatar photo Eric Diamond says:

    Could I please get the script? The link is no longer working.

  18. For 1809 and later builds the old $shellFontsFolder.CopyHere() shell.application method no longer works. Or rather it works, but on a per-user basis. Files are redirected to %LocalAppData%\MS\Windows\Fonts, and the reg key is created in HKCU.

    $shellItem.InvokeVerb(‘install for all users’) doesn’t work. ‘install for &all users’ doesn’t work. ‘installforallusers’… also doesn’t work. Verb names are found using $shellItem.Verbs()

    What finally worked for me was:
    $shellItem.Verbs() | where {$_.Name -eq ‘install for &all users’} | foreach {$_.DoIt()}

    It seems there’s a problem with passing some (not all) verb strings to InvokeVerb. It’s not even just verbs with spaces in the name. Some single-word verbs fail to trigger using InvokeVerb, but piping to ForEach and using DoIt() always works, I’ve found.

    Tested and working on 1903 using PowerShell.

    1. Care to share the entire code?

      1. The script is shared on OneDrive and if you need the script, send me an email via contact form and I will send you the code.

        1. Avatar photo Jean-François Harry says:

          Hi,
          I would have the script which is OK with 1809, 1903…
          Thanks

          1. Avatar photo Ajay Dasari says:

            Can you please provide the script which is working for Windows 10

        2. Avatar photo yaser Hussaini says:

          Hello Prajwal,

          Could you pls share the script. Regards

        3. Avatar photo Matt Courtman says:

          Hi, Please may I have the script code emailed to me that works with 1809 etc..
          Thanks, Matt

          1. I tested the script download link and it works fine. Do you still need the script ?.

            1. Hi Prajwal, I am trying to do this in 1906. Do you still have the script that works for this version? If you can you please send it to me?

              Regards
              Sulaja

          2. Avatar photo Anshul Gupta says:

            please can you share the script with me

              1. Avatar photo James Jollands says:

                I’ve tried using the script linked above but get the same issue where it wont install on 1809, says its installed but then not available after a log off/restart. Is the link meant to take you to the updated version for 1809 onwards as its not working for me if that is the updated script. If not please can you send me the updated script? Have also contacted via contact page. Thanks 🙂

              2. Avatar photo Krunal P. says:

                Hi Prajwal, I might have overlooked it, but could you please provide the link?

                1. There is a link in the first line under the heading ‘How to deploy fonts using Configuration Manager’, this doesn’t appear to run in SCCM in Win10 1809 though, for me at least.

                  I’ve tried a few other Powershell scripts too and these work outside of SCCM, but once put into a package and deployed seem to fail.

                  It’s also stating that the OTF fonts I am trying to import are not valid for some reason, despite them working when trying to install them manually?

        4. Avatar photo Doug Curry says:

          Can I grab a copy of the script please. the shared link dosn’t working

    2. Avatar photo Jean-François Harry says:

      Is it possible to have this code ?

    3. Do you have the full script you can post?

    4. If perhaps anybody were to fall into the same rabbithole, I actually found the Verb by creating a program that spawned the context menu using the ContextMenu interface, documented here: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-icontextmenu-getcommandstring

      The actual verb name for InvokeVerb should be “InstallAllUsers” but it does not actually work. (Tried both running as administrator and as system).

      The only solution I found that works, outside of creating MSI-installers, or registering it manually using the registry, is doing the Verbs()-enumeration and calling .DoIt() on the resulting object as you did, unfortnately the name is localized making it sensitive to localization changes. But our environment only has the one locale so I’ve decided to go this route

  19. Avatar photo Mario Stockinger says:

    With SCCM 1906 i followed the guide but it doesn’t work. The package is installed and i get the logoff message but the fonts is not installed. I tested it with the marlboro fonts from your guide.

    Successfully raised SoftDistWaitingContentEvent event for program Testschrift2 execmgr 01.10.2019 17:37:02 13872 (0x3630)
    Execution Request for advert package xxxxE7 program Testschrift2 state change from NotExist to WaitingContent execmgr 01.10.2019 17:37:02 13872 (0x3630)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:02 13872 (0x3630)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:02 5340 (0x14DC)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:02 5340 (0x14DC)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:02 14340 (0x3804)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:02 13672 (0x3568)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:02 2260 (0x08D4)
    Processing [{536285DD-DB64-49FA-9839-FDEA277B1FE3}, 0]: OnContentAvailable execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    [{536285DD-DB64-49FA-9839-FDEA277B1FE3}]: Content Version 1 is available for advert , pkg: xxxxE7, program Testschrift2. execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    An existing MTC token was not supplied, using ExecutionRequest’s Id as MTC token and this execution request is the owner of resultant MTC task. execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    Request a MTC task for execution request of package xxxxE7, program Testschrift2 with request id: {62704255-F571-4137-AAD7-D896A2C079BA} execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    Execution Request for advert package xxxxE7 program Testschrift2 state change from WaitingContent to Ready execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    MTC task with id {62704255-F571-4137-AAD7-D896A2C079BA}, changed state from 0 to 4 execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    Processing [{536285DD-DB64-49FA-9839-FDEA277B1FE3}, 0]: RemoveNotification execmgr 01.10.2019 17:37:03 5340 (0x14DC)
    MTC signaled SWD execution request with program id: Testschrift2, package id: xxxxE7 for execution. execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Sending ack to MTC for task with id: {62704255-F571-4137-AAD7-D896A2C079BA} execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Executing program cscript.exe Install_Fonts.vbs in Admin context execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Execution Request for advert package xxxxE7 program Testschrift2 state change from Ready to NotifyExecution execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Checking content location C:\WINDOWS\ccmcache\o for use execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Successfully selected content location C:\WINDOWS\ccmcache\o execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Executing program as a script execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Found executable file cscript.exe with complete path C:\WINDOWS\system32\cscript.exe execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Successfully prepared command line “C:\WINDOWS\system32\cscript.exe” Install_Fonts.vbs execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Command line = “C:\WINDOWS\system32\cscript.exe” Install_Fonts.vbs, Working Directory = C:\WINDOWS\ccmcache\o\ execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Running “C:\WINDOWS\system32\cscript.exe” Install_Fonts.vbs with 32bitLauncher execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Created Process for the passed command line execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Raising event:
    [SMS_CodePage(850), SMS_LocaleID(1031)]
    instance of SoftDistProgramStartedEvent
    {
    AdvertisementId = “xxx2005F”;
    ClientID = “GUID:3b2b82f4-bf7d-4407-b8f3-1f96b26a609b”;
    CommandLine = “\”C:\\WINDOWS\\system32\\cscript.exe\” Install_Fonts.vbs”;
    DateTime = “20191001153703.983000+000”;
    MachineName = “PC38”;
    PackageName = “xxxxE7”;
    ProcessID = 10128;
    ProgramName = “Testschrift2”;
    SiteCode = “xxx”;
    ThreadID = 3436;
    UserContext = “NT-AUTORITÄT\\SYSTEM”;
    WorkingDirectory = “C:\\WINDOWS\\ccmcache\\o\\”;
    };
    execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Raised Program Started Event for Ad:xxx2005F, Package:xxxxE7, Program: Testschrift2 execmgr 01.10.2019 17:37:03 3436 (0x0D6C)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:04 3436 (0x0D6C)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”xxxxE7″,ProgramID=”Testschrift2″, actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 01.10.2019 17:37:04 3436 (0x0D6C)

    Execution is complete for program Testschrift2. The exit code is 0, the execution status is SuccessLogoffRequired execmgr 01.10.2019 17:37:04 5340 (0x14DC)

    Windows 10 Pro 1903 18362.357

  20. Thanks Prajwal!
    Do you also have a script for uninstalling fonts?

  21. Avatar photo Prabhas Upadhyay says:

    Hi Prajwal, By any chance is this script will work for Windows 10 1809 also ? I am looking for Script which install for all users during task Sequence.

    I tried many script but not worked and effort in vain.

    1. Yes the script should work fine. A facebook user had contacted me regarding the same, he tested this script and it was working fine. I suppose he was deploying the script on Windows 10 1809.

      1. Avatar photo Prabhas Upadhyay says:

        Thanks Prajwal, Let me test. Actually in Windows 10 1809 they Microsoft has changed related to font install process like User based installations. That’s why its not installing for all users. Let em check and update. Thanks for your swift response.

  22. Avatar photo Dwayne Gaeke says:

    Prajwal, I think that something has been removed from your posted script.
    I see an “install” called out, but no routine for it to reference?
    What am I missing, here?
    Thank you!!

    1. Did you download the script from the correct link ?. Nothing has been changed or removed from that script.

  23. Avatar photo David Drew says:

    Thanks Prajwal, your script works great in SCCM to copy the font to the correct folder, but it appears that it does not register the font, even after a reboot. I found a similar article that I believe describes this issue: “There’s something magical about the fonts folder viewed through Windows Explorer. If you copy them in from within that instance of Windows via explorer it will actually “install” them create the necessary registry structure automatically. My experience is that If you copy them across the network (e.g. to \\machinename\c$\windows\fonts) from another instance of Windows or copy them in with a script in the background (i.e. not through the Explorer GUI) it will not create the necessary registry entries even after a reboot and the fonts will not be usable.”
    I think you might need to add similar to below to your script, but I’m not certain where it should go, or the proper syntax to use. Something like this maybe? “My.Computer.Registry.SetValue(“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts”, “ (TrueType”, “FontName.ttf”)” Could you please provide me with an updated script that includes the register font command? THANK YOU!!

  24. Thanks Prajwal, you always teach me something new!

  25. Can you rewrite the script because it seems not work with windows 10 1809.
    Thanks a lot.

  26. it would be much appreciated if you would send the script to my inbox?

  27. “Copy the script file”
    Where from?
    I can’t find any link on this page or the text to copy the script… Am I missing something (Quite probable!)
    Appreciate the work, this page is a great resource for all SCCM admins 🙂

  28. would you be able to post the script as text?

  29. can you write your script on the comment part. i cant download it

  30. Hello we also have troubles installing fonts. This is since Windows 10 1809 build, on a Windows 10 1803 we have no problems.
    I also use .vbs script to install the script in c:windowsfonts but after the script end I can’t see the fonts in the fonts directory. When I open wordpad I see te font, I can select it but nothing changes. I still have Arial as font.
    weird problem this is.

  31. Hello all, did anyone of you found solution how to deploy fonts with sccm? this solution is not working. if you manually run install then is OK,

    1. The deployment works fine. Please try again and let me know if you encounter any issues.

  32. Avatar photo HerosBaneAdmin says:

    This link possibly explains the script not working when run by SYSTEM via SCCM.

  33. Hi Prajwal,
    The link is not working the file is not available? Would you mind sharing it again please?

      1. Avatar photo Praneeth Gunarathna says:

        Can you please send me the Correct Script for 1909

  34. I’m running this script, and looking in execmgr.log file it executes properly but looking in the fonts directory I cannot see the font.

    If I run the script manually it works. Any suggestions?

    1. Avatar photo Abdulrehman Altaf says:

      Thanks Prajwal Desai.
      Create installation package through visual studio
      All you have to do is to follow these simple instructions:

      Open Visual Studio and start a new installer project. Then carry out the following steps:

      Right click on the File System on Target Machine, Add Special Folder > Fonts Folder:
      Once you have created the Fonts folder then place your font file there:
      This will ensure that the installer places the font file into the Fonts folder within Windows, however, you need to also register the font.
      To register the font, you have to go to the Properties for each font file and change Register from vsdrfDoNoRegister to vsdrfFont:
      When you have made these changes, you can then generate the installer and test. You should then find that the font is successfully installed.

      1. Avatar photo Gabriel Sahadi says:

        Thank you! Registering the fonts through Visual Studio and Advanced Installer worked for me.

  35. Avatar photo Mirza Irfan says:

    Hi Prajwal,
    Excellent work, your script worked like magic for me. with the help of this script i deployed multiple fonts on over 3000 machines. Many Thanks again

      1. Hi I have the same problem as Tom Any suggestions please

        Tom July 5, 2018 at 2:05 pm

        I’m running this script, and looking in execmgr.log file it executes properly but looking in the fonts directory I cannot see the font.

        If I run the script manually it works. Any suggestions?

  36. SMarten – you can set that up with SCCM too, just use scheduled deployments. You can set it to run regularly with that. And then, you can just set it to “no” on ‘users can run it independently of assignments’ and you’re golden.

  37. I have an environment where we have to periodically add new client supplied fonts. I wrote a script that looks in an common folder where staff could add fonts for distribution and would install the font if the file wasn’t already on the machine. I want to move this to SCCM as we have since removed local admin rights. I like Prajwal’s having it available in Software Center for On Demand, but I would also like to have the script automatically run silently in the background on a schedule. How can I arrange that?

  38. Avatar photo Chris Lane says:

    It’s a lot easier in powershell. Just create a cmd file with this command
    powershell.exe -executionpolicy bypass -file “.\installfonts.ps1”

    #installfonts.ps1
    #########################################################################
    # INSTALL WINDOWS FONTS
    #########################################################################
    # Assumes all font files are in the current directory and/or subfolders

    $invocation = (Get-Variable MyInvocation).Value
    $directorypath = Split-Path $invocation.MyCommand.Path
    $FONTS = 0x14
    $objShell = New-Object -ComObject Shell.Application
    $objFolder = $objShell.Namespace($FONTS)
    # Search for valid Font File Extensions that can be installed in this manner
    $Fontslist = Get-ChildItem -path $directorypath -Recurse -Include *.ttf,*.otf,*.pfm
    # now copy each file
    foreach($FontFile in $FontsList) {
    # Ignore if Font File already exists in C:\Windows\Fonts
    If (!(Test-Path (“$($objFolder.Self.Path)\$($FontFile.Name)”))){
    #write-host $FontFile
    $objFolder.CopyHere($FontFile.FullName)
    }
    }
    $objShell = $null

  39. Hi Prajwal, it appears the download limit is reached, or the file is not available?
    Would you mind sharing it again please?

    Thanks in advance

    1. The link is valid and I am able to download the fonts zip file. Can you try again ?.

      1. Hi,

        It appears I am still getting an error. Is it possible that you zip and email it? or possible share via a different sharing tool?

  40. Avatar photo Sanjay Lodh says:

    Hi Prajwal,
    Only Font file is there in Zip ,No VBScript .
    Thanks in advance.

  41. Thumbs up
    yes it is available right now tx bro :}

  42. Hello the script is not available could you please upload it again and re assign the link to all readers of your blog ?
    or if you can share it with me on ( Eternityksa@yahoo.com )
    awaiting your response highly appreciated 🙂

      1. Yes thanks a bunch for the prompt reply, The Download is available.

  43. Hi Prajwal,

    can you kindly provide the vbs script as the Dropbox link is not available anymore?

    Much appreciated!

  44. Avatar photo Ali Janghorban says:

    Hi Prajwal. I want to install many fonts with this script. but not work !!!

  45. Thank you Prajwal for this script! It works great with computers that do not have the font that I am deploying. However, I am deploying 30 fonts to around 500 machines that already have some of the fonts installed. When the script tries to install some of the fonts that are installed I’m getting the following pop up that is causing the deployment to time out: “Install Font. The ‘fontname’ font is already installed. Do you want to replace it?” I have made the script silent by using options //B and //Nologo, but is there text I can add to make the install completely silent? Either suppress the pop up or auto answer Yes?

        1. Avatar photo Mike Niles says:

          I realize this is an old comment, but one solution I saw elsewhere was to use detection to look for the font already being installed and if so skip that portion of the script. Alternately, could maybe have the script remove if present then install which would also make it a viable “repair” script.

    1. Any updated script for this? This is my issue right now as SCCM will stay on “installing” since its waiting for input since some of the fonts may already be installed. I tested this manually which shows the prompt, mainly on Aller Bold and Aller Light fonts. Most fonts if already installed will get the message “This Font is already installed:” from the script output, but we need something added to the script to skip these Aller font messages or else SCCM will wait for input since they act differently for some reason.

    2. Add to the command Install the / q option. “Install /q” for unattended mode

  46. Hi Prajwal, thank you for this script! It works perfectly with computers that do not have the fonts that I am deploying. The issue I am having is I am deploying 31 fonts to almost 500 computers that already have some of the fonts installed. I’m able suppress the script prompts with //B and //Nologo options, but I’m getting the Windows prompt “Install Font. The ‘fontname’ font is already installed. Do you want to replace it. |Yes|No|”. Is there text I can add to the script to either suppress the Windows prompt or have Yes as the auto answer?

    1. Add to command Install option / q for unattended mode. “Install /q”

  47. This script works if you have read access to that share with your computeraccounts, without those, it will fail. SCCM package will anyways copy whole source directory to a local cache, why to do that twice? What if you dont have access to SMB share but only http?

    Best way is to change strFontSourcePath to point to the directory where this script is executed from, after that, SCCM will download everything to the local cache and do the installation from there.

    Something like:
    strFontSourcePath = objFso.GetParentFolderName(WScript.ScriptFullName)

  48. Hi Prajwal, I want to change the “\sccmsourcesinstall” path to the path the script is running from (in batch it’s “%~dp0”). How can I do this in your vbs?

      1. I’ve got a folder with all the otf’s and your Install_Fonts.vbs file. All in 1 folder 🙂 So I need the strFontSourcePath = to be ‘CurrentDirectory’

      2. All is located in the same folder. All otf’s with your Install_fonts.vbs. So I would have variable strFontSourcePath = “currentdirectory” 🙂

  49. Its not working. If i run the script as it is it works but not via SCCM?

Leave a Reply

Your email address will not be published. Required fields are marked *