ClickOnce 检查更新而不执行应用程序
我在一家服务组织工作,内部工具的用户经常与网络脱节。经常出现的情况是,执行服务任务的服务工程师因某些内部工具的过时版本而“陷入困境”。
这些工具是使用 ClickOnce 发布 VS2010 .NET4 进行部署的。如果用户在仍连接到公司网络的情况下运行所有应用程序,他们将收到新版本可用的通知。随着各种工具数量的增加,某些应用程序未更新的可能性也会增加。
是否可以通过批处理文件或其他方式自动执行此过程? 这样一来,工程师只需在连接到公司网络时运行一个文件即可获取其已安装工具的所有最新版本?
补充:
更简单的说法是在公司网络上运行“类似 Windows 更新的内容”,但适用于内部 ClickOnce 应用程序。
I work in a service organization where users of our internal tools are often disconnected. It is often the case that service engineers on service assignments are "stranded" with an outdated version of some internal tool.
These tools are deployed using ClickOnce publish VS2010 .NET4 . If the users run all their apps while still connected to corporate network, they would get a notification that a new version was available. As the number of various tools increase, the chance increases that some app is not updated.
Is it possible to automate this process, by a batch file or something?
So that the engineers just need to run one file when connected to corporate nw to get all the newest versions of their installed tools?
Added:
An easier way of saying it would be to have "something like Windows update" operating on corporate net, but for internal ClickOnce apps.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
非常有趣的问题。我想不出一个快速的方法来做到这一点,但这绝对是可能的。
我将创建另一个 ClickOnce 应用程序,其工作是更新其他 ClickOnce 应用程序。此应用程序需要每个应用程序的
.application
文件的 URL。如果所有工程师都应该拥有所有应用程序,那就很容易了。如果没有,也许您可以查看他们的开始菜单并找到所有 ClickOnce 应用程序参考文件。这些文件包含 url。接下来,只需启动 url 并传递查询字符串参数...
http://server/MyApp/MyApp.application?UpdateOnly=true
在应用程序启动时,您可以检查查询字符串参数并关闭应用程序(如果它使用
UpdateOnly= 运行)正确。
附注一。如果您将每个应用程序的最低所需版本设置为最新版本,则用户不会收到新版本对话框的提示。似乎您想要这样做,否则用户仍然需要集中注意力并进行大量点击。
Very interesting question. I can't think of a quick way to do this, but it's definitely possible.
I would create another ClickOnce app whose job is to update the other ClickOnce apps. This app needs the url of each app's
.application
file. If all engineers are supposed to have all apps, that's easy. If not, maybe you could look through their start menu and find all the ClickOnce Application Reference files. Those files contain the url.Next, just launch the url and pass a query string argument...
http://server/MyApp/MyApp.application?UpdateOnly=true
In the startup of your applications, you can check the query string argument and shut down the app if it's run with
UpdateOnly=true
.One side note. If you set the minimum required version of each of your apps to the latest version, users won't get prompted with the new version dialog. Seems like you'd want to do that or the user would still have to pay attention and do a lot of clicking.