Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# how to start an application and detect if started

using System.Diagnostics;
using System.IO;
using System.Reflection.Assembly;

class Class
{
	if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(GetEntryAssembly().Location)).Count() > 1) 
	{
		Process.GetCurrentProcess().Kill();
	}
 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #start #application #detect #started
ADD COMMENT
Topic
Name
7+1 =