Visual Studio 设置项目附带自我更新逻辑?

发布于 2024-09-26 05:26:53 字数 552 浏览 7 评论 0原文

我希望为我的多项目解决方案实现一个安装包,该解决方案安装 Windows 服务以及 Winforms 应用程序。服务和应用程序都能够通过我编写的基于 Web 的自定义实用程序进行自我更新。 基本上,如果 Windows 服务发现 Web 服务器上有升级,它就会定期更新自己的 DLL。如果 Winforms 应用程序在启动时发现网络服务器上有升级,它会自行更新。它不使用标准的安装程序升级过程,但基本上在 .DLL 被消耗之前将其替换到位。

如果我从项目中手动升级一些 DLL,我了解如何使 Windows 不修复我的安装(使用 NOT REINSTALL 标志)。但是,如果我启用某些文件不被修复,那么当用户手动升级或修复其安装时,我会遇到这些文件未被卸载或升级的问题。

所以,我需要的是:

1)Windows 不会尝试在没有明确用户请求的情况下自动修复我手动升级的 .DLL 2) Windows 卸载所有内容,包括自我升级的 .DLL - 当用户选择卸载时 3) 如果用户手动选择修复安装,Windows 将修复所有内容

这可能吗?我唯一的选择是实施在卸载期间手动清理 .DLL 的自定义操作吗?

谢谢

I'm looking to implement a setup package for my multi-project solution that installs a Windows Service as well as a Winforms application. Both the service and the application have an ability to update themselves via a custom web-based utility that I wrote.
So basically, the Windows service updates its own DLL's on a regular basis if it sees an upgrade on the web server. Winforms application updates itself if it sees an upgrade on the webserver upon launch. It does not use a standard Installer upgrade process but basically replaces .DLL's in place before they get consumed.

I understand how to make Windows to NOT repair my installation (using NOT REINSTALL flag) if I manually upgrade a few DLL's from the project. However, if I enable certain files to not be repaired, I run into a problem with them not being uninstalled or upgraded when user manually upgrades or repairs his installation.

So, what I need is this:

1) Windows to not try to repair my manually upgraded .DLL's automatically w/o explicit user request
2) Windows to UNINSTALL everything including the self-upgraded .DLL's - when user chooses to uninstall
3) Windows to Repair everything if user manually chooses to Repair installation

Is this possible? Is my only choice to implement custom actions that manually clean up .DLL's during uninstall?

Thank you

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

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

发布评论

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

评论(1

孤者何惧 2024-10-03 05:26:53

WiX 为您提供了对安装过程的大量控制,并且 这个问题(希望)描述了如何让 WiX 删除初始安装后添加的文件。只要您不创建带有更新的新目录,似乎就不需要任何自定义操作。

WiX gives you a lot of control over the installation process, and this question (hopefully) describes how to get WiX to remove files added after the initial installation. As long as you're not creating new directories with updates, it seems like you don't need any custom actions.

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