//程序位置 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);
