0

When we install a Micr font to a machine that doesn't currently have it, a reboot is required. So what I am trying to do in Wix is search for the Micr font file (STTTF5.TTF), and if it is not there reboot once the install is complete. Right now it is rebooting every time. Thoughts?

<Property Id="FILEEXISTS">
    <DirectorySearch Id="CheckFileDir" Path="INSTALLDIR" Depth="0"> 
    <FileSearch Id="CheckFile" Name="STTTF5.TTF" />
    </DirectorySearch>
</Property>

<InstallExecuteSequence>
    <ScheduleReboot After='InstallFinalize'>NOT FILEEXISTS</ScheduleReboot>
</InstallExecuteSequence>

<DirectoryRef Id="FontsFolder">
        <Component Id="InstallFonts" Guid="{6B971616-44B5-430c-AC4B-13343710772C}">
            <File Id="CALIBRI.TTF" Source="$(env.BUILD_SRC)\fonts\CALIBRI.TTF" TrueType="yes" />
            <File Id="CALIBRIB.TTF" Source="$(env.BUILD_SRC)\fonts\CALIBRIB.TTF" TrueType="yes" />
            <File Id="CALIBRII.TTF" Source="$(env.BUILD_SRC)\fonts\CALIBRII.TTF" TrueType="yes" />
            <File Id="CALIBRIZ.TTF" Source="$(env.BUILD_SRC)\fonts\CALIBRIZ.TTF" TrueType="yes" />
            <File Id="LTe50325.ttf" Source="$(env.BUILD_SRC)\fonts\LTe50325.ttf" TrueType="yes" />
            <File Id="lte51673.ttf" Source="$(env.BUILD_SRC)\fonts\lte51673.ttf" TrueType="yes" />
            <File Id="STTTF5.TTF" Source="$(env.BUILD_SRC)\fonts\STTTF5.TTF" TrueType="yes" />
        </Component>
    </DirectoryRef>
Jim
  • 1
  • Is it a WPF application that uses these fonts? If yes - you can embed the fonts to your application: https://msdn.microsoft.com/en-us/library/ms753303%28v=vs.110%29.aspx – Morten Frederiksen Feb 28 '15 at 08:04
  • No it is not a WPF application. – Jim Mar 02 '15 at 16:27
  • See this and the comment about each font in its own component http://stackoverflow.com/questions/867511/how-to-install-open-type-fonts-using-wix – PhilDW Mar 02 '15 at 18:10

0 Answers0