Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# - Process.Start a ClickOnce application? What URL?

I'm 3-months new to WPF and trying to build a launchy app for fun (app launcher type thingie by name).

I can't seem to launch ClickOnce applications by Process name.

In other words:

  • Process.Start("Firefox"); // will work
  • Process.Start("MetroTwit"); // a ClickOnce app - will NOT work

I've read that you should be calling it by URL? But where do you find out the URL of the installed clickonce apps?

Ideally I'd want to refresh a List of apps installed on the users system (program files & clickonce & AIR clients) every minute or so and do fuzzy search on type etc.

Help greatly appreciated.

like image 609
keyle Avatar asked Jul 13 '10 11:07

keyle


1 Answers

You don't even need to parse the start folders. The location of that startup is here:

shortcutName = 
  string.Concat(Environment.GetFolderPath(Environment.SpecialFolder.Programs),
                "\\", publisher_name, "\\", product_name, ".appref-ms");

Where publisher_name and product_name are the ones set in the Options dialog in the publish properties.

like image 109
RobinDotNet Avatar answered Sep 28 '22 06:09

RobinDotNet