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
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)
Please log in to answer
Posted by:
anonymous_9363
13 years ago
Posted by:
WaPensFan76
8 years ago
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 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")
objFolderItem2.InvokeVerb("Install")
Set objFolderItem3 = objFolder.ParseName("SWBLKITL_0.TTF")
objFolderItem3.InvokeVerb("Install")
objFolderItem3.InvokeVerb("Install")
Set objFolderItem4 = objFolder.ParseName("SWLIGHT_0.TTF")
objFolderItem4.InvokeVerb("Install")
objFolderItem4.InvokeVerb("Install")
Set objFolderItem5 = objFolder.ParseName("SWLTOB_0.TTF")
objFolderItem5.InvokeVerb("Install")
objFolderItem5.InvokeVerb("Install")
Set objFolderItem6 = objFolder.ParseName("SWMED_0.TTF")
objFolderItem6.InvokeVerb("Install")
objFolderItem6.InvokeVerb("Install")
Set objFolderItem7 = objFolder.ParseName("SWMEDBI_0.TTF")
objFolderItem7.InvokeVerb("Install")
objFolderItem7.InvokeVerb("Install")
Set objFolderItem8 = objFolder.ParseName("SWMEDBLD_0.TTF")
objFolderItem8.InvokeVerb("Install")
objFolderItem8.InvokeVerb("Install")
Posted by:
dchristian
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.