如何在Visual Studio中的WIXPROJ中输出设置。如果没有LGHT0388错误?

发布于 2025-02-06 14:46:35 字数 1129 浏览 4 评论 0 原文

在Visual Studio解决方案(我正在使用Visual Studio 2022)中,如何配置Boostrapper来输出名为 setup.exe 的文件?

我有一个 wixproj 项目,该项目构建了一个bootstrapper,该项目在另一个 wixproj project中安装了几个先决条件和MSI。一切都按预期工作,除非我在Bootstrapper项目上设置输出名称 设置我的Visual Studio build会失败,但有以下错误:

light.exe(0,0): error LGHT0388: The file name 'setup.exe' creates an insecure bundle. Windows will load unnecessary compatibility shims into a bundle with that file name. These compatibility shims can be DLL hijacked allowing attackers to compromise your customers' computer. Choose a different bundle file name.
Done building project "Bootstrapper.wixproj" -- FAILED.

如果我设置 upput名称以其他任何内容(例如[我的项目]设置),构建成功。我可以将输出文件重命名为 setup.exe ,它的行为与我在不重命名的情况下运行时的行为相同。

我在这样提到的 lght0388 上什么都没有找到,我唯一发现的是2019年的邮件列表帖子,没有任何响应 - [wix-users] lght0388:文件名'setup.exe'创建一个不安全的bundle

In a Visual Studio solution (I'm using Visual Studio 2022), how can I configure a boostrapper to output a file named setup.exe?

I have a wixproj project that builds a bootstrapper that installs a couple of prerequisites and an MSI from another wixproj project. Everything is working as expected, except when I set the Output name on the bootstrapper project to setup my Visual Studio build fails with the following error:

light.exe(0,0): error LGHT0388: The file name 'setup.exe' creates an insecure bundle. Windows will load unnecessary compatibility shims into a bundle with that file name. These compatibility shims can be DLL hijacked allowing attackers to compromise your customers' computer. Choose a different bundle file name.
Done building project "Bootstrapper.wixproj" -- FAILED.

If I set Output name to anything else ([My Project] setup, for example), the build succeeds. I can rename the output file to setup.exe and it seems to behave the same as when I run it without renaming it.

I found nothing on SO mentioned LGHT0388 and on the web the only thing I found is a mailing list post from 2019 with no responses - [wix-users] LGHT0388: The file name 'Setup.exe' creates an insecure bundle.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

温馨耳语 2025-02-13 14:46:35

您不能按设计。来自

Windows在用户试图运行名为setup.exe的文件时,就像错误消息所示一样。垫片加载过程可能会导致操作系统探测DLL的探测,如果不是在Windows更新上当前...即,如果某些恶意页面导致您的浏览器下载具有与OS DLL相同的文件名的DLL,则未拨打的操作系统可以从下载文件夹而不是OS加载它。 Wix选择要谨慎,不允许发生杂点,因为我们不能断言OS已安装了补丁。

You can't, by design. From http://lists.wixtoolset.org/pipermail/wix-users-wixtoolset.org/2019-April/007992.html:

Windows does "bad things" when a user tries to run a file named Setup.exe, just as the error message indicates. The shim loading process can cause the OS to probe for DLL's, and if it isn't current on windows updates... IE, if some malicious page caused your browser to download a DLL with the same file name as an OS DLL, the unpatched OS may load it from the downloads folder instead of the OS. WiX chose to be cautious, and not allow the shimming to happen, as we can't assert that the OS has the patches installed.

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