How to start a new application instance from within the application?

c#, wpf

Solution

I have found the solution

Process p = new Process();
p.StartInfo.FileName = 
    System.Reflection.Assembly.GetExecutingAssembly().Location;
p.Start();

Problem

When the user clicks a button i want to start a new instance of my application. When i use this code it throws an error: ``` new Application().Run(); ``` Cannot create more than one System.Windows.Application instance in the same AppDomain.

Original source