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!
marathonconsultingAsked:
Who is Participating?
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.

jostranderCommented:
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.
0
jostranderCommented:
Also... if the default printer is limited (like generic/text-only), you won't see any style in the font drop-down list.
0
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.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

jostranderCommented:
Have you tried setting the printer to a different model?
0
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


0
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.
0
marathonconsultingAuthor Commented:
Tried the default printer trick to no avail.
0
marathonconsultingAuthor Commented:
Have given up regarding the issue.
0

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.