在程序启动前执行其实exe文件
2010-03-02 09:16
274 查看
在program.cs文件中,启动应用程序前,
使用
if (System.IO.File.Exists("QQ.exe"))
{
System.Diagnostics.Process.Start("QQ.exe");
}
便可以实现在启动前先执行其实exe文件,比如升级功能
也可以将帮助文档做成web页面(选择帮助菜单后弹出web页面)
private void button2_Click(object sender, System.EventArgs e)
{
string strFilePath = Application.StartupPath +@"\HTMLPage1.htm";
MessageBox.Show(strFilePath);
System.Diagnostics.Process.Start(strFilePath);
}
另外还有两个简单应用
System.Diagnostics.Process.Start("shutdown",@"/l");//------------注销计算机
System.Diagnostics.Process.Start("shutdown",@"/r");//------------重起计算机
使用
if (System.IO.File.Exists("QQ.exe"))
{
System.Diagnostics.Process.Start("QQ.exe");
}
便可以实现在启动前先执行其实exe文件,比如升级功能
也可以将帮助文档做成web页面(选择帮助菜单后弹出web页面)
private void button2_Click(object sender, System.EventArgs e)
{
string strFilePath = Application.StartupPath +@"\HTMLPage1.htm";
MessageBox.Show(strFilePath);
System.Diagnostics.Process.Start(strFilePath);
}
另外还有两个简单应用
System.Diagnostics.Process.Start("shutdown",@"/l");//------------注销计算机
System.Diagnostics.Process.Start("shutdown",@"/r");//------------重起计算机
相关文章推荐
- explorer.exe 该文件没有与之关联的程序来执行该操作
- VS2012中出现“无法启动程序...debug\abc.exe,系统找不到指定文件”的问题!
- 禁止双击启动可执行exe文件
- Winform 程序中dll程序集嵌入exe可执行文件
- 如何将python程序封装成exe可执行文件
- Qt生成exe文件上贴图 Qt5.5 on Android 可执行程序贴图
- 将Java桌面程序打包成exe可执行文件
- Java程序生成exe可执行文件详细教程
- 制作一个Flex AIR 程序调用 可执行程序(mxmlc.exe) 并且 生成.as文件并编译为.swf文件
- 自己动手编写启动JAVA程序的EXE文件
- Qt程序打包成exe可执行文件图文教程
- 用py2exe将python文件转换成exe可执行程序
- 在WIN10系统下运行VS2013编译成功后出现:无法启动程序“.exe” 系统找不到指定文件的问题的解决方法
- Qt程序打包成exe可执行文件图文教程
- 将matlab的.m文件打包为独立可执行程序.exe —— 基于Matlab R2015b
- Java程序打包成exe可执行文件
- Qt程序打包成exe可执行文件图文教程
- php启动外部某个可执行的exe文件,exe文件为界面执行文件。
- 如何将JAVA程序制作成可以直接执行的exe文件
- java程序转换成可执行的.exe文件