Modifying InfoPath manifest.xsf file from script (5/5)

Part 5 of 5: The final function


And the final function is


function FixupSolutionXSN(








      var XsnInputPath = Combine(inputDirectory, xsnInputName);

      var XsfInputPath = Combine(inputDirectory, "manifest.xsf");

      var XsfOutputPath = Combine(outputDirectory, "manifest.xsf");


      ExtractFilesFromXSN(XsnInputPath, outputDirectory);

      FixupXSF(XsfInputPath, XsfOutputPath, serviceURL, wsdlURL);

      MakeXSNFromFiles(inputDirectory, "manifest.xsf", outputDirectory, xsnOutputName);



Now the gentle reader has free reins to drive the code above to the helpful utility.


Converting the script to managed code would be a good exercise as well.



Comments (4)

  1. ivl says:


    After performing all of these steps, how do you sign the form template again with a certificate?

    What I mean is, do the following programmatically:

  2. infopath says:

    To ivl: since the InfoPath .xsn file is just a renamed .cab, you can use a Windows SDK tool signcode.exe to sign a cab file from script. More info here:;en-us;247257


  3. maneekhalid says:

    Hello, thanks for posting such a nice article. Do please tell me how to sign the form template. The singncode.exe provided with sdk isn't a good option. My template is deployed on server side so i need to sign the template with server side certificate. The singcode.exe as described in provided link pops the enter key option which i dont want. any other option to sign the template through code

    thanks in advance


  4. Is it a vb script says:

    Please let me know which script it is?

    Could you please give me the total script in one file.

    Thanks, Murthy

Skip to main content