chshrm 发表于 2017-6-28 18:56:14

pecmd除了可以安装驱动的inf文件,还可以安装应用的inf文件吗?

如题,pecmd的devi命令可以安装驱动的.inf文件,但不能用来安装普通应用的inf文件。我有个7-zip的inf文件,请问可以使用pecmd安装吗?具体代码怎么写?
我试过用pecmd.exe devi 7z.inf,没有作用。

邪恶海盗 发表于 2017-6-28 19:12:24

估计是你这个7z.inf内容不对头...

chshrm 发表于 2017-6-28 19:21:18

邪恶海盗 发表于 2017-6-28 19:12
估计是你这个7z.inf内容不对头...

文件没问题的,我右键安装很正常。

parsons 发表于 2017-6-28 20:03:07

本帖最后由 parsons 于 2017-6-28 20:06 编辑

似乎要改 7-zip 的 inf

使用 inf 安裝程式本就奇怪 , 但不是沒有
7-zip 的inf 裡的資訊頂多是 [機碼] [檔案路徑]

右鍵調用的程序與pecmd.exe devi 調用的程序應該不同

pecmd.ini 加 LOGS 记录每条命令的执行结果

527104427 发表于 2017-6-28 20:11:11

pecmd.exe devi $$7z.inf,DefaultInstall,132

chshrm 发表于 2017-6-28 22:59:00

527104427 发表于 2017-6-28 20:11
pecmd.exe devi $$7z.inf,DefaultInstall,132

谢谢5大,关键时候又学到一招!

parsons 发表于 2017-6-29 12:44:38

使用 DefaultInstall,128
128 表示不必重啟

chshrm 发表于 2017-6-29 13:15:45

本帖最后由 chshrm 于 2017-6-29 13:18 编辑

parsons 发表于 2017-6-29 12:44
使用 DefaultInstall,128
128 表示不必重啟

发现DefaultInstall,132,会建立一个空文件夹名为132,我直接不用后面的数字也没问题。
还有,请教一下,$$7z.inf,两个$$标识什么?

parsons 发表于 2017-6-29 13:43:42

本帖最后由 parsons 于 2017-6-29 19:00 编辑

chshrm 发表于 2017-6-29 13:15
发现DefaultInstall,132,会建立一个空文件夹名为132,我直接不用后面的数字也没问题。
还有,请教一 ...

看一下pecmd說明
$$ 表示要求 pecmd 使用标准 [拷贝] 安装模式(默认DefaultInstall,132)
pecmd.exe devi $$B:\7zip\7z.inf 就會安装 了
例如 7z.inf 及相關檔案放在 B:\7zip

7z.inf 內容: (使用 reg2all 將 reg 轉 inf)


Signature="$CHICAGO$"


FileCopy =24, "\Program Files\7-zip"
LANGFileCopy =24, "\Program Files\7-zip\Lang"

;
; -01 or 0xffff The directory from which the INF was installed.
; 01 SourceDrive:\path.
; 10 Windows directory.
; 11 System directory. (%windir%\system on Windows 95, %windir%\system32 on Windows NT)
; 12 Drivers directory.(%windir%\system32\drivers on Windows NT)
; 17 INF file directory.
; 18 Help directory.
; 20 Fonts directory.
; 21 Viewers directory.
; 24 Applications directory.
; 25 Shared directory.
; 30 Root directory of the boot drive.
; 50 %windir%\system
; 51 Spool directory.
; 52 Spool drivers directory.
; 53 User Profile directory.
; 54 Path to ntldr or OSLOADER.EXE


CopyFiles = FileCopy, LANGFileCopy
; DelReg=Report.1.RedoL_DelReg
AddReg=Report.1.RedoL_AddReg
; reg-root-string, , , ,
;DelReg=Report.1.RedoL_DelReg
; reg-root-string, subkey,
;Delfiles=Report.1.RedoL_Delfiles
; file-name[,,,flag]
;Renfiles=Report.1.RedoL_Renfiles
; new-file-name,old-file-name
;Copyfiles=Report.1.RedoL_Copyfiles
; destination-file-name[,source-file-name][,temporary-file-name][,flag]
;UpdateInis=Report.1.RedoL_UpdateInis
; ini-file,ini-section,,,


