#188594 - 2008-07-07 08:54 PM
Re: Convert small VBScript to KiXtart
[Re: GTManor]
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Here is another way that we have done this.. It is not as eloqent as Lonk's version, but is servicable..
FONT('3of9.ttf','3 of 9 Barcode (TrueType)') ;INSTALL FONT
The UDF is:
; -- INSTALL FONT - ALL
FUNCTION font($font,$description)
DIM $rc
IF COMPAREFILETIMES(@ldrive+'\Programs\'+$font,'%windir%\fonts\'+$font)
COPY @ldrive+'\Programs\'+$font '%windir%\fonts'
$rc=WRITEVALUE('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts',$description,$font,'REG_SZ')
ENDIF
ENDFUNCTION
Thanks,
Kent
|
|
Top
|
|
|
|
#188620 - 2008-07-08 09:09 PM
Re: Convert small VBScript to KiXtart
[Re: GTManor]
|
GTManor
Fresh Scripter
Registered: 2008-07-07
Posts: 6
Loc: Cincinnati, OH, USA
|
Same results using your offering as well. My users have local admin rights on their computers. The fonts are copied to the %windir%\fonts folder and the registry entries are made, but the fonts are not available in an application until you browse the %windir%\fonts folder. Am I missing something? I am currently using your UDF and the following code in my test script:
IF INGROUP("TEST")
? "Starting the Avenir Fonts installation..." ? ?
? "Please be patient..." ? ?
FONT('lte50342.ttf','Avenir LT 45 Book (TrueType)')
FONT('lte50343.ttf','Avenir LT 45 Book Oblique (TrueType)')
FONT('lte50344.ttf','Avenir LT 65 Medium (TrueType)')
FONT('lte50345.ttf','Avenir LT 65 Medium Oblique (TrueType)')
FONT('lte50346.ttf','Avenir LT 95 Black (TrueType)')
FONT('lte50347.ttf','Avenir LT 95 Black Oblique (TrueType)')
ENDIF
|
|
Top
|
|
|
|
#188633 - 2008-07-09 02:36 PM
Re: Convert small VBScript to KiXtart
[Re: GTManor]
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
I will dig into this when I get into the office.
Kent
|
|
Top
|
|
|
|
#188640 - 2008-07-09 06:20 PM
Re: Convert small VBScript to KiXtart
[Re: Kdyer]
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
I am not sure what the problem is.. I have used the code with quite a few machines..
The only things that come to mind are: Are the files "Read only"? Is there a permission set? That is, did they come off of a CD and the files may not be quite right...
On another thought.. You could script out the following..
explorer.exe /e,/n,%windir%\fonts
Then, kill Explorer...
Thanks,
Kent
Edited by Kdyer (2008-07-09 06:23 PM)
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 661 anonymous users online.
|
|
|