从浏览器下载单击一次应用程序

发布于 2024-11-28 12:52:07 字数 513 浏览 1 评论 0原文

我正在开发 win 应用程序,进行了设置,并将其放在现场。当某些用户第一次访问网站时,它会提示用户下载我的应用程序。在运行安装程序时,我在注册表中创建了一个密钥,该密钥已由站点在我的脚本中检查,如果密钥存在,则不会在用户安装应用程序时提示用户。当用户卸载应用程序时,安装程​​序将删除安装时写入的注册表项。

注意:我将我的网站添加到受信任的网站,并更改其安全性以读取我的脚本。

现在情况发生了变化,用户要求在 clickonce 中实现应用程序,因此他们必须更新应用程序而不是卸载并重新安装它。他们仍然希望如上所述在网站上安装 clickonce 应用程序,但这里的问题是,当我第一次运行应用程序时,它会为该应用程序写入注册表,但在卸载时它不会删除注册表。正如以下链接通过单击一次设置注册表项中提到的。

有什么办法可以实现这个要求吗?任何帮助将不胜感激

i was working on win application made its setup, and put it on site. when some user comes to site for first time it pormpts user to download my application. and while running setup i created a key in registry, that was checked in my script by site, that if key exists than user will not be prompted as he/she has installed app. when user uninstalls application, setup will delete regisrty key, wirtten on installation time.

Note: i added my site to trusted site and chaged its security to read my script.

Now scenario changes, user has asked to implement app in clickonce, so that they had to update app instead of uninstall and reinstall it. they still want clickonce app setup on site as mentioned above, but problem here is that when i run app first time it will write registry for that application but on uninstall it will not delete registry. as it is mentioned in following link set registry key through click once.

is there any way to accomplish this requiremnent. any help will b appreciated

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

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

发布评论

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

评论(2

独孤求败 2024-12-05 12:52:07

检查“发布”设置中是否启用了更新选项(如果需要,请指定更新的最低版本)。
当应用程序启动时,它会自动检查更新。用户无需每次都卸载

check the update option is enable in the Publish settings ( if needed specify the minimum version for updating specify it also) .
when the application starts it will automatically checks for update. user dont need to uninstall every time

幽蝶幻影 2024-12-05 12:52:07

如果您想在应用程序卸载之前删除注册表项,则需要从代码中您可以控制的位置启动卸载过程。为此,您需要让用户从您的应用程序内启动卸载过程。当用户开始卸载过程时,您需要先从应用程序中删除注册表项,然后才能继续卸载。

Jim Harte 有一篇关于自动卸载的优秀博客文章(此处)重新安装过程。他的文章是关于证书续订的问题,但卸载过程是相同的。

如果您的用户通过“添加/删除程序”对话框卸载应用程序,则该密钥不会被删除。不幸的是,据我所知,没有办法停止 ClickOnce 应用程序的卸载过程,以便您可以删除注册表项。这只是你必须忍受的烦恼,除非这里的其他人找到了“创造性”的解决方案。

If you want to remove a registry key before the application uninstalls you will need to launch the uninstall process from a location within your code that you can control. To do this, you will need to have the user launch the uninstall process from within your application. When the user starts the uninstallation process, you will need to remove the registry key from within your application before continuing the uninstallation.

There is an excellent blog post (found here) by Jim Harte regarding automating the uninstall/reinstall process. His article is in regards to an issue with certificate renewal, but the uninstall process is the same.

If your user uninstalls the application through the Add/Remove Programs dialog, the key will not be removed. There is unfortunately no way that I am aware of to halt the uninstall process of a ClickOnce application so that you can remove a registry key. It's just an annoyance that you will have to live with, unless someone else around here has found a "creative" solution.

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