7z.dll
7z.exe
7z.sfx
7zCon.sfx
7zFM.exe
7zG.exe
7-zip.chm
7-zip.dll
7-zip32.dll
descript.ion
History.txt
License.txt
readme.txt
Uninstall.exe


zh-cn.txt
zh-tw.txt




hklm,"SOFTWARE\7-Zip","Path64",,"x:\Program Files\7-Zip\"
hklm,"SOFTWARE\7-Zip","Path",,"x:\Program Files\7-Zip\"

hkcr,"*\shellex\ContextMenuHandlers\7-Zip",,,"{23170F69-40C1-278A-1000-000100020000}"

hkcr,"CLSID\{23170F69-40C1-278A-1000-000100020000}",,,"7-Zip Shell Extension"

hkcr,"CLSID\{23170F69-40C1-278A-1000-000100020000}\InprocServer32",,,"x:\Program Files\7-Zip\7-zip.dll"
hkcr,"CLSID\{23170F69-40C1-278A-1000-000100020000}\InprocServer32","ThreadingModel",,"Apartment"

hkcr,"Directory\shellex\ContextMenuHandlers\7-Zip",,,"{23170F69-40C1-278A-1000-000100020000}"

hkcr,"Directory\shellex\DragDropHandlers\7-Zip",,,"{23170F69-40C1-278A-1000-000100020000}"

hkcr,"Drive\shellex\DragDropHandlers\7-Zip",,,"{23170F69-40C1-278A-1000-000100020000}"

hkcr,"Folder\shellex\ContextMenuHandlers\7-Zip",,,"{23170F69-40C1-278A-1000-000100020000}"

hkcr,"WOW6432Node\CLSID\{23170F69-40C1-278A-1000-000100020000}",,,"7-Zip Shell Extension"

hkcr,"WOW6432Node\CLSID\{23170F69-40C1-278A-1000-000100020000}\InprocServer32",,,"x:\Program Files\7-Zip\7-zip32.dll"
hkcr,"WOW6432Node\CLSID\{23170F69-40C1-278A-1000-000100020000}\InprocServer32","ThreadingModel",,"Apartment"

hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe",,,"x:\Program Files\7-Zip\7zFM.exe"
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe","Path",,"x:\Program Files\7-Zip\"

hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved","{23170F69-40C1-278A-1000-000100020000}",,"7-Zip Shell Extension"

hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","DisplayName",,"7-Zip 16.03 (x64)"
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","DisplayVersion",,"16.03"
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","DisplayIcon",,"x:\Program Files\7-Zip\7zFM.exe"
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","InstallLocation",,"x:\Program Files\7-Zip\"
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","UninstallString",,"x:\Program Files\7-Zip\Uninstall.exe"
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","NoModify",65537,01,00,00,00
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","NoRepair",65537,01,00,00,00
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","EstimatedSize",65537,09,13,00,00
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","VersionMajor",65537,10,00,00,00
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","VersionMinor",65537,03,00,00,00
hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","Publisher",,"Igor Pavlov"

hklm,"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved","{23170F69-40C1-278A-1000-000100020000}",,"7-Zip Shell Extension"

hku,"DEFAULT\Software\7-Zip","Path64",,"x:\Program Files\7-Zip\"
hku,"DEFAULT\Software\7-Zip","Path",,"x:\Program Files\7-Zip\"


chshrm 发表于 2017-6-29 14:46:59

parsons 发表于 2017-6-29 13:43
看一下pecmd說明
$$ 表示要求 pecmd 使用标准 [拷贝] 安装模式(默认DefaultInstall,132)
pecmd.exe d ...

非常感谢!学习了!!

ai20110304 发表于 2018-8-22 16:29:19

学习了……。谢谢
页: [1]
查看完整版本: pecmd除了可以安装驱动的inf文件,还可以安装应用的inf文件吗?