自动下载最新版本的应用程序 [英] Auto download latest version of application
问题描述
嗨
我在大约15个台式机上运行Win Forms应用程序。用户都有myProgram.exe的桌面快捷方式更新涉及到每个站点并在站点上删除新的exe。应用程序连接到SQL服务器数据库
我想要做的是将最新版本的应用程序放在数据库的表中,以及新的副本在某个地方的网络文件夹中的版本,然后使用某种启动应用程序检查数据库,如果该应用程序不是最新版本,从服务器获取最新版本的exe并运行它。我不想重命名桌面快捷方式,所以想保持myProgram.exe文件名相同。我在应用程序中使用配置文件进行某些用户设置,因此可以在其中放置一些版本的信息,并在每次从服务器下载新版本时更新配置文件?
我假设我需要编写一个新应用程序来检查数据库,进行下载(如果需要)然后启动myProgram?
可以有人提供了一些最佳方法的例子吗?
Hi
I have a Win Forms app running on about 15 desktops. Users all have a Desktop shortcut to the myProgram.exe Updates involve going to each station and dropping the new exe on the station. App connects to a SQL server DB
What I would like to do is put the latest version of the app in a table in the DB, and a copy of the new version in a folder on the network somewhere and then use some sort of start-up app that checks the DB, and if the app is not the latest version, fetch the newest version of the exe from the server and run it. I dont want to have to rename the desktop shortcut, so would like to keep the myProgram.exe filename the same. I use a config file with the app for some user settings, so could put some info on the version in there, and update the config file each time a new versions is downloaded from the server?
I assume I need to write a new app to check the db, do the download (if needed) and then start the myProgram?
Can anyone offer some examples of the best way to do this?
推荐答案
您是否看过ClickOnce部署?您所描述的内容听起来非常适合在网络共享上进行集中部署。每次应用程序启动时,它都会检查网络共享以获取更新版本并更新本地副本(如果有)。
看看这里:
ClickOnce安全和部署 [ ^ ]
但是这不是由数据库,但通过更新网络共享上的部署。
Did you take a look at ClickOnce deployment? What you describe sounds like a good fit for a central deployment on a network share. Everytime the application starts it checks the network share for a newer version and updates the local copy if available.
Take a look here:
ClickOnce Security and Deployment[^]
However this is not driven by the database, but by updating the deployment on the network share.
很可能有很多方法可以做到这一点。您可以将新版本(安装程序)放在服务器上,可以使用小应用程序下载它以进行更新。数据库是保存版本的好方法,应用程序可以检查此版本。我通常将应用程序版本设置为与更新版本相同,程序可以通过数据库检查它的版本 - 如果它不同,则启动更新程序应用程序,下载并运行它。
There are most likely many ways to do this. You can place the new version(installer) on a server, where it can be downloaded with a small app for updating. The database is a great way to hold the version and the app can check this version. I typically set the app version same as update version that way the program can check it''s version with the database - if it''s not the same launch the updater app, download and run it.
>
你所描述的听起来很合适
What you describe sounds like a good fit
这是完美契合!这可能让我在Dot Net Frameworks等方面遇到了很多麻烦:)
谢谢米尔
That''s a perfect fit! This could have saved me LOTS of trouble with Dot Net Frameworks etc :)
Thanks a Mil
这篇关于自动下载最新版本的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!