views:

43

answers:

1

If I publish two separate C# Windows forms apps to a server, and a user installs both of these apps on their machine, how would I get one app to call the other (possibly with parameters) from a button click?

I don't really understand all this publish and manifest business - the exe doesn't seem to physically exist on the user's pc, so how can I possibly call it with code? I know how to call an exe if I know where it is.... but where is it?

Please help!

Thanks

+2  A: 

I'm assuming you're talking about ClickOnce. ClickOnce apps are completely sandboxed from one another (unless you're running with FullTrust).

If the two apps know about each other, you can do a Process.Start using a ProcessStartInfo object that has UseShellExecute set true, and the Filename as the full web path to the .application file of the second app. This will make sure it works even if the second app hasn't been downloaded yet. You can pass parameters on the query string and get to them from ApplicationDeployment.ActivationUri.

This is kinda hacky though- you might want to consider if it's possible to combine the apps...

nitzmahone
Combining the apps is not an option I'm afraid. I'm going to use your suggestion. Thanks very much for the response.
JamesW