XML 打印机列表配置

Last published : Nov 13, 2026
Workspace Environment Management™ 包含通过 XML 打印机列表文件配置用户打印机的功能。
创建 XML 打印机列表文件后,在管理控制台中创建打印机操作,并将“操作类型”选项设置为“使用设备映射打印机文件”。
注意:
仅支持不需要特定 Windows 凭据的打印机。

XML 打印机列表文件结构

XML 文件采用 UTF-8 编码,具有以下基本 XML 结构:
<?xml version="1.0" encoding="UTF-8"?>

    <ArrayOfSerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    ...
    </ArrayOfSerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
每个客户端和关联设备都由以下类型的对象表示:
SerializableKeyValuePair<string, List&lt;VUEMUserAssignedPrinter>>>
每个设备都表示为:
    <SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
        <Key>DEVICE1</Key>
        <Value>
            <VUEMUserAssignedPrinter>
               ...
            </VUEMUserAssignedPrinter>
        </Value>
    </SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
每个设备块都必须与特定的客户端或计算机名称匹配。\&lt;Key> 标记包含相关名称。\&lt;Value> 标记包含与分配给指定客户端的打印机匹配的 VUEMUserAssignedPrinter 对象列表。
    <?xml version="1.0" encoding="utf-8"?>

       <ArrayOfSerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
            <Key>DEVICE1</Key>
            <Value>
                <VUEMUserAssignedPrinter>
             ...
                </VUEMUserAssignedPrinter>
            </Value>
        </SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
       </ArrayOfSerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>

VUEMUserAssignedPrinter 标记语法

每个配置的打印机都必须在 \&lt;VUEMUserAssignedPrinter> 标记中定义,并使用以下属性:
\&lt;IdPrinter>。这是配置的打印机的 Workspace Environment Management 打印机 ID。每台打印机都必须具有不同的 ID。注意 在 Workspace Environment Management 管理控制台中配置的 XML 打印机列表操作也是一个打印机操作,它有自己的 ID,该 ID 必须与 XML 列表中单独配置的打印机的 ID 不同。
\&lt;IdSite>。包含相关 Workspace Environment Management 站点的站点 ID,该 ID 必须与现有站点的 ID 匹配。
\&lt;State>。指定打印机状态,其中 1 为活动,0 为禁用。
\&lt;ActionType>。必须始终为 0。
\&lt;UseExtCredentials>。必须为 0。目前不支持使用特定的 Windows 凭据。
\&lt;isDefault>。如果为 1,则打印机是默认的 Windows 打印机。如果为 0,则未将其配置为默认值。
\&lt;IdFilterRule>。必须始终为 1。
\&lt;RevisionId>。必须始终为 1。如果以后修改了打印机属性,请将此值增加 1,以通知代理主机并确保重新处理打印机操作。
\&lt;Name>。这是 Workspace Environment Management 代理主机识别的打印机名称。此字段不能留空。
\&lt;Description>。这是 Workspace Environment Management 代理主机识别的打印机描述。此字段可以为空。
\&lt;DisplayName>。此项未使用,应留空。
\&lt;TargetPath>。这是打印机的 UNC 路径。
\&lt;ExtLogin>。包含在指定 Windows 连接凭据时使用的 Windows 帐户名称。。
\&lt;ExtPassword>。包含在指定 Windows 连接凭据时使用的 Windows 帐户密码。。
\&lt;Reserved01>。此项包含高级设置。请勿以任何方式更改它。
&gt;&lt;VUEMActionAdvancedOption&gt;&lt;Name&gt;SelfHealingEnabled&lt;/Name&gt;&lt;Value&gt;0&lt;/Value&gt;&lt;/VUEMActionAdvancedOption
要激活给定打印机对象的自我修复功能,只需复制并粘贴上述内容,将突出显示的 0 值更改为 1。

打印机对象示例

