3.1.5.7 Policy Administration Comment Localization Message Sequencing

  1. An Administrator MAY choose to localize the comments for a GPO. The Administrator MUST edit the .cmtx file at "<gpo path>\comment.cmtx", where <gpo path> is one of the following:

    • The user-scoped Group Policy Object path if the comment applies to a GPO's user settings.

    • The computer-scoped GPO path if the comment applies to a GPO's computer settings.

  2. A .cmtx file applies to a single GPO and MAY contain many comments. A .cmtx file by default created or updated by an Administrative plug-in will contain a <stringTable> within the .cmtx file. In the following example .cmtx file, there are comments on two GPO settings indicated by the two comment elements.

     <?xml version='1.0' encoding='utf-8'?>
     <policyComments xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/CommentDefinitions">
       <policyNamespaces>
         <using prefix="ns0" namespace="Microsoft.Policies.BITS"></using>
         <using prefix="ns1" namespace="Microsoft.Policies.ControlPanel2"></using>  </policyNamespaces>
       <comments>
         <admTemplate>
           <comment policyRef="ns0:BITS_DisableBranchCache" commentText="$(resource.ns0_BITS_DisableBranchCache)"></comment>
           <comment policyRef="ns1:UseDefaultTile" commentText="$(resource.ns1_UseDefaultTile)"></comment>
         </admTemplate>
       </comments>
       <resources minRequiredRevision="1.0">
         <stringTable>
           <string id="ns0_BITS_DisableBranchCache">Do not change this GPO.</string>
           <string id="ns1_UseDefaultTile">Warning be careful with this setting.</string>
         </stringTable>
       </resources>
     </policyComments>
    
  3. The Administrator MUST remove the <stringTable> from the .cmtx file. Using the preceding example, the .cmtx file would contain the following xml text after the <stringTable> is removed:

     <?xml version='1.0' encoding='utf-8'?>
     <policyComments xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/CommentDefinitions">
       <policyNamespaces>
         <using prefix="ns0" namespace="Microsoft.Policies.BITS"></using>
         <using prefix="ns1" namespace="Microsoft.Policies.ControlPanel2"></using>  </policyNamespaces>
       <comments>
         <admTemplate>
           <comment policyRef="ns0:BITS_DisableBranchCache" commentText="$(resource.ns0_BITS_DisableBranchCache)"></comment>
           <comment policyRef="ns1:UseDefaultTile" commentText="$(resource.ns1_UseDefaultTile)"></comment>
         </admTemplate>
       </comments>
       <resources minRequiredRevision="1.0">
       </resources>
     </policyComments>
    

    The Administrator MUST not save the .cmtx file until the .cmtl file is created.

  4. The Administrator MUST create or update a .cmtl file. The file name used MUST be "<gpo path>\<language locale name>\comment.cmtl", where <language locale name> is in the format language-locale (for example, en-us or fr-fr) and <gpo path> is one of the following:

    • The user-scoped Group Policy Object path if the user settings of the GPO are being updated.

    • The computer-scoped Group Policy Object path if the computer settings are being updated.

  5. The Administrator MUST copy into the .cmtl file the default .cmtl xml header and <commentDefinitionResources> element, the resources element, and the <stringTable> removed from the .cmtx file, resulting in the following document.

     <?xml version="1.0" encoding="utf-8"?>
     <commentDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/CommentDefinitions">
       <resources>
         <stringTable>
           <string id="ns0_BITS_DisableBranchCache">Do not change this GPO.</string>
           <string id="ns1_UseDefaultTile">Warning be careful with this setting.</string>
         </stringTable>
       </resources>
     </commentDefinitionResources>
    
  6. The Administrator MUST save the .cmtl file.

  7. The Administrator MUST save the .cmtx file. Additional language-specific files MAY be created by repeating steps 4 and 5 as needed and editing the string values. By default, if a .cmtl language-specific file is not located for the current language, the Administrative plug-in MUST attempt to locate the language-specific .cmtl file for language-locale en-us. If the .cmtl file for language-locale en-us is not located, the Administrative plug-in MUST signal an error but MUST NOT prevent the GPO from loading in the Administrative plug-in.