2013年10月7日 星期一

Windows7 C:\Windows\Fonts 資料夾安全性權限

Windows7 C:\Windows\Fonts 資料夾安全性權限

之前已經做好更換Windows7先前測試的準備工作,預料外的事還是會突然蹦出來,讓人不禁整個人沮喪,頹廢起來,為什麼做了再多的準備,還是會發生這個事,剛好事情又一整串的擠過來,整個人感覺非常不耐煩,花了好多功夫與時間,怎麼還會這樣!

狀況是在預備做一個完整適合公司環境的Windows7個人電腦,發覺內碼的字型檔無法複製到C:\Windows\Fonts資料夾內,而且居然沒有發現設定安全性的標籤(Tab),可以讓我去更改權限,浪費很多的時間,去探究原因,沒有結果.

只能利用星期六,日,在家花時間查找,終於讓我找到原因,都是Windows7的安全性變得更嚴謹,多了一個TrustedInstaller的使用者身分,等今天到公司實作一次後,才整個放鬆下來.

更改方式可參考下方資料:
http://www.sevenforums.com/general-discussion/78244-fonts-folder-permission.html

This is very annoying, but after about an hour our IT team found the solution  lol

UAC needs to be disabled (Control Panel > User Accounts > Change User Account Control Settings, select “Never Notify”)

Now we need to give the user access to the font directory and registry key

A. For the Directory:

1. Open the command prompt WITH ADMINISTRATOR PRIVILEGES (right click cmd, “run as administrator”)
2. Type “attrib -r -s c:\windows\fonts” (obviously minus the quotes), hit Enter
3. Right click on the fonts folder and choose properties
4. Click the Security tab
5. Click Advanced
6. Click the Owner tab
7. Click the Edit button
8. Change the Current Owner to yourself
9. Check the “Replace owner on subcontainers and objects” box
10. Click OK
As a pop-up box will tell you, you must close the window completely for the changes to take in effect

B. For the registry key:

1. Run regedit
2. Browse to : HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENT VERSION\FONTS
3. Give permission to Users

Restart the computer and you should be able to set Full Control permissions for the Users group on the Fonts folder


======================================================================
This thread helped me fix what I needed. I wound up creating a .bat file that automates all of what needs done. Here it is:

REM Bat for changing permissions for font folder
REM Win 32bit only

cd \
attrib -r -s "C:\Windows\Fonts"
takeown /a /f C:\Windows\Fonts /r /d y
icacls C:\Windows\Fonts /grant administrators:F
icacls C:\Windows\Fonts /grant users:M
icacls C:\Windows\System32\FNTCACHE.DAT /grant users:M
echo \registry\machine\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts [1 5 7 17] >%temp%\a.txt
regini.exe %temp%\a.txt




我的處理:
依照A的部分來做就可以變更C:\Windows\Fonts Folder的權限了.


Google的翻譯:
這是很煩人,但大約一個小時後,我們的IT團隊找到了解決辦法,笑.
需要禁用UAC(控制面板>用戶帳戶>更改用戶帳戶控制設置,選擇“從不通知”)
現在,我們需要給用戶訪問的字體目錄和註冊表鍵.


查找過的資料(很多都可以參考,但是有些已經不能在Windows7環境上用)
http://tw.knowledge.yahoo.com/question/question?qid=1010072302250
http://7club.ithome.com.tw/article/10009757/1
http://tw.myblog.yahoo.com/eudc-font/article?mid=367
http://social.technet.microsoft.com/Forums/ru-RU/91e2d8d0-fb59-45b4-8d02-967642a1c215/win7?forum=window7betacn
http://answers.microsoft.com/zh-hant/windows/forum/windows_7-windows_programs/%E5%A6%82%E4%BD%95%E5%9C%A8win7/ac906448-e635-4314-9d24-89591cebb292

2 則留言:

  1. 不好意思,我看不懂最後"我的處理"那一段
    除了禁用UAC,還需要做什麼才能取得變更Fonts資料夾的權限?
    麻煩你了

    回覆刪除
  2. 抱歉,我也有點忘記當初為什麼會加那一段文字了,不過實際的做法參照英文的部分就好了.

    回覆刪除