Wix .NET 自定义操作在 64 位上下文中运行

发布于 2024-10-09 17:02:55 字数 536 浏览 0 评论 0原文

我创建了一个用 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

戴着白色围巾的女孩 2024-10-16 17:02:55

好吧,强制构建平台为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文