I have found this solution (not very good but it is the only one).
To find if the application is installed i search in the "program start menu"
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu),
"Programs\\<company>");
path = Path.Combine(path, "<app name>") + ".appref-ms";
if (!File.Exists(path))
{
// TODO: launch application (es: Process.Start...)
}
If you have to pass parameters you can open as text this link and grab the url of the publication server and append your parameters:
if (!File.Exists(path))
{
// http://www.mysite.com/MyApp.application#MyApplication.app, Culture=neutral,
// PublicKeyToken=afc42bbb4bb73e70, processorArchitecture=msil
string content = File.ReadAllText(path);
path = content.Split('#')[0];
}
// TODO: append you parameter to 'path'
If there are best solutions please notify me, bye!