I need to deploy barcode fonts to about 600 machines.  I found a script that succesfully installs the fonts, but relies on user intervention, I would like to remove their intervention altogether. I created an online shell script to deploy the fonts, and I use commandline wscript "barcode fonts.vbs" to call on the VB script. Here is my VB script:

Option Explicit
' Installing multiple Fonts in Windows 7

Dim objShell, objFSO, wshShell
Dim strFontSourcePath, objFolder, objFont, objNameSpace, objFile

Set objShell = CreateObject("Shell.Application")
Set wshShell = CreateObject("WScript.Shell")
Set objFSO = createobject("Scripting.Filesystemobject")

Wscript.Echo "--------------------------------------"
Wscript.Echo " Install Fonts "
Wscript.Echo "--------------------------------------"
Wscript.Echo " "

strFontSourcePath = "\\Servername\share\Barcode Fonts\"

If objFSO.FolderExists(strFontSourcePath) Then

Set objNameSpace = objShell.Namespace(strFontSourcePath)
Set objFolder = objFSO.getFolder(strFontSourcePath)

For Each objFile In objFolder.files
 If LCase(right(objFile,4)) = ".ttf" OR LCase(right(objFile,4)) = ".otf" Then
  If objFSO.FileExists("C:\Windows\Fonts\" & objFile.Name) Then
   Wscript.Echo "Font already installed: " & objFile.Name
  Else
   Set objFont = objNameSpace.ParseName(objFile.Name)
   objFont.InvokeVerb("Install")
   Wscript.Echo "Installed Font: " & objFile.Name
   Set objFont = Nothing
  End If
 End If
Next
Else
 Wscript.Echo "Font Source Path does not exists"
End If

 

Answer Summary:
Remove or comment out the 'Wscript.Echo' lines and it should run through without the pop-ups.
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

Remove or comment out the 'Wscript.Echo' lines and it should run through without the pop-ups.

 

Dunnpy

Answered 02/13/2013 by: dunnpy
Red Belt

  • Commenting out the 'Wscript.Echo' lines worked perfectly!
Please log in to comment

Answers

0

Why not just extract a zip of all the fonts directly to: %windir%\fonts?

Windows is "smart enough" to automatically detect them.

Answered 02/13/2013 by: afincher
Purple Belt

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