以下示例在客户端或计算机 DEVICE1 上分配了两个活动打印机:
  • HP LaserJet 2200 Series 位于 UNC 路径 \\server.example.net\HP LaserJet 2200 Series (默认打印机)
  • Canon C5531i Series 打印机位于 UNC 路径 \\server.example.net\Canon C5531i Series
它还分配一台活动打印机到客户端或计算机 DEVICE2:
  • HP LaserJet 2200 Series 位于 UNC 路径 \\server.example.net\HP LaserJet 2200 Series
<?xml version="1.0" encoding="utf-8"?>
  <ArrayOfSerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
        <Key>DEVICE1</Key>
        <Value>
            <VUEMUserAssignedPrinter>
                <IdPrinter>1</IdPrinter>
                <IdSite>1</IdSite>
                <State>1</State>
                <ActionType>0</ActionType>
                <UseExtCredentials>0</UseExtCredentials>
                <isDefault>1</isDefault>
                <IdFilterRule>1</IdFilterRule>
                <RevisionId>1</RevisionId>
                <Name>HP LaserJet 2200 Series</Name>
                <Description />
                <DisplayName />
                <TargetPath>\\server.example.net\HP LaserJet 2200 Series</TargetPath>
                <ExtLogin />
                <ExtPassword />
                <Reserved01>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;ArrayOfVUEMActionAdvancedOption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;VUEMActionAdvancedOption&gt;&lt;Name&gt;SelfHealingEnabled&lt;/Name&gt;&lt;Value&gt;0&lt;/Value&gt;&lt;/VUEMActionAdvancedOption&gt;&lt;/ArrayOfVUEMActionAdvancedOption&gt;</Reserved01>
            </VUEMUserAssignedPrinter>
        </Value>
      <Value>
            <VUEMUserAssignedPrinter>
                <IdPrinter>2</IdPrinter>
                <IdSite>1</IdSite>
                <State>1</State>
                <ActionType>0</ActionType>
                <UseExtCredentials>0</UseExtCredentials>
                <isDefault>0</isDefault>
                <IdFilterRule>1</IdFilterRule>
                <RevisionId>1</RevisionId>
                <Name>Canon C5531i Series</Name>
                <Description />
                <DisplayName />
                <TargetPath>\\server.example.net\Canon C5531i Series</TargetPath>
                <ExtLogin />
                <ExtPassword />
                <Reserved01>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;ArrayOfVUEMActionAdvancedOption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;VUEMActionAdvancedOption&gt;&lt;Name&gt;SelfHealingEnabled&lt;/Name&gt;&lt;Value&gt;0&lt;/Value&gt;&lt;/VUEMActionAdvancedOption&gt;&lt;/ArrayOfVUEMActionAdvancedOption&gt;</Reserved01>
            </VUEMUserAssignedPrinter>
        </Value></SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
      <SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
        <Key>DEVICE2</Key>
        <Value>
            <VUEMUserAssignedPrinter>
                <IdPrinter>1</IdPrinter>
                <IdSite>1</IdSite>
                <State>1</State>
                <ActionType>0</ActionType>
                <UseExtCredentials>0</UseExtCredentials>
                <isDefault>0</isDefault>
                <IdFilterRule>1</IdFilterRule>
                <RevisionId>1</RevisionId>
                <Name>HP LaserJet 2200 Series</Name>
                <Description />
                <DisplayName />
                <TargetPath>\\server.example.net\HP LaserJet 2200 Series</TargetPath>
                <ExtLogin />
                <ExtPassword />
                <Reserved01>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;ArrayOfVUEMActionAdvancedOption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;VUEMActionAdvancedOption&gt;&lt;Name&gt;SelfHealingEnabled&lt;/Name&gt;&lt;Value&gt;0&lt;/Value&gt;&lt;/VUEMActionAdvancedOption&gt;&lt;/ArrayOfVUEMActionAdvancedOption&gt;</Reserved01>
            </VUEMUserAssignedPrinter>
        </Value></SerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>
   </ArrayOfSerializableKeyValuePairOfStringListOfVUEMUserAssignedPrinter>