//程序位置
                        string strAppFileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
                        System.Diagnostics.Process myNewProcess = new System.Diagnostics.Process();
                        //要启动的应用程序
                        myNewProcess.StartInfo.FileName = strAppFileName;
                        // 设置要启动的进程的初始目录
                        myNewProcess.StartInfo.WorkingDirectory = Application.ExecutablePath;
                        //启动程序
                        myNewProcess.Start();
                        //结束该程序
                        Application.Exit();
                        //结束该所有线程
                        Environment.Exit(0);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-08-12
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-05
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-09-13
相关资源
相似解决方案