2
edits
Changes
Fonts
,→Example using a VBscript
</source>
Or, to install all .ttf , .otf, .pfm, .fon files from the folder containing your FontInstall.vbs script:
<source lang="vb">
Const FONTS = &H14& Set objShell = CreateObject("Shell.Application")Set ofso = CreateObject("Scripting.FileSystemObject") SourceFolder = ofso.GetParentFolderName(Wscript.ScriptFullName)Set oSource = objShell.Namespace(SourceFolder)Set oWinFonts = objShell.Namespace(FONTS) ' 4 f*ing lines instead of just "if (/\.ttf$/i)". I hate VBscript!!!Set rxTTF = New RegExprxTTF.IgnoreCase = TruerxTTF.Pattern = "\.ttf$"
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Pattern = "([A-Za-z0-9\s]+_*?)(_[^_]*)?(\.(ttf|otf|pfm|fon))$"
FOR EACH FontFile IN oSource.Items()
NEXT
</source>