Wednesday, January 5, 2011

Windows 7: A Futile Attempt to Move the Fonts Folder

In Windows 7, I tried to move the C:\Windows\Fonts folder to another location.  I did it because I didn't want to lose fonts, if I decided to install additional ones.  At the default C:\Windows\Fonts location, they wouldn't survive reinstallation of the system.  An alternative was to save copies of additional fonts at a different location and copy them to C:\Windows\Fonts after installing a new system.

I found no guidance on this process of moving the Fonts folder.  I copied everything from the C: folder to the X: folder.  Then I searched the registry, changed the references in my .reg file to the new location (X:\Cache\Fonts) in the two locations where I found references to C:\Windows\Fonts, and ran the reg file.  The system rebooted without a problem.  I tried to delete C:\Windows\Fonts, but that gave me a message:

Folder Access Denied
You need permission to perform this action.
You require permission from TrustedInstaller to make changes to this folder.
I searched on that and found advice to go into right-click Properties > Security tab > Advanced > Owner tab.  There was no such tab for C:\Windows\Fonts, but there was for C:\Windows.  I went to Edit, changed it to Administrator, and checked "Replace owner on subcontainers and objects."  When I clicked Apply, I got another message:
Windows Security
You do not have permission to read the contents of directory C:\Windows\CSC\v2.0.6.  Do you want to replace the directory permissions with permissions granting you Full Control?
All permissions will be replaced if you press Yes.
The answer seemed obvious, and that made me suspicious.  I searched on that and saw that Microsoft advised to just go ahead with this, in a couple of contexts, so I did.  It took a while to change permissions for everything in C:\Windows.  Next, I got a message telling me to close and reopen properties to see the updated situation, so I did that.  Still looking at Properties for C:\Windows, I went into Security tab > Edit.  I highlighted Administrators and then clicked Allow for Full Control.  Now I got a message saying, "You need permission to perform this action" -- permission from Administator, which I was.  I found other advice that seemed to recommend these two commands:
takeown /f C:\Windows\Fonts
cacls C:\Windows\Fonts /G Administrator:F
But when I then tried to delete, I got another error message:
Folder In Use
The action can't be completed because the folder or a file in it is open in another program.
Close the folder or file and try again.
Not surprising, since the system itself was obviously using fonts, though it would seem like it could have been just as happy using them from X: as from C:.  I thought I had rebooted since making the registry change, so this time I booted into Safe Mode and tried the deletion there.  No joy.  I selected all fonts and tried deleting them individually, and that got me down to a selected core of 81 fonts, including essentials like Sylfaen Regular and Utsaah.  I was tempted to boot into Ubuntu and wipe out the Fonts folder that way, but instead I gave up:  I went to X:\Cache\Fonts and copied all of the fonts back to C:\Windows\Fonts.  I couldn't remember exactly how many there had been, but the count didn't seem the same, so I rebooted into Normal mode to run System Restore.  My hunch was correct:  some fonts were not displaying correctly.  After System Restore, all was lovely, so I moved on to the next part of my life.

2 comments:

fudgestix imvu

Haha I've tried this too, tried making a junction to another folder but that didn't work either. *sigh* my tiny C drive can't hold very much, it only has room for my operating system and nothing else.

Anonymous

I succeded 98% (I mean that all fonts but two rater fonts have been successfully mooved to a new location. here is how..
1) copy the whole content of the C:\Windows\fonts folder to a new location using a non-Windows OS live disk. (Just copying not mooving: for the moment leave the source in place. (I Used Ubuntu 12.04). By the way I used as destination a FAT32 patitioned logical partition.

2) Take ownership of the C:\Windows\fonts folder and all his content. This may require the removing of read only and system attributes. of this folder

3) Within the new location of the fonts, select each font, right-click, select "install as shortcut" and "replace present installation".

4) Check and modify the registry in accordance with the new position of the fonts, if needed
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\LargeFont

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\SmallFont

5) restart the computer to secure the registry changes.
now delete a chunk of 15-20 files
of the C:\Windows\Fonts file, beginning wints TTF and OTF files. leave the ".fon" files (rasterfonts) for the moment.Reboot the computer Check the "Fonts" panel from the configuration panel : and check that the deleted files are not missing. They should be present with a "shortcut arrow".If not
go to your new font file, right click each missing font and "install as a shortcut".

6) Once everithing is Ok, proceed the same way, stepwise for all the other TTF and OTF font files in C:\Windows \Fonts.

7) Then proceed with the raster font files. But then be carefull : the destruction of some rasterfiles will just prevent your system from booting properly. If this is the case dont' let windows "repair"the system : it will just restore the fonts folder as it was and all the job you have done will be lost. Instead , use the alternative OS live disk to simply recopy into the C:\Windows\fonts the last rasterfonts you have just removed. Normally you will be able to remove allbut a few rasterfonts.

To install new fonts: right click on the new font and choose "install as a shortcut " It will be installed but the font file will not be copied to the C:\Windows\Font\File.

Good Luck !!


Good luck