大网数据广告活动
安装更新与部署

Specifying the Order of Self Registration

· 52CE 我爱测

Note that you cannot specify the order in which the installer registers or unregisters self-registering DLLs by using the SelfRegModules and SelfUnRegModules actions.

Note that you cannot specify the order in which the installer registers or unregisters self-registering DLLs by using the SelfRegModules and SelfUnRegModules actions. These actions register all the modules listed in the SelfReg table. The installer does not self-register .exe files.

To specify the order in which the installer registers or unregisters modules, you must use two custom actions for each module. One custom action for DllRegisterServer and a second for DllUnregisterServer. These custom actions must then be authored in the InstallExecuteSequence table at the point in the sequence wherever the DLL is to be registered or unregistered.

The following example illustrates how to author the database to schedule the self-registration of a DLL at a particular point in the action sequence.

File Table (partial)

File Component_ FileName Sequence
mydll myComponent Mydll.dll 13

Component Table (partial)

Component ComponentId Directory_ KeyPath
myComponent {a GUID} myFolder mydll

Directory Table

Directory Directory_Parent DefaultDir
TARGETDIR SourceDir
myFolder TARGETDIR myFolder|My Folder

CustomAction Table

Action Type Source Target
mydllREG 3170 myFolder "[SystemFolder]msiexec" /y "[#mydll]"
mydllUNREG 3170 myFolder "[SystemFolder]msiexec" /z "[#mydll]"

InstallExecuteSequence Table (partial)

Action Condition Sequence
SelfUnregModules 2200
mydllUNREG $myComponent=2 2201
RemoveFiles 3500
InstallFiles 4000
SelfRegModules 6500
mydllREG $myComponent>2 6501

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。