Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


February 27, 2008

The Trick to Installing Fonts with a VBScript or PowerShell Script

Using the Shell.Application object is key
RSS
View this exclusive article with VIP access -- click here to join |
See More Installation Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

 Executive Summary:
Windows automatically registers fonts you drag and drop into the Fonts folder. If you use a VBScript or Windows PowerShell script rather than Windows Explorer to copy fonts into that folder, you don't get the automatic registration unless you use the Shell.Application object. Here are the three steps you need to follow when using the Shell.Application object to install fonts through a VBScript or Windows PowerShell script.

Windows automatically recognizes fonts you drag and drop into the Fonts folder. However, if you try to install fonts by copying the file at a command prompt or through a script, you can't see them in the Fonts folder or in the Windows font listings. The problem is that fonts need to be registered. When you drag and drop them into the Fonts folder, the Windows Explorer shell copy operation triggers the registration process. If you don't use Windows Explorer, you don't get the automatic registration. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Reader Comments
Hi Alex,

Thanks for writing that -- I wish I'd seen it last week. I had three machines that I needed to install about 250 fonts. I copied the fonts to the machines, but the fonts didn't show in their list boxes (all of the users run as standard users, not admins). When I logged on as an admin and opened up systemroot\Fonts in an Explorer window, the fonts then populated. (I'm glad it was only three machines.)

I'm going to use your technique the next time I need to install fonts on several machines -- then I can do it without needing to log onto each machine.

Thanks!

Bill

AbqBill March 04, 2008 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Windows 7 Sets Sales Record

Microsoft CEO Steve Ballmer described Windows 7's first ten days of sales as "fantastic" while in Japan yesterday. ...


Related Articles PowerShell One-Liners for Managing the File System

Migrating to PowerShell? Don't Scrap Your Existing Code Just Yet

Scripting Solutions with WSH and COM: Short, Sharp Scripts

Understanding VBScript: The Windows Shell Object Model

Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Managing IT Across Multiple Locations

PowerShell 201 - eLearning Series with Paul Robichaux

PowerShell 101 - eLearning Series

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement