如何拥有“活力”单击一次先决条件

发布于 2024-09-27 03:09:42 字数 303 浏览 2 评论 0原文

具体来说,SQL Express。我有一个内部 winform 应用程序,如果他们有笔记本电脑,则需要安装 SQL Express 才能启用某些功能。现在我正在为每个人安装它,因为它不会在花费的时间之外“伤害”桌面用户。我希望在检测到它们是否在笔记本电脑上后安装 SQL。

对于 Click Once,我有哪些选择?据我所知,我需要取消选中 SQL Express 作为先决条件,并在启动代码中手动处理它。我将如何/在哪里实现这一目标?

有更好的办法吗?如果我切换部署模型,更新的工作量/时间不会大幅增加吗?

Specifically, SQL Express. I have an internal winform app that, if they have a laptop, needs to install SQL Express to enable certain functionality. Right now I am installing it for everyone as it doesn't 'hurt' the desktop users outside of the time it takes. I would like to have it install SQL after I detect if they are on a laptop.

With Click Once, what are my options? From what I can see, I would need to uncheck SQL Express as a Prerequisite and handle it manually in my startup code. How/Where would I accomplish that?

Is there a better way? If I switch deployment models won't the trade off be a drastic increase in effort/time for Updates?

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

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

发布评论

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

评论(1

别把无礼当个性 2024-10-04 03:09:42

先决条件是 ClickOnce 最容易被误解的部分。 ClickOnce 只是在客户端和服务器之间下载和同步文件的技术。 Visual Studio 创建的引导程序 (setup.exe) 与 ClickOnce 无关,只是在完成后启动 ClickOnce 应用程序。这很令人困惑,因为 Visual Studio 将它们混在一起,所以每个人都认为它们是相关的。

如果您不希望每个人都拥有 SQL Express,请将其从 Visual Studio 先决条件中删除。从那里,只要您的应用程序可以在没有安装 SQL Express 的情况下启动,您就可以在代码中手动处理它。在应用程序启动时,您可以检查注册表以查看是否安装了 SQL Express,然后下载并启动安装程序。我使用 Crystal Reports 安装程序完成了此操作,效果很好。

Prerequisites are the most misunderstood part of ClickOnce. ClickOnce is just the technology that downloads and syncs files between a client and the server. The bootstrapper (setup.exe) that Visual Studio creates has nothing to do with ClickOnce other than launching the ClickOnce app after it finishes. It's confusing because Visual Studio mashes it all together so everyone thinks they're related.

If you don't want everyone to have SQL Express, then remove it from your Visual Studio prereqs. From there, you can handle it manually in your code as long as your application can start without SQL Express installed. On app startup you can check the registry to see if SQL Express is installed, then download it, and launch the installer. I did this with a Crystal Reports installer and it worked out OK.

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