Tuesday, May 3, 2011

Allowing Non-Admin Users To Install Fonts in Windows 7

Installing Fonts for Standard Users in Windows XP was very easy. Modifying NTFS folder permissions and giving users modify permissions allow they to copy fonts into C:\Windows\Fonts and after that use them.

Installing Fonts in Windows 7 for standard user is different story and it could be very complicated.

Modifying NTFS Permissions on C:\Windows\Fonts  is not possible because Fonts is a System folder and right click on Fonts folder doesn't give possibility for direct NTFS permissions changes.


To change System folder properties attrib command can be used:

attrib -r -s %systemroot%\fonts

-r  - clears Read-only file attribute
-s  - clears System File attribute



Next step is take ownership of Fonts Folder and all files into this folder.

Example: To give Administrators group Ownership to Fonts folder takeown command can be used:

takeown /F %systemroot%\fonts\ /A

/F - Specifies the filename or directory name pattern. Wildcard * can be used to specify the pattern.
/A - Gives ownership to the administrators group instead of current user



Next Step is to change NTFS permissions on Fonts Folder and give Modify or Full permissions to users or groups. To do that you should use cacls command: 

Example:

cacls %systemroot%\fonts /E /G Users:F

/E - Edit ACL instead of replacing it.
/G - Grant specific user rights (in this example it gives Full permissions to Users group)
Note: This command changes Fonts Folder permissions and doesn't inherit permissions to the files into the folder.

You can copy all these three lines in Notepad and save it as bat file.

attrib -r -s %systemroot%\fonts
takeown /F %systemroot%\fonts\ /A
cacls %systemroot%\fonts /E /G Users:F

Next Step is to modify permissions on
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
and to give Full Permissions to Users. This will allow standard users to register fonts in registry.



Next step is to copy your fonts in C:\WINDOWS\FONTS Folder. Here is the vbs script which can copy and in same time register your fonts. Fonts are located on network share and before to execute you should modify the script with fonts names.

' ****************************************************************************
' Copy Fonts From Network Share To C:\WINDOWS\FONTS Folder Of Workstation
' ****************************************************************************
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "xcopy.exe ""\\%SERVERNAME%\%SHARE \FONTS"" ""C:\windows\fonts"" /C /I /S /E /H /Y /Q", 1,True

' ****************************************************************************
' Imports The Registry Information For The New Fonts - Add A New Line For Each New Font
' Example : WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\%FONT REG KEY%", "%FONT REG KEY ENTRY%", "REG_SZ"
' ****************************************************************************

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\Twiggy-Bold (TrueType)", "Twiggy-Bold.ttf", "REG_SZ"
WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\Twiggy-Light (TrueType)", "Twiggy-Light.ttf", "REG_SZ"
' ****************************************************************************

10 comments:

  1. Nice guide. I tried and it worked! Question; can the settings be put like before the change because the layout of C:\Windows\Fonts changed from a specific windows to a layout with files in 'detail'.

    ReplyDelete
  2. No funciona, not work..

    ReplyDelete
  3. change the original windows design is not a good idea

    ReplyDelete
  4. Great post!! Thank you!
    For those who don't want to use vbs script, replace the last step with a freeware like AMP Font Viewer.

    ReplyDelete
  5. Works perfect on Windows8!
    Thank you very much for this post.
    Appreciate.

    ReplyDelete
  6. The font is getting added into the folder but still couldn't install is there any way ?

    ReplyDelete
  7. didn't work for me. How can I undo the changes?

    ReplyDelete