Jeffrey Renfroe
asked on
Install fonts with vbs
Hello. I need to install new fonts on multiple Windows 7 machines. I found a blog that shows how to install one font using a vbs. Since I need to install multiple fonts, I modified the script.
My questions is were my modifications the best approach or is there a better way to do it?
Thank you for any information.
http://blogs.technet.com/b/rspitz/archive/2010/09/25/how-to-install-a-font-from-the-command-line-on-windows-7.aspx
My questions is were my modifications the best approach or is there a better way to do it?
Thank you for any information.
http://blogs.technet.com/b/rspitz/archive/2010/09/25/how-to-install-a-font-from-the-command-line-on-windows-7.aspx
UNIVCD47
UNIVCD67
Unvr57
Unvr58
Unvr67
Unvr68
Sub UNIVCD47
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
Set objFolderItem = objFolder.ParseName("UNIVCD47.ttf")
objFolderItem.InvokeVerb("Install")
End Sub
Sub UNIVCD67
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
Set objFolderItem = objFolder.ParseName("UNIVCD67.ttf")
objFolderItem.InvokeVerb("Install")
End Sub
Sub Unvr57
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
Set objFolderItem = objFolder.ParseName("Unvr57.ttf")
objFolderItem.InvokeVerb("Install")
End Sub
Sub Unvr58
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
Set objFolderItem = objFolder.ParseName("Unvr58.ttf")
objFolderItem.InvokeVerb("Install")
End Sub
Sub Unvr67
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
Set objFolderItem = objFolder.ParseName("Unvr67.ttf")
objFolderItem.InvokeVerb("Install")
End Sub
Sub Unvr68
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\temp")
Set objFolderItem = objFolder.ParseName("Unvr68.ttf")
objFolderItem.InvokeVerb("Install")
End Sub
There are more efficient ways to do it with loops and by building a list from the directory contents but this works.
Are you wanting an example just so you know?
ASKER
An example would be great if you could show me one.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Figured out how to do with with an array and loop