[RESOLVED] [2005] Passing parameters from one application to another?
Hi again,
I'm not even sure if is easily doable but I have two separate applications. One scans a remote machine for WMI info and the other builds WMI queries that can be run against a list of remote machines. This second application then returns a list of machines matching the WMI query
What I would like to be able to do is select one of the machines returned by the WMI query builder application and then have the scanning application scan it.
So, basically, passing a parameter to an already running, but separate, application.
Is this possible?
Re: [2005] Passing parameters from one application to another?
Quote:
What I would like to be able to do is select one of the machines returned by the WMI query builder application and then have the scanning application scan it. So, basically, passing a parameter to an already running, but separate, application.
I'd say yes its possible. You can either use a common registry key to store the machine name to be queried. The second app should then have a timer system to pick up the machine name, set a flag as being busy and then run the necessary query.
If you don't want to use the registry you could use a temporary file that the second app would watch using FileSystemWatcher. Or you could use a temporary database table.
You could shell the second app but since you stated that the second app is already running you have to use one of the above mechanisms.
Re: [2005] Passing parameters from one application to another?
If you are using 2005 then you make it a single instance application and then get parameters via comment line in the StartUpNextInstance application event.
Read up on that event in the help docs.
Re: [2005] Passing parameters from one application to another?
Perfect, that's exactly what I was looking for. Thanks.