字体安装2.0
由于字体安装之前的批处理采用字体文件复制到c:\windows\fonts下再注册注册表的方式,一部分字体安装不上,重新修改了批处理方式。
一. 字体安装批处理
1.vbs脚本运行安装D:\fonts下的字体安装包,安装时fonts.vbs同时会检测C:\windows\fonts\字体名称与D:\fonts里的字体名是否一致,如果存在则忽略掉。缺点:若是表面字体名不一致,会提示重复安装,手动单击选择即可。
参考的事例:
http://blog.jasondahmen.com/2011/11/24/the-true-ultimate-font-install-for-windows-7-and-xp-vbs/
代码如下fonts.vbs
Option Explicit
' Installing multiple Fonts in Windows 7
' http://www.cloudtec.ch 2011
' Edited by Jason Dahmen
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")
str