安装程序自动修复功能

发布于 2024-08-09 08:44:52 字数 176 浏览 7 评论 0原文

我使用 VS 2k8 安装程序项目 MSI 文件安装的应用程序会进行检查,以确保在应用程序启动之前没有删除任何已安装的文件,并运行安装程序来修复此问题(如果有)。我怎样才能把它关掉呢?例如,以便我可以在我的应用程序中包含示例文件。

编辑:澄清通过安装的快捷方式启动应用程序时发生的行为,而不是直接从高清运行它时发生的行为。

Applications I install with a VS 2k8 Installer Project MSI file check to make sure that no installed files have been deleted before the app launches and run the installer to fix this if they do. How can I turn this off so? eg so that I can include sample files with my app.

EDIT: to clarify the behavior happens when starting the app via an installed shortcut, not when running it from the HD directly.

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

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

发布评论

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

评论(2

森林很绿却致人迷途 2024-08-16 08:44:52

您将从“广告快捷方式”启动应用程序,这将触发修复功能。

解决方案 1 - 将示例文件安装为只读,然后在使用它们时将其复制到每个用户的位置(这样 Windows Installer 甚至不知道用户副本)

解决方案 2 - 设置 DISABLEADVTSHORTCUTS 属性可创建“标准”而不是“广告”快捷方式在安装过程中。

您确实应该重新设计您的应用程序,以便安装的文件永远不会被修改,但如果您想要快速而肮脏的修复,上面的解决方案 2 应该可以解决问题。

You're launching the application from an "Advertised Shortcut" which will trigger the repair functionality.

Solution 1 - install sample files as read-only and then copy them to a per-user location when they're being used (so that Windows Installer doesn't even know about the user copies)

Solution 2 - Set the DISABLEADVTSHORTCUTS property to create "standard" rather than "advertised" shortcuts during installation.

You really should redesign your application so that installed files are never modified, but if you're after a quick and dirty fix solution 2 above should do the trick.

场罚期间 2024-08-16 08:44:52

不要为包含您不想自动修复的文件的组件设置关键路径。

Dont set the key path for the component containing the files you don't want to auto-repair.

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