[?]inf檔內如何使用通用語法



贊助商連結


purk
2008-04-29, 08:08 PM
根據這篇http://www.pczone.com.tw/thread/3/140387/

已經順利達到通用語法的方式

目前打算將一些註冊檔改成inf的方式

在全新安裝的時候

就直接安裝進入xp

而不用再手動匯入

可是目前有幾個通用語法的註冊檔轉inf上有個問題

例如


本來以通用語法

reg add "hkcr\*\shell\OpenInIE2\command" /ve /t reg_expand_sz /d "%programfiles%\internet explorer\iexplore.exe \"%1\"" /f

匯入的註冊檔

當使用regedit匯出後

是這樣的

[HKEY_CLASSES_ROOT\*\shell\OpenInIE]

[HKEY_CLASSES_ROOT\*\shell\OpenInIE\command]
@=hex(2):44,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,\
00,69,00,6c,00,65,00,73,00,5c,00,69,00,6e,00,74,00,65,00,72,00,6e,00,65,00,\
74,00,20,00,65,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,\
00,78,00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,20,00,22,00,\
25,00,31,00,22,00,00,00


結果使用regtoinf後

卻出現

hkcr,"*\shell\OpenInIE",,,

hkcr,"*\shell\OpenInIE\command",,0x20000,"D:\Program Files\internet explorer\iexplore.exe "%%1""

這樣固定路徑的inf

請問該如何解決

謝謝

贊助商連結


琥珀
2008-04-30, 09:25 AM
hkcr,"*\shell\OpenInIE\command",,0x20000,"%programfiles%\intern~1\iexplore.exe ""%1"""