It's my first post on StackOverflow, so please be patient with me :)
I'm looking out for a way to pass a value to an already running application. The application should be able to accept this value and use it for further operations during its lifetime. I'd prefer not to logoff/restart the application in order to use the updated value.
The scenario would be something like this:
The application uses MachineName to initialize and populate some objects while it is being instantiated. Once it is up and running, I would like to pass a different workstation name to the application (possibly from command line) and the application should be able to use this MachineName and use it further down the line. I dont mind if I have perform same operations again to initialize the required objects with new MachineName name.
The application in question is a WPF app with C#. It's also using some WCF services as well. I was thinking to use a common registry key to store the workstation name and this registry key needs to be used/updated in the application. So it should be the first point of contact. But I'm not sure if this is a better approach. Any ideas please?