Jump to content


Recommended Posts

Hi,

 

here is a small guide so other people don' have to loose their time google-ing like I did today.

I got a task to deploy some additional fonts during the deplyoment of notebooks in my company.

 

I did it like this:

__________________________________________________

@Echo Off

robocopy %~dp0. "C:\Windows\Fonts" /xf "fontscopy.bat" /SEC

regedit /s fonts.reg

__________________________________________________

 

fonts.reg file is necessary to register new fonts in registry although I must admit I this example it works without this file :)

 

It looks like this:

_______________________________________________________________________

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"3of9 (TrueType)"="3of9.ttf"
....

________________________________________________________________________

+5 more fonts, important to point out that the first part of the file before (TrueType) so that means 3of9 is the name YOU give to the font and its visible to apps in windows, the part after "3of9.ttf" is the file name itself.

 

I will break down the robocopy command for explanation:

robocopy %~dp0. "C:\Windows\Fonts" /xf "fonts.reg" "test.bat" /SEC

%~dp0 = go to the drive letter and path of the running batch file aka you need it for copying files over network - VERY IMPORTANT, IT WON'T WORK WITHOUT THIS ONE.

. = copy all files inside the folder (.bat must be inside of the folder you want to copy).

/xl = exclude files from copying (must be inside "" for example "fontscopy.bat").

/SEC = robocopy will copy files even if they are in a protected folder like Windows\Fonts folder is.

 

Since I am a noob on this windows-noob forum all suggestions are welcome. In this moment I do things the way I know and that is simple but it is working.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.