.NET软件自动更新 [英] .NET AutoUpdate for Software

查看:245
本文介绍了.NET软件自动更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的程序,该程序具有自动软件更新程序.该软件是一个监视程序,应始终运行.

I have an existing program that has an automatic software updater.  The software is a monitoring program and should always be running.

过程:

检查互联网以获取较新版本.

Check internet for newer version.

如果找到了,请将正在运行的程序重命名为"appname2.exe"

If found, rename the running program to "appname2.exe"

重命名后,下载新版本.

After renaming, download the new version.

计算机重新启动,并且该软件当时默默地删除了appname2.exe

Computer is rebooted and at that time, the software silently deleted the appname2.exe

我已经在Vista上尝试过此操作,但发现了问题.所述无声删除"指的是无声删除".现在可以提示用户(管理员级别)删除文件.目前,我已通过重命名旧程序并将其放在程序目录子文件夹中来修改该软件以在Vista上运行.该程序只有400 kb,所以我不担心大小-更新很少.

I've tried this on Vista and found a problem.  The "silent delete" now prompts the user (admin level) if it's ok to delete the file.   For now, I've modified the software to work on vista by renaming the old program and placing it in a program directory sub folder. THe program is only 400 kb so I'm not worried about size - and updates are rare.

该程序在VB.NET 2003 1.1框架中.

This program is in VB.NET 2003 1.1 framework.

是否有一种方法可以制作在Vista中运行的无提示更新程序?如果是这样,我可以使用vb.net 2003还是要进入vb.net 2005?

Is there a way to make a silent updater that works in Vista?  If so, can I do it with vb.net 2003 or do I need to go to vb.net 2005?

推荐答案

请记住,即使在Vista中,即使您以管理员身份登录,也没有真正的管理员权限,直到有人请求它,而用户同意了该请求.

Remember that under Vista even when you are logged in as an Administrator, you don’t really have admin rights until something requests it and the user grants the request.

发生的情况是,原始文件安装时具有较高的凭据,这意味着用户通常具有的低权限不足以修改或删除旧版本.

Chances are what happened was that the original file as installed with elevated credentials which means that the low rights the user normally has are not enough to modify or delete the old version.

无论如何...只要启用了UAC,您就必须在某个时候提升权限...无论是删除文件还是更改原始文件的所有权.

No matter what... so long as UAC is enabled you are going to have to elevate permissions at some point... be it to delete the file or change the ownership of the original file.


这篇关于.NET软件自动更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