Dev*_*Dev 1 installation windows-installer installshield wix
我试图了解我的 setup.msi 在安装时如何插入注册表值。在 Orca 编辑器中我看到这样的,

安装 msi 后,在日志文件中我看到这样的内容,
MSI (s) (A8:B4) [16:27:28:674]: Executing op: ComponentRegister(ComponentId={45667B7F-9DC7-43B7-BE9E-3215ED1B1985},KeyPath=02:\SOFTWARE\myCompany\MySolution\Plugins\MyProduct\ProductCode,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
Run Code Online (Sandbox Code Playgroud)
我想做这个机制的逆向工程,有人可以帮助我理解这一点吗?我想使用 WIX 重新创建相同的内容,所以我只是尝试如下
<Component Id="RegistryEntries" Guid="*">
<RegistryKey Root="HKLM"
Key="Software\Microsoft\MyCompany"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="MyApp" Value="[INSTALLLOCATION]" KeyPath="yes"/>
<RegistryValue Type="string" Name="Configuration Files" Value="[INSTALLLOCATIONCONFIG]"/>
<RegistryValue Type="string" Name="Configuration Files1" Value="[INSTALLLOCATIONCONFIG1]"/>
</RegistryKey>
</Component>
Run Code Online (Sandbox Code Playgroud)
当我构建 msi 并编辑 Orca 时,我会看到如下所示,

我应该怎么做才能获得如上图所示的 msi?
MSI 在注册表中表示注册表数据。在安装过程中,系统确定要安装哪些功能和组件,从而确定要执行哪些注册表添加、更新和删除。实际工作是由WriteRegistryValues和RemoveRegistryValues操作执行的。
在安装过程中“执行 reg 文件”不是最佳实践,因为它不在进程中,并且 MSI 无法管理更改。相反,使用WiX Heat 工具将注册表文件的内容收集到 wix xml 源中,以便包含在安装程序中。
| 归档时间: |
|
| 查看次数: |
2447 次 |
| 最近记录: |