Wix .NET 自定义操作在 64 位上下文中运行
我创建了一个用 .NET 编写的 Wix (3.0) 自定义操作。美好的。
问题是我将在执行自定义操作期间访问 Windows 注册表,但我在 Wow6432Node 上进行了重定向...
在 MSI 安装的日志文件中寻找有用的内容,我发现了以下日志行:
您好,我是您的 32 位模拟自定义操作服务器。
SFXCA:将自定义操作提取到临时目录:C:\Windows\Installer\MSIB858.tmp-\
SFXCA:绑定到 CLR 版本 v2.0.50727
调用自定义操作 DemoLicenceCA!DemoLicenceCA.CustomActions.InstallDemoLicences
当然,如果好的自定义操作服务器会在 64 位上运行我可以避免这个无聊的注册表重定向问题。
如何解决这个限制?
MSI 包是为 64 位平台构建的。自定义操作 DLL 是为任何平台 (CLI) 构建的,并且 MSI 包安装在 Windows 7 64 位上。
I've created a Wix (3.0) custom action written in .NET. Fine.
The problem is that I shall access to the Windows registry during the execution of the custom action, but I have a redirection on the Wow6432Node...
Looking for something useful in the log file of the MSI installation, I found the following log lines:
Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSIB858.tmp-\
SFXCA: Binding to CLR version v2.0.50727
Calling custom action DemoLicenceCA!DemoLicenceCA.CustomActions.InstallDemoLicences
Of course, if the nice custom action server would run at 64 bit I could avoid this boring problem of registry rediction.
How is it possible to workaround this limitation?
The MSI package is built for 64 bit platform. The custom action DLL is build for any platform (CLI), and the MSI package is installing on Windows 7 64 bit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,强制构建平台为 x86 或 x64 以在正确的上下文中运行就足够了。遗憾的是,因为我必须管理两个配置而不是单个配置,但这不是一个大问题。
Well, it is sufficient to force the build platform to x86 or x64 to run in the right context. That's a pity, since I have to manage two configuration instead of a single one, but this is not a big problem.