zoukankan
html css js c++ java
软件手动更新代码(vs2003) 转载cnblogs
启动更新程序执行文件
private
void
button2_Click(
object
sender, System.EventArgs e)
{
string
updateAppPath
=
Common.AppStartPath
+
@"
\AutoUpdate.exe
"
;
if
(
!
File.Exists(updateAppPath))
{
MessageBox.Show(
"
无法找到AutoUpdate应用程序!
"
);
return
;
}
string
argments
=
Process.GetCurrentProcess().Id.ToString();
ProcessStartInfo startInfo
=
new
ProcessStartInfo(updateAppPath, argments);
Process updateApp
=
new
Process();
updateApp.StartInfo
=
startInfo;
updateApp.Start();
}
得到启动程序的所在的文件夹路径
private
static
string
strAppPath
=
String.Empty;
/**/
///
<summary>
///
系统启动路径
///
</summary>
public
static
string
AppStartPath
{
get
{
if
(strAppPath
==
String.Empty)
{
strAppPath
=
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
System.Uri uriPath
=
new
Uri(strAppPath);
strAppPath
=
uriPath.LocalPath.Replace(
'
/
'
,
'
\\
'
);
}
return
strAppPath;
}
}
项目Domo下载:
https://files.cnblogs.com/xiaobaigang/test.rar
查看全文
相关阅读:
jquery中的 deferred之 deferred对象 (一)
javascript函数嵌套时arguments的问题
Jquery中的 Deferred分析
Javascript面试题收集
jquery中的callbacks之我见
javascript正则表达式中 (?=exp)、(?<=exp)、(?!exp)
javascript中正则表达式中的 match,exec,test,replace 之我理解
删除域帐户/网络帐号密码 重新登录域服务器
jQuery.extend 与 jQuery.fn.extend
HttpMessageConvert
原文地址:https://www.cnblogs.com/xiaobaigang/p/967590.html
最新文章
关于机器学习中线性分类器与非线性分类器的几点思考
关于样本方差以及样本协方差的一点思考
机器视觉----LBP
Apriori算法的原理与python 实现。
浅谈数据挖掘中的数据处理(缺失值处理以及异常值检测)
机器学习笔记----Fuzzy c-means(FCM)模糊聚类详解及matlab实现
浅谈数据挖掘中变量的相关关系
解决Python中不能输入汉字的问题
机器学习---核函数
Linux Oracle数据库的安装
热门文章
Java调用Oracle存储过程
Linux Java开发环境
JSP 基于Oracle分页
Linux学习笔记 (四)归档和压缩
Linux学习笔记 (三)Vi文本编辑器
Linux学习笔记 (二)常用linux命令
Linux学习笔记 (一)初识linux
程序员必须知道的10大算法(转)
Linux下的各文件夹的作用(转)
jquery中的 deferred之 then (二)
Copyright © 2011-2022 走看看