Register for your free account! | Forgot your password?

You last visited: Today at 15:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



close exe

Discussion on close exe within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
zTREME's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 273
Received Thanks: 51
close exe

how can i make it close an exe file thats open:
ex. if console.exe run
close console.exe

because then the restart will never fail, cuz i make it close the console first.
zTREME is offline  
Old 04/05/2010, 10:28   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
if u close the console first it would not start the server anymore ^^
~Yuki~ is offline  
Thanks
1 User
Old 04/05/2010, 11:45   #3
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Environment.Exit(0);

That what you mean?
Arcо is offline  
Thanks
1 User
Old 04/05/2010, 12:15   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
or

Code:
Environment.Exit(Environment.ExitCode);
xD
PeTe Ninja is offline  
Thanks
1 User
Old 04/05/2010, 19:06   #5
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
I think basically what he wants to do is
Environment.Exit(0);
Process.Start("ProcessName.exe");
Not sure if the process one is correct.
Arcо is offline  
Thanks
1 User
Old 04/05/2010, 19:18   #6
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
Wait, are you trying to close your own process, or close a process from a different one?
To close the process thats running that code:
Code:
Environment.Exit(Environment.ExitCode);
Else you need to do something like this
(using System.Diagnostics; )
Code:
foreach (Process process in Process.GetProcessesByName("console"))
{
    process.Kill();
}
To start a process use
Code:
Process.Start("console.exe"); // this also returns an instance of the class Process by which you can do other things
_tao4229_ is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
/close
05/05/2010 - Off Topic - 2 Replies
/close
close
10/29/2009 - Dragonica - 0 Replies
not available



All times are GMT +1. The time now is 15:06.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.