johnnyr Posted February 13, 2011 Posted February 13, 2011 Hi Everyone, I am looking to deploy a font to all machines within the network...how can this be done? Thanks!
witch Posted February 14, 2011 Posted February 14, 2011 I do it by running a script and applying it to the highest level policy in GP as computer settings, startup script etc. Works well
johnnyr Posted February 14, 2011 Author Posted February 14, 2011 I do it by running a script and applying it to the highest level policy in GP as computer settings, startup script etc. Works well Thanks for that. Do you have a copy of the script you are willing to post? Thanks
witch Posted February 14, 2011 Posted February 14, 2011 (edited) If I can find it!! *I think I am in the wrong school but I found this: on error resume next Const FONTS = &H14 dim oFSO,oShell, oFolder1, oFolder2, sRoot sRoot="\\dcserver01\Shared Resources\fonts\" Set oShell = CreateObject("Shell.Application") set oFSO= CreateObject("scripting.filesystemobject") Set oFolder1 = oShell.Namespace(FONTS) set oFolder2=ofso.getfolder(sRoot) for each oFile in oFolder2.files sName=lcase(oFile.name) if right(sName,4)=".ttf" then if not ofso.fileexists(oFolder1.self.path & "\" & sName) then oFolder1.copyhere sRoot & sName end if end if next on error goto 0 Can someone tell me if that's it? Edited February 14, 2011 by witch 1
johnnyr Posted February 14, 2011 Author Posted February 14, 2011 If I can find it!! *I think I am in the wrong school but I found this: on error resume next Const FONTS = &H14 dim oFSO,oShell, oFolder1, oFolder2, sRoot sRoot="\\dcserver01\Shared Resources\fonts\" Set oShell = CreateObject("Shell.Application") set oFSO= CreateObject("scripting.filesystemobject") Set oFolder1 = oShell.Namespace(FONTS) set oFolder2=ofso.getfolder(sRoot) for each oFile in oFolder2.files sName=lcase(oFile.name) if right(sName,4)=".ttf" then if not ofso.fileexists(oFolder1.self.path & "\" & sName) then oFolder1.copyhere sRoot & sName end if end if next on error goto 0 Can someone tell me if that's it? Thanks for that. So if I am right I guess I only have to change the highlighted bits below: *I think I am in the wrong school but I found this: on error resume next Const FONTS = &H14 dim oFSO,oShell, oFolder1, oFolder2, sRoot sRoot="SERVER NAME AND SHARE" Set oShell = CreateObject("Shell.Application") set oFSO= CreateObject("scripting.filesystemobject") Set oFolder1 = oShell.Namespace(FONTS) set oFolder2=ofso.getfolder(sRoot) for each oFile in oFolder2.files sName=lcase(FONT NAME LESS .TTF) if right(sName,4)=".ttf" then if not ofso.fileexists(oFolder1.self.path & "\" & sName) then oFolder1.copyhere sRoot & sName end if end if next on error goto 0 Hope thats right?!
TechSupp Posted February 14, 2011 Posted February 14, 2011 T6hink if I read it correct (and I'm not the worlds best programmer!) you only need to change the server name and share bit. The font bit stays the same as its just searching the shared resource folder for all files that end in .ttf and then looping through them, copying them if they match the .ttf format. Glad I looked as I was looking for something like this!
witch Posted February 14, 2011 Posted February 14, 2011 T6hink if I read it correct (and I'm not the worlds best programmer!) you only need to change the server name and share bit. The font bit stays the same as its just searching the shared resource folder for all files that end in .ttf and then looping through them, copying them if they match the .ttf format. Glad I looked as I was looking for something like this! Ah - that would explain why it looked odd to me - I couldnt see the name of the font - but you are right I think, it just looks for all .ttf files
Arthur Posted March 31, 2011 Posted March 31, 2011 Just come across a couple of nifty PowerShell scripts from Microsoft which can be used to install and delete fonts so thought it would be worth posting. The best thing about these scripts are that they support every font format Windows does (.fon, .fnt, .ttf, .ttc, .otf, .mmm, .pbf and .pfm) and will notify running applications of the changes. Source: http://blogs.technet.com/b/deploymentguys/archive/2010/12/04/adding-and-removing-fonts-with-windows-powershell.aspx Examples... Add-Font.ps1 -file "X:\Fonts\MyFont.ttf" Add-Font.ps1 -folder "\\Server\Fonts" Remove-Font.ps1 -file "MyFont.ttf"PS_FontScripts.7z
johnnyr Posted April 3, 2011 Author Posted April 3, 2011 Just come across a couple of nifty PowerShell scripts from Microsoft which can be used to install and delete fonts so thought it would be worth posting. The best thing about these scripts are that they support every font format Windows does (.fon, .fnt, .ttf, .ttc, .otf, .mmm, .pbf and .pfm) and will notify running applications of the changes. Source: Adding and Removing Fonts with Windows PowerShell - The Deployment Guys - Site Home - TechNet Blogs Examples... Add-Font.ps1 -file "X:\Fonts\MyFont.ttf" Add-Font.ps1 -folder "\\Server\Fonts" Remove-Font.ps1 -file "MyFont.ttf" Thanks, will take a look!
test258 Posted May 30, 2011 Posted May 30, 2011 Sadly the Type 1 fonts are not supported in the script # Type 1 fonts require handling multiple resource files. # Not supported in this script #$hashFontFileTypes.Add(".mmm", "") #$hashFontFileTypes.Add(".pbf", "") #$hashFontFileTypes.Add(".pfm", "") This is the thing I need to cover, but cannot find any suitable solution and the fact that Type 1 fonts are written to registries as MultiString Values makes this matter complicated to handle... Thanks anyway.
Arthur Posted May 30, 2011 Posted May 30, 2011 Not sure how I missed that. Sadly the Type 1 fonts are not supported in the script Probably the easiest thing to do would be to convert the Type 1 fonts into another format. There's a website that will do this for you (for free) here: http://onlinefontconverter.com/
mac_shinobi Posted May 30, 2011 Posted May 30, 2011 or when its summer holidays you could create a new image inclusive of the fonts, latest java, flash, shockwave, a video player ( vlc / windows media player classic home cinema or the likes ) and the default stuff and do it that way and any other software you can use GPO to install / remove it depending on if its joined to the domain such as Microsoft Office via MSI
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now