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
查看全文
相关阅读:
[翻译] FreeStreamer 在线流媒体播放
[转] 每个程序员都必须遵守的编程原则
iOS7以下设备获取mac地址
iOS中alloc与init
ON、WHERE、HAVING的区别
在SQL语言中,join什么时候用,什么时候不用啊?请高手举例解释一下。谢谢
你能识别这些科技公司的真假logo吗?
in 和 exist 区别
union和union all的区别
Mysql避免全表扫描sql查询优化 .
原文地址:https://www.cnblogs.com/xiaobaigang/p/967590.html
最新文章
【转】kafka概念入门[一]
ZooKeeper典型使用场景一览
kafka内置的zookeeper
Hardware/Firmware/Software的区别
react-redux 之 provider 和 connect
react-router-dom
js 终止执行的实现方法
js 判断对象中所有属性是否为空
判断js对象是否拥有某属性
vue 获取屏幕宽高 width height
热门文章
vue 获取当前时间 格式YYYY-MM-DD
js中splice()的强大(删除,插入或替换数组的元素)
antd 表单验证
Object.getOwnPropertyNames()
利用UIWebView获取userAgent需要注意的地方
修改后无警告全面支持non-ARC以及ARC的OpenUDID
使用addChildViewController手动控制UIViewController的切换
适配iOS6与iOS7
利用 FastCoding 将对象进行本地持久化
将 MRC 项目转换为 ARC 项目
Copyright © 2011-2022 走看看