Two .NET apps run on the same machine simultaneously and are able to communicate with each other. Clicking a button in one app must trigger both apps to restart themselves with different command line parameters. I need a solution which avoids multiple instances of either app and does not rely on hard coded timeouts to wait for apps to close, start etc.
From what I understand, this precludes the use of Application.Restart() or having each app launch another instances of itself and then terminating the original instances.
The reason a restart is required is to cause the apps to start in a certain configuration which is determined at app start up and cannot be modified afterward.
Building on DMoses answer,
Application.StartupPathandProcess.Start(...)should be able to put it together to do the restarts in the order specified.