Jump to content

Recommended Posts

Posted

How do you guys deploy your fonts?

 

I have found some scripts which are suppose to del the fonts if found and then recopy them into the systemroot / fonts folder. It then goes on to register these fonts using a .reg file.

 

However after i had placed the batch file into a group policy linked to an OU it does not run the script.

 

I manually ran it at the client and then confirmed that the fonts were indeed in the fonts folder.

 

I opened word 2003 and found that they were not in the fonts list?

 

How can i resolve this issue. It has been ongoing now for a bit and staff are starting to complain now.

 

Hope you can help.

 

Thanks.

Posted

Did you restart the machine you ran the script on. As far as i remember, when you install a true type font you need to do 2 things. First is copy the font into the font folder and the second is to make the appropriate edits to reg. It would seem that you are doing that so the only thing you need to do is to reboot as it doesnt pick up the font straight away.

 

If its not that then i would imagine the reg edit is wrong.

Posted

can't believe i forgot to reboot.

 

But if the font gets deleted and then re-copied and then re-registered, will it just turn into a continuous loop?

Posted
can't believe i forgot to reboot.

 

But if the font gets deleted and then re-copied and then re-registered, will it just turn into a continuous loop?

 

surely it would be more efficient to only add new fonts... a simple if exist statement should do the trick.

Posted
can't believe i forgot to reboot.

 

But if the font gets deleted and then re-copied and then re-registered, will it just turn into a continuous loop?

 

:lol: Well sort of i guess but the reason you reboot is so the reg info is loaded in properly. Therefore even if you re-copy and re-register it it kinda dont matter cause the settings are there from when you did it first, and all thats done is that you've written over it but the settings were there when it rebooted. Thats how i understand it anyway, it only causes an issue if you change the reg to something different each time then the latest settings wont be taken till its rebooted. :oops: ok i think i know what im saying but i think its coming out all confusing lol

Posted

This is the script I use - you'd need to change the array of font file names and font name as well as server locations to match - it runs at machine startup and seems to work :-)

 

Sub InstallFonts
 on error resume next
 sFontFolder="c:\windows\fonts\"
 sFonts=array("hum521i.TTF")
 sFontNames=array("Humanist 521 Italic BT (Truetype)")
 for i=lbound(sFonts) to uBound(sFonts)
   if not ofso.fileexists(sFontFolder & sFonts(i)) then
     ofso.copyfile "\\server\share\stdfonts\" & sFonts(i),sFontFolder
     oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\" & sFontNames(i), sFonts(i), "REG_SZ"
   end if
 next
 on error goto 0
End Sub

  • 5 months later...
Posted

Hello,

 

So i tried the script Yesterday (which was Monday just not the one i intended on) and it seems to not be able to copy the fonts over. I edited the script array to add the fonts i needed and also the server name and share part but it still seems to not do anything.

 

Here is the script as it stands now.

 

Sub InstallFonts

on error resume next

sFontFolder="c:\windows\fonts\"

sFonts=array("SAPI.TTF","SAPIB.TTF","SAPT.TTF","SAPTB.TTF")

sFontNames=array("SassoonPrimaryInfant Regular (TrueType)","SassoonPrimaryInfant Bold (TrueType)","SassoonPrimaryType Regular (TrueType)","SassoonPrimaryType Bold (TrueType)")

for i=lbound(sFonts) to uBound(sFonts)

if not ofso.fileexists(sFontFolder & sFonts(i)) then

ofso.copyfile "\\servername\Fonts$\" & sFonts(i),sFontFolder

oShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\" & sFontNames(i), sFonts(i), "REG_SZ"

end if

next

on error goto 0

End Sub

 

I set it in Group policy to run as a start up script on the Computer OU. It runs without any errors and gets to the login prompt fine. I have checked to see if it registers in the reg but that also has not happened either.

 

Any ideas?

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