Temporarily register fonts using a normal User account

As you may know Windows is quite stiff sometimes. You can’t add additional font directories like you’d do on Unix. Another stiffy problem is that Windows requires an elevated account for operations like installing/removing fonts from the system. That’s quite troublesome at times.

This is exactly when my little tool jumps in. With RegisterFont you can add a number of fonts to your font cache without using an elevated user account. The downside is that all the changes persist only ’till the next reboot; Windows will rebuild it’s cache and the changes will be lost.

Anyway, the archive contains a binary as well as the C# sourcecode to this small utility. Use it like that:

RegisterFont.exe add font1.ttf font2.ttf font3.ttf … font1000.ttf

Easy, huh? If you don’t want to add fonts but remove them, substitute the “add” parameter with “rem” and you’ll be set. I didn’t bother to link up to the MSDN entries explaining the API, this is just a quick and dirty tool I wrote because we were in need of a quick solution to a problem :) .

8 Responses to “Temporarily register fonts using a normal User account”


  • Hi

    After appending to Target line, I run the app but I get a “RegisterFont has encountered a problem and needs to close. We are sorry for the inconvenience” message.

    What can I do to stop this? Thanks

  • [quote comment=""]Hi

    After appending to Target line, I run the app but I get a “RegisterFont has encountered a problem and needs to close. We are sorry for the inconvenience” message.

    What can I do to stop this? Thanks[/quote]
    It’d help me if you could post the exact command-line you used to launch the program :) .

  • [quote comment=""][quote comment=""]Hi

    After appending to Target line, I run the app but I get a “RegisterFont has encountered a problem and needs to close. We are sorry for the inconvenience” message.

    What can I do to stop this? Thanks[/quote]
    It’d help me if you could post the exact command-line you used to launch the program :) .[/quote]

    I’m getting this as well. “X:\registerfont add Charlem0.otf”. Application Error is “The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.

  • this utility needs .net framework 2.0 isnt there anyway to install fonts without .net framework?
    if so pls tell me.
    anyway this is a nice work pal.
    I have a solution but its bit lengthy but it dont need anything but the font :) if u r interested just drop me a mail.

  • pahan, you can always use the API call in C++ directly, that’d allow you to to circumvent .net dependencies.

    The original purpose was to quickly register a font, so I’m still quite content with the way it works :) .

  • Hi

    Many thanks. Very useful – saved me from big problems as I am at home in the holidays with a work pc andd no handy tech support guy with admin rights.

    Just an idea – could this be made to add or rem all the fonts in a fonts directory? Maybe with wildcards eg somthing like:

    registerfont.exe add \fonts\*.otf \fonts\*.ttf

    Regards

    Andy

  • Yes Andy it’s possible with a batch file. EG

    pushd c:\temp\fonts; For %f in (*.*) do registerfont %f; popd

    Ensure registerfont is either in the folder or the path.

    This has been discussed at length at
    http://social.technet.microsoft.com/Forums/en-US/w7itprosecurity/thread/9a0938f5-9851-48bd-bbe8-8078647b6fd2/

    Hope this helps
    Chris

  • could you compile a version of this that does not require the user to have .NET Framework 2.0 ? or include the DLL’s that it needs?

    i do not have administrator privileges at work and hence can’t run RegisterFont without getting the error: “The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.”

    if i did have administrator privileges i would be able to install .NET Framework 2.0 but in that case i would just be able to install the fonts i need, and wouldn’t need this fix

    this application should be usable by the target audience, namely users without administrative privileges or any other special software that doesn’t come with windows out of the box

Leave a Reply