I have two desktop applications. For second application to be active, first one needs to be logged in. I have a launcher which can launch both of them simultaneously. But I want to modify it such that second application is launched when first one is logged in (As soon as it starts, it logs in automatically). How should I proceed?
After login, you should start the other application using ProcessStartInfo
. and Process.Start()
method.
In case that by login you mean the user enters username and password, the you cannot depend on the second application be launched by the first one, as a malicious user can run it independently. In this case, you can forward some information in the ProcessStartInfo
's arguments and use them in the second application as arguments to the Main()
method. This data can be used to authenticate the user in the second application.