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
查看全文
相关阅读:
车厢调度
字符串匹配问题x
单词查找树
【説明する】树
计算(calc.cpp) 这题我搞了2晚上qwq
[HDOJ4578]Transformation(线段树,多延迟标记)
[Codeforces670A]Holidays(数学,构造)
[Codeforces677C]Vanya and Label(组合数学,快速幂)
[Codeforces677B]Vanya and Food Processor(模拟,数学)
[Codeforces673C]Bear and Colors(枚举,暴力)
原文地址:https://www.cnblogs.com/xiaobaigang/p/967590.html
最新文章
matplotlib不显示图片
在Anaconda环境下使用Jupyter Notebook
join()
permutations and combinations
平面直接坐标系线段相交问题(小Q(钟神)的问题)
写代码的小女孩
大数乘法
加权quick-union
quick-union
quick-find
热门文章
LeetCode
LeetCode
LeetCode
LeetCode
LeetCode
LeetCode
LeetCode
LeetCode
LeetCode
LeetCode
Copyright © 2011-2022 走看看