• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Tsukasa no Hibi

Cloudy Sky. Occasional Rain.

You are here: Home / Blog / Temporarily register fonts using a normal User account

Temporarily register fonts using a normal User account

2008-04-18 by tsukasa 28 Comments

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 ๐Ÿ™‚ .

Update 2010-08-27: dcpurton wrote a tool in C to accomplish the same goal but without the .net dependencies. Best of all: Sourcecode is also available ๐Ÿ™‚ .

Filed Under: Blog Tagged With: C#, Windows

Reader Interactions

Comments

  1. David says

    2008-10-16 at 11:43

    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

    Reply
  2. Tsukasa says

    2008-10-17 at 05:15

    [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 ๐Ÿ™‚ .

    Reply
  3. LRdM says

    2008-10-29 at 16:27

    [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.

    Reply
  4. pahan says

    2009-04-03 at 18:06

    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.

    Reply
  5. Tsukasa says

    2009-04-05 at 13:21

    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 ๐Ÿ™‚ .

    Reply
  6. Andy says

    2009-12-31 at 13:17

    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

    Reply
  7. gudbarnone says

    2010-03-29 at 22:06

    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

    Reply
  8. dark ry says

    2010-05-05 at 21:23

    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

    Reply
  9. dcpurton says

    2010-08-27 at 01:19

    For those wanting a non .NET version, I found a similar need this week, so wrote an implementation in C.

    Grab it from http://marshwiggle.net/regfont/

    Maybe someone else will find this useful.

    cheers

    dc

    Reply
  10. Tsukasa says

    2010-08-27 at 05:14

    Very cool dcpurton!
    Added a link to the post ๐Ÿ™‚ .

    Reply
  11. Chris says

    2010-09-09 at 04:25

    Great work guys :):)
    A fine example of collaborative development!
    I have been looking for this solution for a while. See my posts on http://social.technet.microsoft.com/Forums “UAC stops standard users from installing fonts”
    I will be updating this now to direct people to both your sites.
    Chris

    Reply
  12. kurt says

    2010-10-16 at 10:21

    download regfont.exe from http://marshwiggle.net/regfont/

    copy fonts to folder: C:\Temp\fonts\
    copy regfont.exe to C:\Temp\fonts\
    copy shortcut of regfont.exe C:\Temp\fonts\

    in properies of shortcut in target field paste:
    C:\Temp\fonts\regfont.exe -a C:\Temp\fonts\*.ttf

    of course you can chance folders names ect. and .ttf maybe even *.* (every file) will be ok

    cheers and thx for help!

    Reply
  13. Tai says

    2012-03-29 at 05:02

    this link is dead ๐Ÿ™ http://marshwiggle.net/regfont/

    Reply
  14. Ben Malkevitch says

    2012-03-29 at 18:45

    4 years later, still works like a charm. Stupid Windows, smart Tsukasa. Thanks! Ben

    Reply
  15. Tsukasa says

    2012-03-29 at 18:58

    Tai: If you’re in a corporate environment and use Windows 7 you can run my .net-based version without having to install any prerequisites. It’s a shame dcpurton’s site is down, though.

    Ben: Thanks, Microsoft should really fix that sort of thing – there’s virtually no reason why we can’t have a per-user font directory in a profile – even in a synchronized or roaming profile.

    Reply
  16. dcpurton says

    2012-06-16 at 08:28

    Hi everyone,

    Sorry the marshwiggle.net link is not working. My server died and I haven’t had time to get it back online yet.

    Feel free to email me if you want a copy of regfont.

    My email address is dcpurton@marshwiggle.net

    David

    Reply
    • dcpurton says

      2012-06-20 at 03:16

      Emailing executables turns out to be a pain with many mail servers.

      So try this link:

      https://docs.google.com/open?id=0B1NmJ1DK99fpaUZGUjdFRWhGVzA

      David

      Reply
    • dcpurton says

      2013-02-23 at 15:00

      I’ve put up a new version on a temporary (long term temporary it seems) marshwiggle.net. See http://marshwiggle.net/regfont

      Reply
  17. Mike says

    2012-06-28 at 13:57

    Hi

    i am very sorry , but my windows xp give some error:

    Error adding …

    ———————-cut—————-
    Verzeichnis von C:\temp\fonts

    28.06.2012 14:50 .
    28.06.2012 14:50 ..
    20.10.2004 20:07 53.960 #44v2.ttf
    20.10.2004 20:06 53.548 #44v2c.ttf
    20.10.2004 20:06 55.524 #44v2e.ttf
    20.10.2004 20:06 57.144 #44v2i.ttf
    20.10.2004 20:07 116.540 #44v2s.ttf
    08.11.2001 22:32 678 Cocon-BoldExp.pfm
    08.11.2001 22:32 32.522 Cocon-Light.pfb
    08.11.2001 22:32 682 Cocon-Light.pfm
    10.11.2001 13:57 0 Cocon-LightCondensed.pfb
    08.11.2001 22:32 700 Cocon-LightCondensed.pfm
    08.11.2001 22:32 19.557 Cocon-LightConExp.pfb
    08.11.2001 22:32 694 Cocon-LightConExp.pfm
    08.11.2001 22:32 19.648 Cocon-LightExp.pfb
    08.11.2001 22:32 688 Cocon-LightExp.pfm
    08.11.2001 22:32 32.783 Cocon-Regular.pfb
    08.11.2001 22:32 678 Cocon-Regular.pfm
    08.11.2001 22:32 32.600 Cocon-RegularCondensed.pfb
    08.11.2001 22:32 19.082 Cocon-RegularConExp.pfb
    08.11.2001 22:32 684 Cocon-RegularConExp.pfm
    08.11.2001 22:32 19.122 Cocon-RegularExp.pfb
    08.11.2001 22:32 681 Cocon-RegularExp.pfm
    16.06.2012 16:03 16.384 regfont.exe
    28.06.2012 14:48 573 regfont.exe.lnk
    23 Datei(en) 534.472 Bytes
    2 Verzeichnis(se), 80.175.673.344 Bytes frei

    C:\temp\fonts>regfont.exe -a #44v2.ttf
    Successfully added font #44v2.ttf.

    C:\temp\fonts>regfont.exe -a *.ttf
    Error adding *.ttf.

    C:\temp\fonts>regfont.exe -a “*.ttf”
    Error adding *.ttf.

    C:\temp\fonts>regfont.exe -a “*.PFM | *.PFB”
    Error adding *.PFM | *.PFB.

    C:\temp\fonts>regfont.exe -a “Cocon-Light.PFM | Cocon-Light.PFB”
    Error adding Cocon-Light.PFM | Cocon-Light.PFB.

    C:\temp\fonts>regfont -a “Cocon-Light.PFM | Cocon-Light.PFB”
    Error adding Cocon-Light.PFM | Cocon-Light.PFB.

    C:\temp\fonts>regfont -a Cocon-Light.PFM
    Error adding Cocon-Light.PFM.

    C:\temp\fonts>regfont -a Cocon-Light.pfb
    Error adding Cocon-Light.pfb.

    C:\temp\fonts>regfont -a Cocon-Light.pfm
    Error adding Cocon-Light.pfm.

    C:\temp\fonts>

    Reply
    • dcpurton says

      2012-10-27 at 02:57

      I’m not sure if this is still the case but Mac PS fonts didn’t used to be compatible with Win PS fonts. Maybe the PS fonts are failing for this reason? You could email a couple of the fonts to me and I’ll have a look if you like (dcpurton@marshwiggle.net).

      I’m not sure why your ttf fonts are failing. It almost looks like the shell is not expanding the *.ttf (I wouldn’t expect “*.ttf” with quotes to work – this will pass *.ttf as the file name which of course doesn’t exist.) Do they all work if you add them individually?

      Reply
    • dcpurton says

      2013-02-23 at 15:02

      I think this is fixed. Turns out the standard Windows shell does no wildcard expansion! (I only use Linux.)

      I’ve put a new version up that handles wildcards internally. Grab it from http://marshwiggle.net/regfont

      Reply
  18. Odd Henriksen says

    2012-10-03 at 08:28

    Greetings,

    I made some slight modifications to the application, most notably I added the SendNotifyMessage API function, and I run it after every “add”/”rem” action to notify all running processes about the font change (it’s a “WM_FONTCHANGE” message sent to “HWND_BROADCAST”).

    In the spirit of open source, I just wanted to inform you. Let me know if you’re interested in the updated files.

    Reply
  19. Eric says

    2013-08-06 at 16:23

    Hi, which fonts extensions are supported by the regfont-20130320 version?

    Thank you and have a nice day

    Reply
    • Tsukasa says

      2013-08-06 at 17:56

      TrueType, TrueType Collections, PostScript Type 1 and OpenType – simply put: All formats Windows can handle out of the box.

      Reply
      • Eric says

        2013-08-06 at 19:58

        OK Thanks!
        Just in case, do you have a solution for Adobe fonts?

      • Tsukasa says

        2013-08-06 at 20:54

        Unfortunately my only intel on this topic is that Adobe usually ships in OpenType, so in theory there should be no problem.

