0

I have many programs in my system using Clickonce installation. Some of the programs need to start other programs. Is there a process in which i can determine if the application is already installed and launch it, else launch the installation from the Clickonce location?

For example, User 1 has already installed Program-A, Program-B and Program-C. An option in Program-A requires that I run Program-B, another option requires that I run Program-F. Program-B is installed, while Program-F has not been installed yet.

I can always launch the Clickonce installation, but if the program is already installed, how do I find and launch it instead?

One thing I tried that seemed to work for me was to always launch this

http://MyServer/ClickOnce/Program-F/Program-F.application

But my users are saying that this does not work for them.

rwg
  • 915
  • 9
  • 12
  • Would the discussion found at http://stackoverflow.com/questions/908850/get-installed-applications-in-a-system help solve your problem? – Spelya Feb 18 '13 at 18:01

2 Answers2

0

How are you launching that link? It should work if it is the installation link for the original application. Are you launching it with IE or some other browser that you know is installed?

process.start("ie.exe", "http://yourserver/yourapp/themanifest.application");

If you launch from the deployment manifest (.application file) and the application is already installed, it will simply launch it. If it is not installed, it will install it.

RobinDotNet
  • 11,723
  • 3
  • 30
  • 33
0
var sb = new StringBuilder();
sb.Append(Environment.GetFolderPath(Environment.SpecialFolder.Programs));
sb.Append("\\");
sb.Append("Your Company");
sb.Append("\\");
sb.Append("YourApp.appref-ms");
var shortcutPath = sb.ToString();
Process.Start(shortcutPath);
Chris
  • 4,672
  • 13
  • 52
  • 93
Alexeins
  • 11
  • 2