2014年6月13日 星期五

遠端安裝字型

Method 0:
自動安裝字型要使用微軟的小工具 FONTINST.EXE 並配合 fontinst.inf 安裝。
請參考以下微軟正黑體的安裝方式並可抽取 FONTINST.EXE 此程式:

http://www.microsoft.com/downloads/details.aspx?FamilyID=87E726A9-5C79-4A73-9347-78A557314D0B&displayLang=zh-tw


fontinst.exe /f fonts.inf
無法成功??


Method 1:
將fontreg與字型放在同一個資料夾再執行
fontreg.exe /copy

會將此資料夾字型複製到系統資料夾並登錄註冊
參考資料:
http://code.kliu.org/misc/fontreg/


xcopy /i /s /y "%~dp0*" "\\%h%\c$\temp\fonts\"
psexec -e \\%h% cmd /c (pushd c:\temp\fonts ^& fontreg.exe /copy)

refer:
http://www.richud.com/wiki/Windows_Fontreg_install_fonts_locally_or_remotely_easily


Method 2:
1. Copy TTF 到 %systemroot%\fonts
2. 加入 Registry
--------
test.bat

@echo off
copy test.ttf %systemroot%\fonts
regedit /s new.reg
--------
new.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Test (TrueType)"="test.ttf"

重開機.


參考資料:
http://wpkg.org/Fonts
http://www.mobile01.com/topicdetail.php?f=512&t=2114296
http://litestep.net/forums/index.php?thread=5791





使用指令安裝inf:

1. 利用 RunDll32.exe

C:\Windows\System32\rundll32.exe C:\Windows\System32\AdvPack.dll,LaunchINFSection C:\Filename.inf,預設安裝區段名稱

2. 利用 IExpress

利用 IExpress 將 .inf 包裝起來,並在包裝過程中將 .inf 指定為解壓縮後要執行的檔名。這樣您就可以利用批次檔來執行封裝後的 .exe 了。

3. 協力廠商工具

沒有留言:

張貼留言