高分求软件自动更新程序,急用,大哥救命! 晕 用.NET的控件都可以做.资料嘛 上个月的开发高手上就有. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 2004年8月《开发高手》上有讲,用的是appupdate控件,代码csdn上有下载.另:http://www.yesky.com/SoftChannel/72342380484755456/20030812/1720983.shtml有一些原理性的文章 private void updatedown_Load(object sender, System.EventArgs e) { try { string remoteUri = "http://www.jsrz.com.cn/kp/"; string fileName = "htkpmgdownmdb.exe", myStringWebResource = null; WebClient myWebClient = new WebClient(); myStringWebResource = remoteUri + fileName; myWebClient.DownloadFile(myStringWebResource,fileName); string sPaths = Application.StartupPath+@"\kpver.ini"; //MessageBox.Show(sPath); ini.IniFile(sPaths); ini.IniWriteValue("Version","VersionNo",update.copynumsdown.ToString()); ini.IniWriteValue("Version","UpdateTime",DateTime.Now.ToString()); Process ps=new Process(); string sPath =Application.StartupPath+@"\update.exe"; ps.StartInfo.FileName=sPath; ps.Start(); Application.Exit(); } catch { MessageBox.Show("网络连接出错,请检查线路!"); } } 也可以通过写个WEB SERVICE来实现,客户端定期扫描WEB SERVICE,如果有新版本了,download new version 发了,请查收,主程序也要写一点代码。//客户端procedure TfrmUpdate.MyUpdate;var sFile: String;//升级程序名(含完整路径)begin lbInfo.Caption := '正在下载新版客户端文件,请稍候'; self.Update; Q_DLFILE.Open; sFile := ExtractFilePath(Application.ExeName) + Q_DLFILE.fieldByName('DLFILE01').AsString;//升级程序的名称 TBlobField(Q_DLFILE.Fields.FieldByName('DLFILE05')).SaveToFile(sFile); Q_DLFILE.Close; WinExec(PChar(sFile),SW_SHOW); Application.Terminate;end;procedure TfrmUpdate.btnOkClick(Sender: TObject);begin btnOk.Visible := False; Label1.Visible := False; MyUpdate;end; Kill()杀不死360安全产品的进程,怎么办?【跪求高手】 问个关于c#怎么读取Excel的问题 程序用的是SQL2000,我现在装的是SQL2008,这。。。 datagridview 中改变行的位置 导入excel的问题 大伙看看我用C#写的这个服务程序为啥有问题~ 文件读写问题???? 急!导出到Excel中为什么都在同一列里面了?! 一个很严重的问题,发展趋势,是作C/S赚钱,还是b/s更有前途阿??????? 关于在C#中画 矩形 的问题? C#网络应用编程的问题,请在百忙中看一看 Remoting 还是WEB Service?寻求解决方案
另:http://www.yesky.com/SoftChannel/72342380484755456/20030812/1720983.shtml
有一些原理性的文章
{
try
{
string remoteUri = "http://www.jsrz.com.cn/kp/";
string fileName = "htkpmgdownmdb.exe", myStringWebResource = null;
WebClient myWebClient = new WebClient();
myStringWebResource = remoteUri + fileName;
myWebClient.DownloadFile(myStringWebResource,fileName); string sPaths = Application.StartupPath+@"\kpver.ini";
//MessageBox.Show(sPath);
ini.IniFile(sPaths);
ini.IniWriteValue("Version","VersionNo",update.copynumsdown.ToString());
ini.IniWriteValue("Version","UpdateTime",DateTime.Now.ToString());
Process ps=new Process();
string sPath =Application.StartupPath+@"\update.exe";
ps.StartInfo.FileName=sPath;
ps.Start();
Application.Exit();
}
catch
{ MessageBox.Show("网络连接出错,请检查线路!");
} }
//客户端
procedure TfrmUpdate.MyUpdate;
var
sFile: String;//升级程序名(含完整路径)
begin
lbInfo.Caption := '正在下载新版客户端文件,请稍候';
self.Update;
Q_DLFILE.Open;
sFile := ExtractFilePath(Application.ExeName) + Q_DLFILE.fieldByName('DLFILE01').AsString;//升级程序的名称
TBlobField(Q_DLFILE.Fields.FieldByName('DLFILE05')).SaveToFile(sFile);
Q_DLFILE.Close;
WinExec(PChar(sFile),SW_SHOW);
Application.Terminate;
end;procedure TfrmUpdate.btnOkClick(Sender: TObject);
begin
btnOk.Visible := False;
Label1.Visible := False;
MyUpdate;
end;