Section 7.11.Prevent Design Changes


7.11. Prevent Design Changes

As mentioned previously, InfoPath both designs and displays forms. In most cases, you won't want your users opening forms in Design mode and tinkering with them. There are two approaches to this problem:

  • Enable form protection. This approach discourages users from changing form templates, but does not prevent them from doing so.

  • Disable Design mode on your users' systems. This approach keeps users from changing existing form templates and prevents them from creating new ones.


Note: Most developers don't want to expose the inner workings of their applications to the world. InfoPath provides a limited ability to restrict that type of access to form templates.

7.11.1. How to enable protection

To protect a template from changes:

  1. Open the template in Design mode.

  2. Choose Tools Form Options, select Enable protection on the General page, then click OK.

Protected templates display the warning shown in Figure 7-47 if the user opens them in Design mode.

Figure 7-47. Protecting forms discourages users from changing them


That's weak protection at best, but if you sign the protected template with a digital signature, you can both discourage changes and detect changes if they are made (changes overwrite the digital signature, so the template will no longer be trusted).

7.11.2. How to disable design mode

A stronger solution prevents users from designing any templates. You can use the Custom Installation Wizard (CIW) to create a customized setup program for Office that omits the design features from InfoPath. In order to do that:

  1. Run the CIW, as described in Chapter 6.

  2. Open the InfoPath Windows Installer file ( INF11.msi for SP1) with CIW.

  3. Configure Disable InfoPath Designer mode in Step 10 of the Wizard (Figure 7-48).

  4. Finish creating the custom installation and then use the generated Windows Installer to install InfoPath on your client machines.

Figure 7-48. Use CIW to create a custom InfoPath installation program that disables design mode


Alternatively, you can disable Design mode by changing the following system registry setting:

    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\InfoPath\Designer\    DisableDesigner=0x00000001  

Editing the system registry requires special knowledge. This is an advanced technique. Disabling Design mode removes InfoPath's Design this Form button, Design a Form task pane, and the File Design a Form menu option.



    Excel 2003 Programming. A Developer's Notebook
    Excel 2003 Programming: A Developers Notebook (Developers Notebook)
    ISBN: 0596007671
    EAN: 2147483647
    Year: 2004
    Pages: 133
    Authors: Jeff Webb

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