|
本帖最后由 parsons 于 2017-6-29 19:00 编辑
看一下pecmd說明
$$ 表示要求 pecmd 使用标准 [拷贝] 安装模式(默认DefaultInstall,132)
pecmd.exe devi $$B:\7zip\7z.inf 就會安装 [DefaultInstall] 了
例如 7z.inf 及相關檔案放在 B:\7zip
7z.inf 內容: (使用 reg2all 將 reg 轉 inf)
- [Version]
- Signature="$CHICAGO$"
- [DestinationDirs]
- FileCopy = 24, "\Program Files\7-zip"
- LANGFileCopy = 24, "\Program Files\7-zip\Lang"
- ;[DestinationDirs]
- ; -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
- [DefaultInstall]
- CopyFiles = FileCopy, LANGFileCopy
- ; DelReg=Report.1.RedoL_DelReg
- AddReg=Report.1.RedoL_AddReg
- ; reg-root-string, [subkey], [value-name], [flags], [value]
- ;DelReg=Report.1.RedoL_DelReg
- ; reg-root-string, subkey, [value-name]
- ;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,[old-ini-entry],[new-ini-entry],[flags]
- [FileCopy]
- 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
- [LANGFileCopy]
- zh-cn.txt
- zh-tw.txt
- [Report.1.RedoL_DelReg]
- [Report.1.RedoL_AddReg]
- 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"
- [Strings]
复制代码 |
|