LaunchINFSectionEx Function - 命令行加载inf的扩展 - Windows精简与定制技术 - 系统评测 - 天空竞技场
发新话题
打印

[推荐] LaunchINFSectionEx Function - 命令行加载inf的扩展

LaunchINFSectionEx Function - 命令行加载inf的扩展

LaunchINFSectionEx Function

--------------------------------------------------------------------------------

Launches a section of an information (INF) file.

Syntax

HRESULT WINAPI LaunchINFSectionEx( HWND hwnd,
HINSTANCE hInst,
PSTR pszParams,
INT nShow
);
Parameters

hwnd
HWND that specifies the owner window on which to display error messages. This parameter is typically NULL, which causes the Desktop to be the owner window.
hInst
Handle to the instance of the program. This parameter is typically NULL.
pszParams
Comma-delimited string that specifies (1) the information (INF) file, (2) the section of the INF file to launch, (3) the fully qualified path of the cabinet file (CAB) that contains the INF file, and (4) a flag value that specifies the installation mode, in that order.
If you do not specify the fully qualified path of the INF file, the INF file is extracted from the specified CAB file. If you do not specify a section, that is, if the section portion of the pszParams string is an empty string or is set to NULL, then the DefaultInstall section of the INF file is launched.

The following values define the installation mode. Add the values together to specify multiple flags.

4 Quiet mode, no UI
8 Don't run GrpConv
16 Force self-updating on user's system
32 Backup data before install
64 Rollback to previous state
128 Validate the backup data
256 Complete rollback to previous state
512 Force delay of OCX registration


An optional fifth field specifies whether to reboot upon completion. If not present, the installer will reboot only if necessary (smart reboot).

A Always reboot.
I Default. Reboot if needed.
N Never reboot.


nShow
Unused. Set to zero.
Return Value

Returns one of the following values.

S_OK The section launched successfully.
E_FAIL The section failed to launch.


Remarks

You can call this function using Rundll32.exe from the command line.

Note Using an entry point function with Rundll32.exe does not resemble a normal function call. The function name and the name of the .dll file where it is stored are used only as command line parameters. The function definition shown in the Syntax section of this topic is only a standard prototype for all functions that you can call using Rundll32. The specific values for hwnd and hInst are not provided by the user, but are handled behind the scenes by Rundll32.
Examples

The following examples demonstrate how to call the LaunchINFSectionEx function using Rundll32.
This example demonstrates how to extract the myinf.infINF file from the c:\temp\mydata.cab CAB file in Quiet|Backup mode, and reboot if needed.

rundll32.exe advpack.dll,LaunchINFSectionEx myinf.inf,,c:\temp\mydata.cab,36
This example demonstrates how to roll back to the state before the myinf.infINF file was installed.

rundll32.exe advpack.dll,LaunchINFSectionEx c:\windows\inf\myinf.inf,,,256

TOP

Windows精简与定制技术精华帖索引
nLite 1.4.1 & vLite 1.1 官方下载地址
http://www.lucky8k.com/thread-39036-1-1.html
nLite vLite DPS是什么?
http://www.lucky8k.com/thread-39038-1-1.html
nLite 的常见问题(译自官方网站)
http://www.lucky8k.com/thread-39037-1-1.html
nLite 精简一步一步详细教程
http://www.lucky8k.com/thread-39050-1-1.html
用于 Windows 软件更新程序包的命令行开关
http://www.lucky8k.com/thread-39049-1-1.html
LaunchINFSectionEx Function - 命令行加载inf的扩展
http://www.lucky8k.com/thread-39048-1-1.html
编写INF进行安装用来做nilte的整合包学习inf安装有好处
http://www.lucky8k.com/thread-39047-1-1.html
轻松学习批处理
http://www.lucky8k.com/thread-39046-1-1.html
简体中文版 Windows XP SP2 中 syssetup.inf 的注释
http://www.lucky8k.com/thread-39045-1-1.html
怎样在nlite的基础上进一步压榨空间
http://www.lucky8k.com/thread-39044-1-1.html
rundll32.exe的用途大全
http://www.lucky8k.com/thread-39043-1-1.html
Ghost XP 封装制作全过程
http://www.lucky8k.com/thread-39042-1-1.html
详细指导你做XP精简版和多启动菜单
http://www.lucky8k.com/thread-39041-1-1.html
nlite精简后的自动后处理脚本
http://www.lucky8k.com/thread-39040-1-1.html
XP安装时分两个阶段
http://www.lucky8k.com/thread-39039-1-1.html

TOP

最大压缩Windows XP的详细教程(删除没用文件等等)
http://www.lucky8k.com/thread-39035-1-1.html
使用Nlite打造自己Windows精简安装盘的后期处理
http://www.lucky8k.com/thread-39034-1-1.html
再谈精简WMP后保留在线播放功能
http://www.lucky8k.com/thread-39033-1-1.html
我的winxp精简详细介绍
http://www.lucky8k.com/thread-39032-1-1.html
转帖一份XP nlite 配置文件供参考
http://www.lucky8k.com/thread-39031-1-1.html
关于Nlite移除背影壁纸后Luna主题找不到壁纸的真实原因
http://www.lucky8k.com/thread-39030-1-2.html
额外保留与额外删除参考!照搬出错不负责!!!
http://www.lucky8k.com/thread-39029-1-2.html
rc3选项说明及新增RC4选项及个人选择
http://www.lucky8k.com/thread-39028-1-2.html
Nlite后期处理技术小结
http://www.lucky8k.com/thread-39027-1-2.html
图解nLite定制 Windows XP SP2 光盘
http://www.lucky8k.com/thread-3713-1-2.html
借助 XPLode 制作集成 Hotfix 的 Windows 安装盘
http://www.lucky8k.com/thread-3711-1-2.html
雨浪飘零教程 Windows XP 集成安装光盘制作完全教程
http://www.lucky8k.com/thread-3710-1-2.html
系统补丁及软件的集成安装
http://www.lucky8k.com/thread-3706-1-2.html
nLite 制作精简版合集光盘常见问题
http://www.lucky8k.com/thread-3704-1-2.html
深入了解“TXTSETUP.SIF”
http://www.lucky8k.com/thread-3702-1-2.html
WINNT.SIF 详解
http://www.lucky8k.com/thread-3701-1-2.html

TOP

发新话题