Click here to Skip to main content
15,887,821 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I read a specific node in XML file ? Pin
leppie13-Jun-08 3:52
leppie13-Jun-08 3:52 
QuestionChange Page Doctype Pin
tadhg8813-Jun-08 3:05
tadhg8813-Jun-08 3:05 
AnswerRe: Change Page Doctype Pin
leppie13-Jun-08 12:17
leppie13-Jun-08 12:17 
GeneralRe: Change Page Doctype Pin
tadhg8815-Jun-08 22:52
tadhg8815-Jun-08 22:52 
QuestionCombobox value member Pin
countnazgul13-Jun-08 2:42
countnazgul13-Jun-08 2:42 
QuestionHI, Pin
nabeelkhan13-Jun-08 2:38
nabeelkhan13-Jun-08 2:38 
AnswerRe: HI, Pin
Simon P Stevens13-Jun-08 2:52
Simon P Stevens13-Jun-08 2:52 
QuestionKilling the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 1:36
Neeraj Kr13-Jun-08 1:36 
When I run the following code from inside the Visual Studio, it works fine, but when I run the exe, it restarts my machine.

I have written the following code:

System.Diagnostics.Process[] prs = System.Diagnostics.Process.GetProcesses();

foreach (System.Diagnostics.Process proces in prs)
{
try
{
if (proces.ProcessName.ToLower().ToString().Trim() != "" && proces.ProcessName.ToLower().ToString().Trim() != "manageallprocess.vshost" && proces.ProcessName.ToString().Trim() != "ManageAllProcess" && proces.ProcessName.ToLower().ToString().Trim() != "devenv" && proces.ProcessName.ToUpper().ToString().Trim() != "EXPLORER" && proces.ProcessName.ToString().Trim() != "Explorer" && proces.ProcessName.ToLower().ToString().Trim() != "explorer" && proces.ProcessName.ToLower().ToString().Trim() != "system" && proces.ProcessName.ToLower().ToString().Trim() != "idle" && proces.ProcessName.ToLower().ToString().Trim() != "svchost" && proces.ProcessName.ToUpper().ToString().Trim() != "SVCHOST" && proces.ProcessName.ToString().Trim() != "SvcHost")
{
proces.Refresh();
if (!proces.HasExited)
{
proces.Kill();
proces.WaitForExit();
}

}
}
catch (Exception exc)
{ }

-----Have A Nice Day-----

AnswerRe: Killing the Processes Using process.Kill() restarts the system Pin
Ashfield13-Jun-08 2:08
Ashfield13-Jun-08 2:08 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 2:42
Neeraj Kr13-Jun-08 2:42 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Simon P Stevens13-Jun-08 2:51
Simon P Stevens13-Jun-08 2:51 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 2:55
Neeraj Kr13-Jun-08 2:55 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Simon P Stevens13-Jun-08 3:04
Simon P Stevens13-Jun-08 3:04 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 3:08
Neeraj Kr13-Jun-08 3:08 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Simon P Stevens13-Jun-08 3:22
Simon P Stevens13-Jun-08 3:22 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 2:55
Neeraj Kr13-Jun-08 2:55 
AnswerRe: Killing the Processes Using process.Kill() restarts the system Pin
User 665813-Jun-08 2:39
User 665813-Jun-08 2:39 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 2:47
Neeraj Kr13-Jun-08 2:47 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Dan Neely13-Jun-08 3:03
Dan Neely13-Jun-08 3:03 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 3:50
Neeraj Kr13-Jun-08 3:50 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Ashfield13-Jun-08 3:02
Ashfield13-Jun-08 3:02 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
Neeraj Kr13-Jun-08 3:35
Neeraj Kr13-Jun-08 3:35 
GeneralRe: Killing the Processes Using process.Kill() restarts the system Pin
leppie13-Jun-08 3:50
leppie13-Jun-08 3:50 
QuestionEvent gets interrupted Pin
Member 447129213-Jun-08 1:25
Member 447129213-Jun-08 1:25 
AnswerRe: Event gets interrupted Pin
Guffa13-Jun-08 1:51
Guffa13-Jun-08 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.