5

How can I stop installshield from registering fonts?

I've got a number of installshield projects deploying web applications, which all feature GlyphIcons and FontAwesome fonts. Installshield automatically registers these files (*.ttf, *.eot, *.otf) with the operating system.

This is a problem because the file can't be removed for uninstalls or upgrades.

The instructions here or here don't work since those fields simply don't exist in my version of installshield/project type.

Is there another way to disable this behaviour without renaming the files?

reckface
  • 5,678
  • 4
  • 36
  • 62
  • The real problem here is Windows' refusal to allow you to remove the font files. I had to boot into a recovery command line to delete them. – Colin Young Jul 07 '15 at 14:00
  • FWIW, disabling the "RegisterFonts" action doesn't solve the problem. – Colin Young Jul 21 '15 at 16:15
  • If you uninstall the font from Windows, then you can rename the file in your application's font folder or move it, but like you said, you can't delete until a reboot. – reckface Jul 25 '15 at 07:21
  • In our situation we were unable to "uninstall" the fonts. It truly required the recovery console (no permission to execute the delete on reboot options). I was able to eliminate it however. It turned out that the problem fonts were in folders that had been removed but left in the build server artifacts (thus being included in the installer), and there was a custom action that was failing, causing them to be left behind. Fixing both of those made the problem go away. – Colin Young Jul 25 '15 at 20:14
  • I just added a follow-up answer. One thing to try is to check the Font Table in your release MSI to see if it lists any fonts to be registered on the system. If so, remove the fonts from this table and check if this resolves the problem. – Stein Åsmul Oct 24 '17 at 19:12

3 Answers3

6

I found a suggestion on the Installshield forums that seems to work.

To disable font registration:

  1. Go to "Custom Actions and Sequences"
  2. Locate the "RegisterFonts" action under Sequences, Execute
  3. Set the "Conditions" to 0

Disable font registration

reckface
  • 5,678
  • 4
  • 36
  • 62
0

Just want to add that the Font Table in your release MSI file is used to specify fonts that should be registered on the system.

Font entries added here will register the font on the system. You could try to remove the entries from this table to disable the font registration. Check your final, release MSI and not your ISM (Installshield source file).

The registration that happens to the fonts listed in the Font table mirrors what happens when you paste a font into the system's font folder using Windows Explorer - the font is then automatically registered on the system.

It is also possible that font registration can happen via a custom action in your MSI (maybe you took over the project from someone else), and if this is the case you must disable that custom action as well.


There is some information on the font registration process here: http://windowsitpro.com/scripting/trick-installing-fonts-vbscript-or-powershell-script (resurrected from Wayback Machine).

Essentially:

  • Font files copied to the "Fonts folder" via Windows Explorer are registered automagically (the shell copy operation triggers the registration process).
  • Font files copied directly to the "Fonts folder" via a batch file or a VBScript are not automatically registered (use the Shell.Application COM object to register them).
  • UPDATE: September 2018 - Not sure if the above applies to all new OS versions? I haven't taken the time to test.
  • Font files installed to the "Fonts folder" via an MSI are registered as long as they are listed in the MSI's Font table (or they are registered via a custom action).

Let me just duplicate the sample VBScript to register a font from the link above in case the link dies:

Set sa = CreateObject("Shell.Application")
Set fonts  = sa.NameSpace(20)
fonts.CopyHere "C:\tmp\SomeFont.ttf"

in PowerShell (hex 0x14 = 20 dec):

$sa =  new-object -comobject shell.application
$Fonts =  $sa.NameSpace(0x14)
$Fonts.CopyHere ("C:\tmp\SomeFont.ttf")

Those scripts don't impress me much, to put it like that. But there they are :-).

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
0

I'm really late to the game.

I've been having the same problems with the same fonts (awesome and glyphicons and others from 3rd party) and having the same problem of them being registered automatically.

You have to manually remove them from the Font table under the Direct Editor section.

See this HOWTO: https://flexeracommunity.force.com/customer/articles/en_US/HOWTO/Installing-Fonts-Without-Registering-Them-in-the-Registry

Max
  • 3,128
  • 1
  • 24
  • 24