`
isiqi
  • 浏览: 16488107 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

用来生成CAB安装文件的.inf文件制作(英文版)

阅读更多

Processor-Specific Sections

The .CAB files created using an .inf file are processor specific: Each one can be used with only one type of processor. To create processor-specific CAB files, you must append the processor type extension to some of the section names. For example:

		[DefaultInstall]  -  shared by all platforms
		[DefaultInstall.sh3]  - specific to the SH3 processor
		[DefaultInstall.mips]  - specific to the MIPS processor

The following sections can be appended with a processor-specific extension:

[CEDevice]
[DefaultInstall]
[SourceDisksNames]
[SourceDisksFiles]

INF Sections Used

An .inf file is made up of a number of sections, each of which starts with a section name in [brackets].

[Version]
Signature="signature-name"
Provider=provider-name
CESignature="$Windows CE___FCKpd___2quot;
  • Signature - must be one of "$Windows NT$", "$Chicago$", or "$Windows 95$".
  • Provider - name of the software provider.
  • CESignature - must be included, and specified as above.
[CEDevice] *
[ProcessorType=processor-type]
[UnsupportedPlatforms=platform-family-name [ , platform-family-name]]
[VersionMin=[major_version.minor_version]]
[VersionMax=[major_version.minor_version]]
[BuildMin=[build-number]]
[BuildMax=[build-number]]

All of the above keys are optional.

  • ProcessorType - The numeric processor type returned by SYSTEMINFO.dwProcessorType. SH3 processors normally have a value of 10003, and MIPS processors have a value of 4000.
  • UnsupportedPlatforms - A list of platform family names that is known to be unsupported, i.e. "hpc" or "gryphon". It the connected device is listed here, the Application Manager will not display the application.
  • VersionMin,VersionMax - The version returned by OSVERSIONINFO.dwVersionMajor and OSVERSIONINFO.dwVersionMinor.
  • BuildMin, BuildMax - The build information returned by OSVERSIONINFO.dwBuildNumber.
[DefaultInstall]
CopyFiles=file-list-section [ , file-list-section]...
AddReg=add-registry-section [ , add-registry-section]...
CEShortcuts=shortcut-list-section [ , shortcut-list-section]...
CESetupDLL=[DLL-filename]
CESelfRegister=DLL-filename [ , DLL-filename]
  • CopyFiles - a list of [CopyFiles] sections (see below) to be used.
  • AddReg - a list of [AddRegistry] sections (see below) to be used.
  • CEShortcuts - a list of [CEShortcuts] sections (see below) to be used.
  • CESetupDLL - an ISV-created "Setup.DLL" that exports functions to be called during installation onto the Windows CE device.
  • CESelfRegister - a list of self-registering DLLs to be installed. "DllRegisterServer()" will be called during installation, and "DllUnregisterServer()" will be called during uninstallation.
[SourceDisksNames]
disk-ordinal= , disk-label , , path
.
.
.
This section identifies and names the disk that contains the source files for file copying operations. The source files are listed in the [SourceDisksFiles] section (see below).
  • disk-ordinal - a unique number that identifies a source disk. If there is more than one source disk, each must have a unique ordinal.
  • disk-label - the label assigned to the source disk.
  • path - specifies the absolute path to the files on the source disk.
[SourceDisksFiles]
filename=disk-ordinal [ , subdir]
.
.
.
This section names the source files used during installation and identifies the source disks that contain the files. The source disks are listed in the [SourceDisksNames] section (see above).
  • filename - name of the file to be installed
  • disk-ordinal - the ordinal number of the source disk where the file can be found. The ordinal number is specified in the [SourceDisksNames] section (see above).
  • subdir - optional parameter that specifies a subdirectory on the source disk where the file can be found.
[DestinationDirs]
file-list-section=0, subdir
.
.
.
This section defines the destination directories for the operations specified in the [CopyFiles] and [CEShortcuts] sections (see below).
  • file-list-section - the name of [CopyFiles] or [CEShortcuts] section that contains the names of the files/shortcuts to be copied to the destination directory.
  • subdir - name of the destination directory to use. For Windows CE Version 2.0, this directory name can contain string macros for certain system directories, as defined below. Note that the macros are different for H/PCs and P/PCs, and that P/PCs do not support all of the macros.
Macros for Handheld PCs (H/PCs)
%CE1%	\Program Files
%CE2%	\Windows
%CE3%	\Windows\Desktop
%CE4%	\Windows\Startup
%CE5%	\My Documents
%CE6%	\Program Files\Accessories
%CE7%	\Program Files\Communication
%CE8%	\Program Files\Games
%CE9%	\Program Files\Information Manager
%CE10%	\Program Files\Office
%CE11%	\Windows\Programs
%CE12%	\Windows\Programs\Accessories
%CE13%	\Windows\Programs\Communication
%CE14%	\Windows\Programs\Games

%CE15%	\Windows\Fonts
%CE16%	\Windows\Recent
%CE17%	\Windows\Favorites

Macros for Palmsize PCs (P/PCs)
%CE1%	\Program Files
%CE2%	\Windows
%CE3%	***Not Defined***
%CE4%	\Windows\Startup
%CE5%	\My Documents
%CE6%	\Program Files\Accessories
%CE7%	\Program Files\Communication
%CE8%	\Program Files\Games
%CE9%	***Not Defined***
%CE10%	***Not Defined***
%CE11%	\Windows\Start Menu\Programs
%CE12%	\Windows\Start Menu\Programs\Accessories

%CE13%	\Windows\Start Menu\Programs\Communication
%CE14%	\Windows\Start Menu\Programs\Games
%CE15%	\Windows\Fonts
%CE16%	***Not Defined***
%CE17%	\Windows\Start Menu
[CopyFiles]
destination-file-name [ , source-file-name] [ , ,flag]
.
.
.
This section specifies files to be copied to the Windows CE device during installation. The actual file section name ("CopyFiles") is user-defined, and may vary.
  • destination-file-name - name of the destination file to be created.
  • source-file-name - optional parameter that specifies the name of the source file, if it is different than the name of the destination file.
  • flag - optional flag that controls how the files are copied. The following flags are supported for Windows CE Version 2.0:
    COPYFLG_WARN_IF_SKIP            0x00000001
    COPYFLG_NOSKIP                  0x00000002
    COPYFLG_NO_OVERWRITE            0x00000010
    COPYFLG_REPLACEONLY             0x00000400
    CE_COPYFLG_NO_DATE_DIALOG       0x20000000 Do not copy if target is newer
    CE_COPYFLG_NODATECHECK          0x40000000 Ignore date and overwrite target
    CE_COPYFLG_SHARED               0x80000000 Reference-counting shared DLL
    
[CEShortcuts] *
shortcut-file-name, type-flag, target-file/path [ , standard-destination-path]
.
.
.
This section specifies shortcuts to be created on the Windows CE device during installation. The actual shortcut section name ("CEShortcuts") is user-defined, and may vary.
  • shortcut-file-name - the name of shortcut file to be created. This name does not require the ".lnk" extension.
  • type-flag - if 0 or empty, the target is a file. Any non-zero value indicates that the target is a pathname.
  • target-file/path - if the target is a file, the target file name must be defined in a [CopyFiles] section (see above). If the target is a path, the path name must either be defined in [DestinationDirs], or set to %InstallDir%.
  • standard-destination-path - optional parameter that specifies either one of the standard %CE% paths (see [DestinationDirs] section above), or %InstallDir%.
[AddRegistry]
reg-root-string, [subkey], [value-name], [flags], [value]
.
.
.
This section specifies registry entries to be created on the Windows CE device during installation. The actual registry section name ("AddRegistry") is user-defined, and may vary.
  • reg-root-string - can be one of: HKCR (same as HKEY_CLASSES_ROOT), HKCU (same as HKEY_CURRENT_USER), HKLM (same as HKEY_LOCAL_MACHINE), or HKU (same as HKEY_USERS).
  • subkey - optional parameter that specifies a sub-key to be created under the root key.
  • value-name - optional parameter that specifies the name of the value to be created under the specified key. If left empty, the default value for the key is set.
  • flags - flag the determines how the key/value is created, and the type of the value. The supported flags are:
    FLG_ADDREG_BINVALUETYPE     0x00000001
    FLG_ADDREG_NOCLOBBER        0x00000002
    FLG_ADDREG_TYPE_SZ          0x00000000
    FLG_ADDREG_TYPE_MULTI_SZ    0x00010000
    FLG_ADDREG_TYPE_BINARY      0x00000001
    FLG_ADDREG_TYPE_DWORD       0x00010001
    
  • value - optional value to set. This parameter can be either a string or a number in hexadecimal notation.
[CEStrings] *
AppName=application-name
InstallDir=default-installation-directory
  • application-name - the name of the application being installed.
  • default-installation-directory - the path to the directory to use as the default installation directory. This string is used for the %InstallDir% macro, required for many of the sections described above. When specifying this string, the standard %CE% macros (see [DestinationDirs] above) can be used.
[Strings]
string-name=value
.
.
.
This section defines custom string macros to be used when the INF file is compiled.
  • string-name - The name of the new macro you want to create. For example, a value of "Provider" will allow you to use the newly created "%Provider%" macro anywhere in the INF file.
  • value - The value that the string macro will expand to.
分享到:
评论

相关推荐

    cab文件制作inf文件示例

    制作cab需要做繁琐的inf文件编写工作,这个是模板,只要修改一下文件名即可打包cab

    生成cab 工具文件 cabARC

    该软件仅仅针对编程序的人使用,做过ACTIVEX的朋友相比都知道随 WEB自动加载的CAB文件,这个文件可以用WINRAR...令如下:cabarc n Abcd.cab Abcd.inf Abcd.dll ABCD.CAB:封装后的文件 ABCD.INF;ABCD.DLL需要封装的文件

    制作CAB包的所有资源文件

    makecab.exe工具。提供了该打包工具,位于CAB目录下,共包含makecab.exe、cab.ddf、installer....需要指出的是,使用C#开发的ActiveX控件CAB包中需要包含MSI文件和installer.inf安装文件两部分。cab.ddf文件内容如下:

    cab文件制作示例,用于制作cab模板

    3. **运行MakeCab工具**:利用Microsoft的MakeCab工具,依据.CABDEF或.INF文件进行文件压缩,生成CAB文件。命令行示例如`makecab CardReader.inf CardReader.cab`。 4. **验证和测试**:生成CAB文件后,确保在目标...

    易语言源码易语言解压CAB文件源码.rar

    易语言源码易语言解压CAB文件源码.rar 易语言源码易语言解压CAB文件源码.rar 易语言源码易语言解压CAB文件源码.rar 易语言源码易语言解压CAB文件源码.rar 易语言源码易语言解压CAB文件源码.rar 易语言源码...

    使用C++安装Windows更新文件(.cab文件)

    其中,`SetupInstallFromInfSection`函数是用于从.INF文件安装更新的关键函数。但是,对于直接处理.cab文件,我们可能需要使用`SetupExtractFile`或`SetupIterateCabinet`。 2. **加载.cab文件**:使用`...

    vlc插件axvlc.cab包

    使用vlc插件播放视频时需要axvlc.cab的支撑,但是目前官方给的axvlc.cab的链接貌似已经失效。...这个文件是我自己打包生成的,由于浏览器对64位的插件支撑性能不怎么好。我建议大家装32位的vlc。 老资源是15年的

    M4561421.CAB PA561401.CAB

    Office03系列使用期间所需要的CAB文件. 打包文件内含“M4561421.CAB PA561401.CAB ZA561401.CAB YI561401.CAB ZD561403....当OFFICE系列如WORD,EXCEL,PPT等不好用时(如公式不好用),需要继续安装的的系列CAB文件。

    VM15ToolsIsos.cab

    打开CAB文件,里面就是VM15的VMtools,可以VM16装Vista时用到!

    CAB文件打包生成工具

    CAB文件通常包含多个文件、DLL、OCX(ActiveX控件)等,它们可以被安装程序或系统用来更新或安装组件。 标题提到的“CAB文件打包生成工具”是一个专门用于将OCX文件打包成CAB文件的实用程序。OCX文件是ActiveX技术...

    BAT批处理脚本-文件相关操作-批量文件CAB 打包工具.cmd.zip

    本压缩包文件包含一个名为“批量文件CAB打包工具.cmd.txt”的文件,这实际上是一个批处理脚本,用于对一组文件进行CAB( Cabinet)格式的压缩打包。CAB文件格式是由Microsoft开发的一种标准压缩格式,常用于软件分发...

    OfficeControl.cab 安装包及安装方法

    打开命令提示符,使用 `expand` 命令来解压 CAB 文件,然后使用 ` rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 <INF文件路径>` 来执行安装。 5. **自动安装**:有时,OfficeControl.cab 可能...

    控件生成CAB文件的实用工具

    标题中的“控件生成CAB文件的实用工具”是指一种软件工具,它的主要功能是帮助开发者将特定类型的控件(如DLL、OCX或SWF)打包成CAB( Cabinet)文件。CAB文件是一种微软开发的压缩格式,常用于Windows系统中的软件...

    cab制作工具.rar

    标题中的“cab制作工具.rar”指的是一个包含有关创建CAB( Cabinet)文件的资源压缩包。CAB文件是微软Windows操作系统中广泛使用的压缩格式,主要用于软件分发、更新和存储驱动程序等。CAB文件的一个关键特性是它们...

    Office2010启动故障需要ProPlusWW.msi和ProPsWW2.cab文件修复包

    `ProPlusWW.msi`是Office 2010专业增强版的主安装文件,它包含了该版本所需的所有组件,如Word、Excel、PowerPoint等。 `cab`文件,全称 Cabinet File,是Windows操作系统中用于存储压缩数据的文件格式。在Office ...

    如何部署.NET Compact Framework2.0 应用程序到Windows Mobile(制作CAB文件).

    1. 使用Visual Studio .NET来制作安装程序: 在Visual Studio .NET中,你可以创建一个"Setup and Deployment Project"。这个项目允许你自定义安装过程,例如: - 在桌面创建快捷方式。 - 注册文件类型,使用户...

    NetFx3.cab下载安装文件

    Windows Server 2016 安装.NET Framework 3.5失败所需文件

    ocx制作成cab文件

    4. 创建CAB文件时,你可能还需要为OCX控件提供一个INF文件,这个文件包含了安装控件所需的元数据和指令。INF文件的内容可能包括文件路径、注册表项等信息。 5. 最后,运行修改后的批处理文件或手动执行 `CABARC` ...

    CAB文件制作工具 界面版

    CAB文件制作工具通常用于创建这样的压缩包,而“CAB文件制作工具 界面版”则提供了图形用户界面(GUI),使得用户无需通过命令行就能方便地操作。 在制作CAB文件的过程中,我们需要了解以下几个关键概念: 1. **...

    .cab熊猫读书.cab

    熊猫读书.cab熊猫读书.cab熊猫读书.cab熊猫读书.cab熊猫读书.cab熊猫读书.cab熊猫读书.cab

Global site tag (gtag.js) - Google Analytics