Microsoft InfoPath 2010
The official blog of the Microsoft InfoPath team

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

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

  • Comments 4

Part 5 of 5: The final function

 

And the final function is

 

function FixupSolutionXSN(

      inputDirectory,

      xsnInputName,

      outputDirectory,

      xsnOutputName,

      serviceURL,

      wsdlURL)

{

      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.

 

 

Leave a Comment
  • Please add 5 and 3 and type the answer here:
  • Post
  • Hi,

    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:

    http://office.microsoft.com/en-us/infopath/HP101636661033.aspx?pid=CH101686141033

  • 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:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;247257

    -Alex

  • 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

    imran

  • Please let me know which script it is?

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

    Thanks, Murthy

Page 1 of 1 (4 items)