From the registry, for a given file type, I get a string containing something like this:
\"C:\\Program Files\\AppName\\Executable.exe\" /arg1 /arg2 /arg3
I had a similar problem (parsing a ClickOnce UninstallString from the registry to execute using System.Diagnostics.Process). I resolved it by removing tokens from the end of the uninstall string until I could detect a valid file path.
public static string GetExecutable(string command)
{
string executable = string.Empty;
string[] tokens = command.Split(' ');
for (int i = tokens.Length; i >= 0; i--)
{
executable = string.Join(" ", tokens, 0, i);
if (File.Exists(executable))
break;
}
return executable;
}