2

我只是想找出一个很好的解决方案来设计我创建的 Windows 窗体应用程序的更新过程。我想到了应用程序内的一个按钮,用于手动检查更新并在启动应用程序时进行检查。只是我不熟悉技术。我虽然在 FTP 服务器中有更新设置文件,并检查服务器是否有更新,其中包含文件名和版本信息的 txt 文件。当应用程序完成下载更新时,关闭并启动更新设置文件。

对这个问题有什么建议和意见吗?

4

2 回答 2

1

Application updates these days are one of those necessary evils. Thinking of applications that update automatically, I tend to group them into two categories:

  1. Clean updating, once a month or less often, a speedy update without a lot of nagging or clicking. And definitely no sneaky software included like toolbars and desktop search programs... Firefox tends to be "nice" about updates, though its addons can be naggy.
  2. The other group nags constantly, requires a lot of button clicks or that you reboot, takes a long time to 'unpack' (Adobe Acrobat, looking at you), changes settings against your wishes (Java), or is just generally unpleasant.

With those points in mind, design your automatic update to be as user-friendly as possible, and plan on your users sometimes wanting to skip the update (unless it is critical to operation).

At my company we have a small application that requires updates, but also must function in a very time-sensitive environment. To facilitate updates, we have it do the following:

  1. At startup, a text file is checked on an internal URL (this could be an HTTP or FTP call). The version number is compared to the contents of the file.
  2. If the software is up to date, nothing more is done. If not, a dialog is presented informing the user that the application must perform an update. (In our case there is no option to cancel or wait, but I highly recommend it if you can.)
  3. A setup file is downloaded from the same site, and launched via Process.Start command, with some switches to perform an unattended install/update.
  4. The application is launched after installation and the interruption to user is minimal.

Some things you may want to do differently:

  • If not checking for updates at startup, provide an option to schedule update checking or manually perform an update check from (for example) a Help menu.
  • If possible allow the user to cancel or delay an update; there's nothing more frustrating than trying to get work done with a popup dialog asking you to perform an update every few minutes.
  • Make sure you test your install packages or patches before deployment! (Voice of experience!)
于 2010-05-26T22:23:57.820 回答
1

使用 ClickOnce http://msdn.microsoft.com/en-us/library/t71a733d%28VS.80%29.aspx

http://www.15seconds.com/issue/041229.htm

亲切的问候。

于 2010-05-26T22:37:57.270 回答