Re: Automate window fonts installation



I use the following
' Start of script
Option Explicit

Dim strAddedFonts, updated, sComputer, fso, oReg, strRegValue, sFontName, sFontFile, strIFN


Const HKLM = &H80000002


sComputer = InputBox("What is the computername ","Register Fonts","COMPUTERNAME",1,1)
updated= "Following fonts have been"&vbCr &"registed on "&sComputer &vbCr &vbcr


Set Fso = CreateObject("Scripting.FileSystemObject")
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sComputer & "\root\default:StdRegProv")
strRegvalue = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"


sFontName = "Kartika (TrueType)"
sFontFile ="Kartika.ttf"
FontUpdate ()

sFontName = "Elephant (TrueType)"
sFontFile ="ELEPHNT.TTF"
FontUpdate ()


msgbox updated


Function FontUpdate ()
' in here place routine to copy fonts from a central repository
' to the target PC

strIFN = "\\"&sComputer &"\C$\Windows\Fonts\"&sFontFile
If Fso.FileExists(strIFN) Then
updated = updated & sFontFile &VbCr
oReg.SetStringValue HKLM, strRegvalue, sFontName, sFontFile
end if
End function

' end of script
Ian

On 24 May 2005 11:31:12 -0700, "citizen" <diportnoy@xxxxxxxxx> wrote:

>I need to install new font on all the 200+ PC's in the Windows 2000
>domain. All stations are Windows XP SP1/SP2.
>
>I there any way to install new fonts either with login script or
>policies, using vbscript or freeware app?
>
>Thank you

.



Relevant Pages

  • RE: Deploying Fonts on 100 Computers
    ... script this, or you might try running it as a machine script rather than a ... user script to do the write under the machine account. ... "Haroon Malik" wrote: ... To install standard windows fonts, you need to get the .ttf or .fon files ...
    (microsoft.public.windows.server.active_directory)
  • Re: I see no script fonts in my WORD 2003
    ... Go to Control Panel | Add or Remove Programs, select Microsoft Office ... Features and check the box for a custom install. ... Fonts is under Office Shared Features. ... >> Edwardian Script, Freestyle Script, French Script, Kunstler Script, ...
    (microsoft.public.word.docmanagement)
  • Re: problem using FileSystemObject
    ... > When I came to the FileSystemObject I found IIS hangs on OpenTextFile. ... > I'm using the Script Debugger and executing one command at a time and it ... Set fso = Server.CreateObject ... > ' fails here ...
    (microsoft.public.inetserver.asp.general)
  • Re: Running FTP script and waiting for answer...can I set "timeout"
    ... Try this command to change default script engine to cscript from wscript ... I'm running ftp "run command" every 2 minuteto lookup new ... I can give you a copy of my script for you to scan... ... Set Fso = Wscript.Createobject ...
    (microsoft.public.scripting.vbscript)
  • Re: Running FTP script and waiting for answer...can I set "timeout"
    ... Try this command to change default script engine to cscript from wscript ... I'm running ftp "run command" every 2 minuteto lookup new ... I can give you a copy of my script for you to scan... ... Set Fso = Wscript.Createobject ...
    (microsoft.public.scripting.vbscript)