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

Comments

Please log in to comment

Community Chosen Answer

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.
Answered 02/20/2011 by: VBScab
Red Belt

Please log in to comment
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 02/22/2011 by: dchristian
Red Belt

Please log in to comment
0
Thanks This script works
Answered 04/29/2015 by: Kdebiasse
Sixth Degree Black Belt

Please log in to comment
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")
Answered 01/08/2016 by: WaPensFan76
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity