Installation Overview


There are a couple of different ways you can create fully trusted forms for use with InfoPath—the most popular method is to use a utility called RegForm to make the necessary changes to your form and create an installation script that you can use to install the form on a user’s computer. When you run this script, it will register the form on the user’s computer and add it to the list of Custom Installed Forms.

Alternately, instead of using the utility to make your form fully trusted, you could manually change the form files within your InfoPath form and distribute the form using your own custom script or installation tool.

start sidebar
Did You Know?—What's the Difference?

The difference between a URL and a URN is that a URL is used to point to a specific resource (for example, www.microsoft.com/) whereas a URN is used to refer to a resource with a name (for instance, mycompany:myform) that has “persistent significance” such that anyone who sees the URN should be able to work out where to find the resource. In this case, by combining the form name with your company name, this URN refers to a specific form in use at a specific company.

end sidebar

Regardless of which method you use, the process behind the scenes is the same. First, you must change the form itself so that it is based on a Uniform Resource Name (URN) instead of a Uniform Resource Locator (URL). This involves manually changing two of the form files to include a “name” attribute with a URN that usually includes the name of the form and your company for identification.

You will be looking at how to make these changes in detail a little later in the chapter, but the basic process involves extracting the form files from within InfoPath and then using an XML or text editor (like Notepad) to modify the form definition file (XSF) and form template file (XML).

The second step to make a form fully trusted is to change the requireFullTrust attribute to “yes” in the form definition file. Once you have made the changes to these two attributes, you can then reassemble your InfoPath form from the extracted files.

Once you have created your fully trusted form, you can then use functionality found within the InfoPath object model to install and register your form. Regardless of the method you choose to use to install your form, you need to use the InfoPath SDK and, specifically, the RegisterSolution method to register your form in InfoPath. This will enable users to see and choose the form under Custom Installed Forms.

start sidebar
Did You Know?—Creating CAB Files

It is important to note that you need to reassemble your form files manually, using a utility or application that can create CAB (cabinet) files. As you saw in Chapter 2, an InfoPath form uses this file format to encapsulate all the different types of files that make up an InfoPath form. Microsoft has a few different command- line utilities that you can use to create CAB files, but the easiest method is to use one of the Zip utilities that can generate CAB files (for example, ACDZip) and then rename the file to change the file extension back to .xsn. Microsoft also recommends that you place the manifest file first in the cabinet file.

Note

For more information on extending InfoPath or the InfoPath object model, check out Chapter 10.

end sidebar

The easiest way to use this method is through a bit of JScript or VBScript that runs through the Windows Scripting Host, but you can also use this method from the installation setup or a program of your choice.

Tip

You’ll find out how to both automatically and manually create this type of installation script a little later in this chapter.




How to Do Everything with Microsoft Office InfoPath 2003
How to Do Everything with Microsoft Office InfoPath 2003 (How to Do Everything)
ISBN: 0072231270
EAN: 2147483647
Year: 2006
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net