|
|
发表于 2017-6-22 09:41:00
|
显示全部楼层
這個 vbs 可以安裝當前文件夾下的所有字型,
若想連這個檔都省略,那就把這個 .vbs 轉成 .bat 吧
- Set ofso = CreateObject("Scripting.FileSystemObject")
- SourceFolder = ofso.GetParentFolderName(Wscript.ScriptFullName)
- Const FONTS = &H14&
- Set objShell = CreateObject("Shell.Application")
- Set oSource = objShell.Namespace(SourceFolder)
- Set oWinFonts = objShell.Namespace(FONTS)
- ' Lame VBscript needs 4 f*ing lines instead of "if (/\.ttf$/i) " ...
- Set rxTTF = New RegExp
- rxTTF.IgnoreCase = True
- rxTTF.Pattern = "\.ttf$"
- FOR EACH FontFile IN oSource.Items()
- IF rxTTF.Test(FontFile.Path) THEN
- oWinFonts.CopyHere FontFile.Path
- END IF
- NEXT
复制代码 |
评分
-
查看全部评分
|