Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
SourcePath = '\\server\share' FontFileName = 'sample.ttf' objShell = CreateObject("Shell.Application") objFolder = objShell.Namespace(SourcePath) objFolderItem = objFolder.ParseName(FontFileName) colVerbs = objFolderItem.Verbs ForEach objVerb in colVerbs If StrIndexNC(objVerb.name,'&I',1,@FWDSCAN) != 0 || StrIndexNC(objVerb.name,'Install',1,@FWDSCAN) != 0 objVerb.DoIt Break EndIf NextReference:http://blogs.technet.com/b/rspitz/archive/2010/09/25/how-to-install-a-font-from-the-command-line-on-windows-7.aspx
This sample shows how to install a font on NT/2000/XP+ systems. This example assume the font file is myfont.ttf in the current directory, and the title of the font is "My Font (TrueType)"
;Installing a font in Windows NT/2000/XP ;---------------------------------------- ;Get path to font directory and copy font FontDir=RegQueryEx(@REGCURRENT,"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders[Fonts]","",1) FileCopy("myfont.ttf",FontDir,@FALSE) ;Register font FontKey=RegOpenKey(@REGMACHINE,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts") RegSetValue(FontKey,"[My Font (TrueType)]","myfont.ttf") RegCloseKey(FontKey) ;Add the font to the font system DllName=StrCat(DirWindows(1),"gdi32.dll") DllCall(DllName,LONG:"AddFontResourceA",lpstr:"myfont.ttf") ;Inform running apps about the new font IntControl(22,-1,29,0,0) ;The last line is only needed if currently running applications should be informed about the ;font addition. All apps started after the installation will recognize the new font even ;without the IntControl call.
Article ID: W15985
File Created: 2013:10:15:09:55:48
Last Updated: 2013:10:15:09:55:48