Jump to content

Recommended Posts

Posted
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
Posted
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

Posted (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 by witch
  • Thanks 1
Posted
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?!

Posted

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!

Posted
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

  • 1 month later...
Posted

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

Posted
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!

  • 1 month later...
Posted

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.

Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...