All InfoPath forms have a PI (processing instructions) which will contain the href. Something like this:
<?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:Form1:http---rgs-ru-Form1" href="file:///C:\YourInfoPathForm\manifest.xsf" solutionVersion="1.0.0.60" productVersion="11.0.6357" PIVersion="1.0.0.0" ?>
You can use substring-before and substring-after to pull out the value of href.