<p>Opening an Infopath form with parameter can be done like this:</p>

<pre><code>System.Diagnostics.Process.Start(PathToInfopath + "infopath.exe", "Template.xsn /InputParameters Id=123");
</code></pre>

<p>But that requires I know the path to Infopath.exe which changes with each version of Office.  Is there a way to simply launch the template and pass a parameter? Or is there a standard way to find where Infopath.exe resides?</p>

[{'answer_id': 82291, 'author': 'Steve', 'author_id': 15526, 'author_profile': 'https://Stackoverflow.com/users/15526', 'pm_score': 1, 'selected': False, 'text': "<p>Play around with System.Diagnostics.ProcessStartInfo which allows you to specify a file you wish to open and also allows you to specify arguments.</p>\n\n<p>You can then use Process.Start(ProcessStartInfo) to kick off the process. The framework will determine which application to run based on the file specified in the ProcessStartInfo.</p>\n\n<p>I don't have Infopath installed so I unfortunately can't try it out. But hopefully it helps you out a little.</p>\n"}, {'answer_id': 90804, 'author': 'bryansh', 'author_id': 211367, 'author_profile': 'https://Stackoverflow.com/users/211367', 'pm_score': 1, 'selected': False, 'text': '<p>Here\'s an article about finding the install path for Office Apps:</p>\n\n<p><a href="http://support.microsoft.com/kb/234788" rel="nofollow noreferrer">http://support.microsoft.com/kb/234788</a></p>\n'}, {'answer_id': 984209, 'author': 'Jason Watts', 'author_id': 117526, 'author_profile': 'https://Stackoverflow.com/users/117526', 'pm_score': 0, 'selected': False, 'text': '<p>Try using browser based form and querystring instead</p>\n'}]
['https://Stackoverflow.com/questions/81556', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']