I am fairly new to scripting. I have to deploy fonts for over 100 computers. I font a script at https://www.geekshangout.com/vbs-script-to-install-a-font/ which works fine on machines that does not have the fonts. But if there is a font it prompts to hit YES/NO to replace the font.I am trying to deploy 18 fonts. I there any way to replace the existing font without prompting or just take automatically yes as an input. The Script that I found is
`Option Explicit
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")
strFontSourcePath = "\\it\Deployments\(Dell setup)\Office fonts\FILES\Maison Neue MG [DESK]"
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(wshShell.SpecialFolders("Fonts") & objFile.Name) = False Then
Set objFont = objNameSpace.ParseName(objFile.Name)
objFont.InvokeVerb("Install")
Set objFont = Nothing
End If
End If
Next
Else
Wscript.Echo "Path not found"
End If
Wscript.Echo "Installation Complete :)"`