/build/static/layout/Breadcrumb_cap_w.png

Scripting Windows 7 fonts install

Windows 7 32bit silent deploy needed but standard batch methods do not seem to work on Windows 7.
Please assist with error shown below.

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("c:\pb-fonts")
Set objFolderItem = objFolder.ParseName("SWMEDITL_0.TTF")
Set objFolderItem = objFolder.ParseName("SWBLACK_0.TTF")
Set objFolderItem = objFolder.ParseName("SWBLKITL_0.TTF")
Set objFolderItem = objFolder.ParseName("SWLIGHT_0.TTF")
Set objFolderItem = objFolder.ParseName("SWLTOB_0.TTF")
Set objFolderItem = objFolder.ParseName("SWMED_0.TTF")
Set objFolderItem = objFolder.ParseName("SWMEDBI_0.TTF")
Set objFolderItem = objFolder.ParseName("SWMEDBLD_0.TTF")
objFolderItem.InvokeVerb("Install")

Windows Script Host
Script: C:\PB-Fonts|PB-Fonts.vbs
Line: 11
Char: 1
Error: Object required: objFolderItem
Code: 800A01A8

http://blogs.technet.com/b/rspitz/archive/2010/09/25/how-to-install-a-font-from-the-command-line-on-windows-7.aspx

0 Comments   [ + ] Show comments

Answers (4)

Posted by: anonymous_9363 13 years ago
Red Belt
1
Font installation merely involves copying the TTFs to the 'Fonts' folder in %SystemRoot%. It doesn't have to be any more complicated than that.
Posted by: WaPensFan76 8 years ago
White Belt
0
I couldn't deal with a reboot for my environment (9000+ workstations). The problem with the VB Script that huddlestond posted was that there are multiple FolderItems being set, and then the invoke of install will only work with one of them.

To remedy this here was my change:
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("c:\pb-fonts")
Set objFolderItem1 = objFolder.ParseName("SWMEDITL_0.TTF")
objFolderItem1.InvokeVerb("Install")
Set objFolderItem2 = objFolder.ParseName("SWBLACK_0.TTF")
objFolderItem2.InvokeVerb("Install")
Set objFolderItem3 = objFolder.ParseName("SWBLKITL_0.TTF")
objFolderItem3.InvokeVerb("Install")
Set objFolderItem4 = objFolder.ParseName("SWLIGHT_0.TTF")
objFolderItem4.InvokeVerb("Install")
Set objFolderItem5 = objFolder.ParseName("SWLTOB_0.TTF")
objFolderItem5.InvokeVerb("Install")
Set objFolderItem6 = objFolder.ParseName("SWMED_0.TTF")
objFolderItem6.InvokeVerb("Install")
Set objFolderItem7 = objFolder.ParseName("SWMEDBI_0.TTF")
objFolderItem7.InvokeVerb("Install")
Set objFolderItem8 = objFolder.ParseName("SWMEDBLD_0.TTF")
objFolderItem8.InvokeVerb("Install")
Posted by: Kdebiasse 9 years ago
9th Degree Black Belt
0
Thanks This script works
Posted by: dchristian 13 years ago
Red Belt
0
I usually copy the fonts using batch to the fonts folder.

When you use batch though, the fonts still need to be registered.

To register add an entry to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

It takes a reboot for them to show up.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