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
查看全文
相关阅读:
搭建 structs2 环境
数据库基础
好书推荐整理
Java 完美判断中文字符
中文在unicode中的编码范围
[转载]爬虫的自我解剖(抓取网页HtmlUnit)
web应用配置
简单的Java Web服务器
dos基本命令
Unrecognized Windows Sockets error: 0: JVM_Bind
原文地址:https://www.cnblogs.com/xiaobaigang/p/967590.html
最新文章
HTML5 拖放并删除效果的简单实现
開發PlainTasks與JSON的插件
Redis 学习记录
Nginx 反向代理服务器 学习记录
WCF、WebAPI、WCFREST、WebService之间的区别
WebService 学习笔记
Lucene.net+盘古分词 做站内搜索
Memcache 学习记录
log4net 学习记录
Spring.net学习记录
热门文章
Kindeditor学习中的那些坑
webapi 如何添加过滤器,并在过滤器中获取客户端传过来的参数
查询之 一对多与多对一查询的综合:
Structs2 中拦截器获取请求参数
中心对称
为什么不能在 body 标签的前面的 script 标签中定义 JS 全局变量?
轮播图(改进版)
JS中 confirm() 方法
Jar 初步
关于Java 中跳出多重循环
Copyright © 2011-2022 走看看