The exe for the second project should have a predictable location relative to the first exe. Obtaining the absolute path for the folder containing your first EXE is easy:
string myPath = System.Reflection.Assembly.GetEntryAssembly().Location; string myDir = System.IO.Path.GetDirectoryName(myPath);
Then add the relative path of your second exe. It is recommended that you save it in the same directory as the 1st,
string path = System.IO.Path.Combine(myDir, "project2.exe"); System.Diagnostics.Process.Start(path);
The easiest way to get this to work both in the IDE and on the target machine is to let the IDE copy project2.exe. Right-click project1, Add Link, Projects tab, select Project2. The Copy Local property for the link will be True, so project2.exe will be in the same directory as project1.exe
source share