Trackbacks

  1. How to Install fonts without Administrator rights… (works) | Cosmo Tablet... says:
    2010-02-16 at 04:55

    […] to Tsukasa ofr the 2nd […]

    Reply
  2. How to install fonts without admin right « Bridge to Nova says:
    2011-10-24 at 17:15

    […] how can we install fonts without having to ask for Admin rights? Well, thanks to Tsukasa, thereรขโ‚ฌโ„ขs a workaround. He has developed a tool called Registerfont (You can download […]

    Reply

Leave a Reply to How to Install fonts without Administrator rights… (works) | Cosmo Tablet...Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Tags

.net AutoHotkey Bitcasa Blog C# Docker Fonts Fun Google Chrome Hardware How To Life Linux Mono Mplayer Music My NAS nVidia OBS OpenEdge OpenSSH Palaver Pangya! Portable App PowerShell Programming Quote RaiDrive Reminder Scripting Software Streaming Technology Tips twitter Video Virtualization VMware Web Windows Wine WordPress Wuala YouTube ZNC

Cool stuff

  • AdiIRC
  • Affinity Designer
  • Affinity Photo
  • AquaSnap
  • Arch Linux
  • Archive Team
  • ConEmu
  • Debian
  • Directory Opus
  • Far Manager
  • FileLocator Pro
  • Fluent Search
  • foobar2000
  • Forte Agent
  • IRCCloud
  • ISBoxer
  • Jetbrains Rider
  • Newsblur
  • OBS Studio
  • Obsidian.md
  • RaiDrive
  • Sublime
  • SyncBackPro
  • The Semware Editor
  • True Launch Bar
  • Vivaldi
  • Wavebox
  • WinHex
  • WinRAR
  • WinSCP
  • XYplorer
  • ZNC
  • Zoom Player Max

Semantic Web

  • Mastodon
  • Tsukasa no Hibi
  • Tsukasa no Hibi Sitemap

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Footer

About

Going since 2004, Tsukasa no Hibi is my personal blog about technology, media and sometimes society.

More about Tsukasa no Hibi

WordPress ยท Log in