无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 6407|回复: 10
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 2017-6-28 18:56:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如题,pecmd的devi命令可以安装驱动的.inf文件,但不能用来安装普通应用的inf文件。我有个7-zip的inf文件,请问可以使用pecmd安装吗?具体代码怎么写?
我试过用pecmd.exe devi 7z.inf,没有作用。
2#
发表于 2017-6-28 19:12:24 | 只看该作者
估计是你这个7z.inf内容不对头...
回复

使用道具 举报

3#
 楼主| 发表于 2017-6-28 19:21:18 | 只看该作者
邪恶海盗 发表于 2017-6-28 19:12
估计是你这个7z.inf内容不对头...

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

使用道具 举报

4#
发表于 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 记录每条命令的执行结果
回复

使用道具 举报

5#
发表于 2017-6-28 20:11:11 | 只看该作者
pecmd.exe devi $$7z.inf,DefaultInstall,132
回复

使用道具 举报

6#
 楼主| 发表于 2017-6-28 22:59:00 | 只看该作者
527104427 发表于 2017-6-28 20:11
pecmd.exe devi $$7z.inf,DefaultInstall,132

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

使用道具 举报

7#
发表于 2017-6-29 12:44:38 | 只看该作者
使用 DefaultInstall,128
128 表示不必重啟
回复

使用道具 举报

8#
 楼主| 发表于 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,两个$$标识什么?

点评

看一下pecmd說明 $$ 表示要求 pecmd 使用标准安装模式 (默认DefaultInstall,132) pecmd.exe devi $$B:\7zip\7z.inf 就會安装 [DefaultInstall] 了 例如 7z.inf 及相關檔案放在 B:\7zip 7z.inf 內容:  详情 回复 发表于 2017-6-29 13:43
回复

使用道具 举报

9#
发表于 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 就會安装 [DefaultInstall] 了
例如 7z.inf 及相關檔案放在 B:\7zip

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

  1. [Version]
  2. Signature="$CHICAGO$"

  3. [DestinationDirs]
  4. FileCopy =  24, "\Program Files\7-zip"
  5. LANGFileCopy =  24, "\Program Files\7-zip\Lang"

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

  24. [DefaultInstall]
  25. CopyFiles = FileCopy, LANGFileCopy
  26. ; DelReg=Report.1.RedoL_DelReg
  27. AddReg=Report.1.RedoL_AddReg
  28. ; reg-root-string, [subkey], [value-name], [flags], [value]
  29. ;DelReg=Report.1.RedoL_DelReg
  30. ; reg-root-string, subkey, [value-name]
  31. ;Delfiles=Report.1.RedoL_Delfiles
  32. ; file-name[,,,flag]
  33. ;Renfiles=Report.1.RedoL_Renfiles
  34. ; new-file-name,old-file-name
  35. ;Copyfiles=Report.1.RedoL_Copyfiles
  36. ; destination-file-name[,source-file-name][,temporary-file-name][,flag]
  37. ;UpdateInis=Report.1.RedoL_UpdateInis
  38. ; ini-file,ini-section,[old-ini-entry],[new-ini-entry],[flags]

  39. [FileCopy]
  40. 7z.dll
  41. 7z.exe
  42. 7z.sfx
  43. 7zCon.sfx
  44. 7zFM.exe
  45. 7zG.exe
  46. 7-zip.chm
  47. 7-zip.dll
  48. 7-zip32.dll
  49. descript.ion
  50. History.txt
  51. License.txt
  52. readme.txt
  53. Uninstall.exe

  54. [LANGFileCopy]
  55. zh-cn.txt
  56. zh-tw.txt

  57. [Report.1.RedoL_DelReg]

  58. [Report.1.RedoL_AddReg]
  59. hklm,"SOFTWARE\7-Zip","Path64",,"x:\Program Files\7-Zip"
  60. hklm,"SOFTWARE\7-Zip","Path",,"x:\Program Files\7-Zip"

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

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

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

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

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

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

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

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

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

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

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

  75. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","DisplayName",,"7-Zip 16.03 (x64)"
  76. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","DisplayVersion",,"16.03"
  77. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","DisplayIcon",,"x:\Program Files\7-Zip\7zFM.exe"
  78. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","InstallLocation",,"x:\Program Files\7-Zip"
  79. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","UninstallString",,"x:\Program Files\7-Zip\Uninstall.exe"
  80. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","NoModify",65537,01,00,00,00
  81. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","NoRepair",65537,01,00,00,00
  82. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","EstimatedSize",65537,09,13,00,00
  83. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","VersionMajor",65537,10,00,00,00
  84. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","VersionMinor",65537,03,00,00,00
  85. hklm,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip","Publisher",,"Igor Pavlov"

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

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

  89. [Strings]
复制代码
回复

使用道具 举报

10#
 楼主| 发表于 2017-6-29 14:46:59 | 只看该作者
parsons 发表于 2017-6-29 13:43
看一下pecmd說明
$$ 表示要求 pecmd 使用标准 [拷贝] 安装模式(默认DefaultInstall,132)
pecmd.exe d ...

非常感谢!学习了!!
回复

使用道具 举报

11#
发表于 2018-8-22 16:29:19 | 只看该作者
学习了……。谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-6-1 16:04

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表