This documentation is archived and is not being maintained.

Using the Form Registration Tool [InfoPath 2003 SDK Documentation]

Office 2003

Applies to:

Microsoft Office InfoPath 2003
Microsoft Office InfoPath 2003 Service Pack 1

The Microsoft Office InfoPath 2003 Software Development Kit (SDK) form registration tool is a command-line utility that simplifies the process of creating a fully trusted form and the custom installation program that distributes it. The file name of the tool is RegForm.exe, and it is located in the <drive>:\Program Files\Microsoft Office 2003 Developer Resources\Microsoft Office InfoPath 2003 SDK\Tools folder.

To use the form registration tool, simply open a command prompt and type the path name to the tool, then type RegForm followed by the command-line options with their appropriate values. The following table describes each of the command-line options.

Switch Description
/U The Uniform Resource Name (URN) to use for the form template. Must be in the form of urn:<string>:<string>. If the URN is not specified, it is built using the specified form template and company name parameters. If the form template or company name parameters are not specified, a globally unique identifier (GUID) value is used.
/FT The form template name.
/C The company name.
/V The version number [0-9999.0-9999.0-9999.0-9999] of the form template. If the version number is not specified, the version number of the specified form template file is used. If no version number is present in the form template file, the default version number 1.0.0.1 is used.
/T When set to "Yes", specifies that the form template is fully trusted. Setting this switch to "Yes" sets the requireFullTrust attribute in the form definition (.xsf) file to "Yes". This switch must be used with arguments. The default value is "No".
/O The path and name of the output installation file that is to be created. If the path and name are not specified, the name of the form template file is used.
/MSI Specifies that the output installation file is a Microsoft Windows Installer (.msi) file. The default is a Microsoft JScript (.js) file.
/LANG Specifies the language [ENG|FRA|DEU|ITA|JPN|KOR|CHS|ESN|CHT] of the Microsoft Windows Installer (.msi) file that will be generated. The default is English. This option is used only when the /MSI option is specified.
/?|/h|/help Displays information about using the form registration tool.
formtemplatefile The full path to the InfoPath form template to process.

The following is an example of using the form registration tool:

    RegForm /U urn:MyForm:MyCompany /T Yes C:\MyForms\MyTrustedForm.xsn
  

Replace the values for the /U option and the name of the form template file with your own requirements and file location. The /U option provides the URN; the /T option indicates that the form should be marked as a fully trusted form; and the last parameter is the file and path name of the form template that is to be converted.

The tool will create a .js file and a .bak file in the same folder that contains the form template that you are converting. The .bak file is a copy of the original form template file before the changes were made to it; the .js file is a script file that can be used to install the fully trusted form.

In addition to creating a .js file for installing a fully trusted form, the form registration tool supports creating an .msi file if you have Microsoft Visual Studio .NET installed. To create an .msi file, use the /MSI option, as shown in the following example:

    RegForm /U urn:MyForm:MyCompany /T Yes /MSI C:\MyForms\MyTrustedForm.xsn
  

Replace the values for the /U option and the name of the form template file with your own requirements and file location.

The tool creates an .msi file in the same folder that contains the form template that you are converting. The RegForm tool also creates a Visual Studio .NET setup project in the %temp%\RegForm directory. You can use this project to modify the installation routine to fit your requirements.

Note  

  • If you use the /MSI option and you do not have Visual Studio .NET installed, the form registration tool creates the default .js file for installing the fully trusted form.
  • If you do not specify the version number of the form template by using the /V option, the default version number of 1.0.0.1 is used instead of the version number contained in the form definition file (.xsf).

Other options can be used with the form registration tool to provide more control over the values that it uses, such as the form template name, company name, and version number. To learn how to use these and other options, use the /? switch to view the form registration tool command-line Help, as shown here:

    RegForm /?
  

For more information about creating fully trusted forms, see Understanding Fully Trusted Forms.





Show: