Font Deployment via Login Script

A client recently asked for a certain font to be distributed to all users in their organization because it will be used by their new letterhead.

After a bit of research, I wrote the following vbs script to be called at login:

set WSHShell = CreateObject("WScript.Shell")
set FSO = CreateObject("Scripting.FileSystemObject")

sFontName = "fontname.ttf"
sFontDescription = "font name (True Type)"

FSO.Copyfile "\\servername\fonts\fontname.ttf", "c:\windows\fonts\fontname.ttf"
WSHShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\" + sFontDescription, sFontName

I also scheduled a reboot of all systems across the domain that night to ensure that they ran the new scripts upon logging in the next day.

However there are two issues:

1. On some machines, the font has been copied into the correct directory, and the correct registry key has been created; however, the font doesn't actually show up in Word (or other Office products) and is not usable.

2. On some machines, the font is selectable in Word, and works fine, except it isn't displayed in it's own font-face in the drop-down selection of available fonts. It is displayed in Arial (or something similar) instead. This second issue obviously isn't the biggest deal in the world, but if someone knew how to resolve this, that would be very helpful as well.

Thanks in advance, experts!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Looks good to me (and tested OK too).  The only thing I can think of is do any of the computers have a windows directory other than c:\windows?  Are any upgrades from a previous OS?

Maybe you could try running Word as a different user or in another mode (winword /a or winword /safe) to see what happens.
Also... if the default printer is limited (like generic/text-only), you won't see any style in the font drop-down list.
marathonconsultingAuthor Commented:
Other fonts display in their respective styles.

The systems in question are all XP SP3. No other system directories. The font has been placed in the same folder as every single other font that does show up in the listings.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Have you tried setting the printer to a different model?
Serge FournierAnalyst ProgrammerCommented:
are your user all local admin?

if not, there is two ways to execute a logon script

one is before the user is logged (script execute with admin right on the machine)
and the other is as the user himself after he logged on

check the different logon script execution method on your server

if you execute as machine before the user logon, the script will report the current logged user is "system"

if the user is not in the administrators group on the machine (local admin) he might not have the rights to write a key in HKLM
or even copy a font in windows folder

marathonconsultingAuthor Commented:
The script is working properly. All users now have the font in c:\windows\fonts. All users also have the correct registry key. The font is simply not showing up as an installed font in the font listing in Word for certain machines only.
marathonconsultingAuthor Commented:
Tried the default printer trick to no avail.
marathonconsultingAuthor Commented:
Have given up regarding the issue.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.