例如启动记事本是这样的System.Diagnostics.Process.Start("notepad.exe");但是我不知道括号里该写什么??

解决方案 »

  1.   

    notepad.exe是系统程序 你这样写当然可以
    至于QQ 我觉得应该写完整路径
      

  2.   


    System.Diagnostics.Process.Start("D:\\PROGRAM FILES\\QQ2009\\Bin\\QQ.exe");我的QQ路径是"D:\PROGRAM FILES\QQ2009\Bin\QQ.exe"
    你上面弄成完整路径就可以了
    我测试我成功的
      

  3.   

    从注册表里读取QQ安装路径,然后:
    System.Diagnostics.Process.Start(@"安装目录/QQ.exe");
      

  4.   

    对 Start("")中的参数将是qq的完整路径即可
      

  5.   

    我目前机器没有安QQ,但似乎在HKEY_LOCAL_MACHINE\SOFTWARE\QQ键下。在cmd里,regedit就能看注册表。
      

  6.   


    <input type="button">
      

  7.   

    其实我也发过这样的帖子,如何在C#中使用应用程序,例如,mp3,tet,或其他文件!
    无人解决!有的说不行!
      

  8.   

    System.Diagnostics.Process.Start("D:\\PROGRAM FILES\\QQ2009\\Bin\\QQ.exe");
    括号里面是写执行文件的路经
      

  9.   


    using System; 
    using System.Collections; 
    using System.ComponentModel; 
    using System.Data; 
    using System.Drawing; 
    using System.Text; 
    using System.Windows.Forms; 
    using System.Threading; 
    using System.Diagnostics; 
    using System.Security.Cryptography; namespace QQ_AutoStart
    {
    /// <summary>
    /// Form1 的摘要说明。
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    {
    /// <summary>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.Container components = null; public Form1()
    {
    //
    // Windows 窗体设计器支持所必需的
    //
    InitializeComponent(); //
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    //
    } /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    if( disposing )
    {
    if (components != null) 
    {
    components.Dispose();
    }
    }
    base.Dispose( disposing );
    } #region Windows 窗体设计器生成的代码
    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
    // 
    // Form1
    // 
    this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
    this.ClientSize = new System.Drawing.Size(292, 266);
    this.Name = "Form1";
    this.Text = "Form1";
    this.Load += new System.EventHandler(this.Form1_Load); }
    #endregion /// <summary>
    /// 应用程序的主入口点。
    /// </summary>
    [STAThread]
    static void Main() 
    {
    Application.Run(new Form1());
    } private void Form1_Load(object sender, System.EventArgs e)
    {
    string qqPath = @"E:\Program Files\Tencent\QQ\QQ.exe"; //改为你的qq安装路径 Process.Start(qqPath);  this.Close();
    } }
    }