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
   Set objFont = objNameSpace.ParseName(objFile.Name)
   Wscript.Echo "Installed Font: " & objFile.Name
   Set objFont = Nothing
  End If
 End If
 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.
0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



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



Answered 02/13/2013 by: dunnpy
Red Belt

  • Commenting out the 'Wscript.Echo' lines worked perfectly!
Please log in to comment
Answer this question or Comment on this question for clarity



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