Changes

Fonts

2,075 bytes added, 18:06, 8 August 2014
Sample XML for installing fonts with robocopy and fontreg
fontreg.exe /copy
</pre>
This will copy all font files from the current directory to the windows font directory and registry register them.  == Example XML == Since WPKG doesn't support foreach loops or expanding lists, you might want to write a script to make package definitions if you have a lot of fonts to make packages for. This package does not force a reboot, but the fonts it installs might not be visible to applications until after the computer's restarted. <source lang="xml"><?xml version="1.0" encoding="UTF-8"?><packages> <package id="MyNiceFont" name="myfont" revision="1" reboot="false" priority="2">  <variable name="FONTREG_PATH" value="%SOFTWARE%\tools\fontreg-2.1.3-redist\bin.x86-32\FontReg.exe" architecture="x86" /> <variable name="FONTREG_PATH" value="%SOFTWARE%\tools\fontreg-2.1.3-redist\bin.x86-64\FontReg.exe" architecture="x64" />  <check type="file" condition="exists" path="%WINDIR%\fonts\MyFontCGaugeItalic.otf" /> <check type="file" condition="exists" path="%WINDIR%\fonts\MyFontDGaugeItalic.otf" /> <check type="file" condition="exists" path="%WINDIR%\fonts\MyFontAGauge.otf" /> <check type="file" condition="exists" path="%WINDIR%\fonts\MyFontBGauge.otf" /> <!-- et cetera, one for each file -->  <install cmd='"%COMSPEC%" /c robocopy /z /np /ndl /nfl /njh /njs "%SOFTWARE%\fonts\MyFont" "%WINDIR%\fonts" MyFontCGaugeItalic.otf MyFontDGaugeItalic.otf MyFontAGauge.otf MyFontBGauge.otf ' > <exit code="0" /> <exit code="1" /> <exit code="2" /> <exit code="3" /> </install>  <upgrade include="install" />  <remove cmd='"%COMSPEC%" /c del "%WINDIR%\fonts\MyFontCGaugeItalic.otf"'> <exit code = "any" /> </remove> <remove cmd='"%COMSPEC%" /c del "%WINDIR%\fonts\MyFont\DGaugeItalic.otf"'> <exit code = "any" /> </remove> <remove cmd='"%COMSPEC%" /c del "%WINDIR%\fonts\MyFontAGauge.otf"'> <exit code = "any" /> </remove> <remove cmd='"%COMSPEC%" /c del "%WINDIR%\fonts\MyFontBGauge.otf"'> <exit code = "any" /> </remove> <!-- etc, one for each file -->  <remove cmd="%FONTREG_PATH%" /> </package> </packages> </source>
= MSI package Method =
Anonymous user