Skip to main content

Changing the default format for Microsoft XPS Document Writer

Switching between OpenXPS (.oxps) and Microsoft XPS (.xps)

Applies to: Windows 8.1, Windows 8

The Windows 8.1 operating system introduces support for the international standard OpenXPS format in addition to the Microsoft XPS format. Windows provides a convenient way to create XPS documents by printing from any application to the Microsoft XPS Document Writer (MXDW). In the Windows 8 Consumer Preview, MXDW defaults to the new OpenXPS format. For users who frequently share Microsoft XPS documents with users that cannot read OpenXPS format, Windows 8.1 provides two methods for changing the default format of MXDW to the Microsoft XPS format.

In this article:

Changing file type when printing from desktop applications

When printing from a desktop application, you can select XPS directly from the Save as type combo box. This does not change the system's default format.

To use this method, follow these steps:

  1. Print from your desktop application to MXDW.
  2. When the Save Print Output As dialog box is displayed, select the Save as type combo box to expand.
  3. Select XPS Document (*.xps).

    Save Print Output As dialog

  4. Click Save to output the file as Microsoft XPS.

This method can also be used to quickly convert XPS files from one type to another using these steps:

  1. Open the XPS file (OpenXPS or Microsoft XPS) in the desktop XPS Viewer application.
  2. Print the document to MXDW.
  3. Select the opposite format in the Save as type combo box.
  4. Click Save and output the file to the new format.

Metro style applications in Windows 8 automatically output to the default format defined by the printer in print-to-file scenarios. With the above desktop XPS Viewer method, users of Metro style applications can easily convert OpenXPS files to Microsoft XPS.

Changing the default MXDW format

There are two methods to change the default format of MXDW between OpenXPS and Microsoft XPS:

  • Set the default in Group Policy. (32-bit and 64-bit client only)
  • Use Windows PowerShell to toggle the default format. (32-bit and 64-bit client AND Windows 8 RT)

Changing the default Microsoft XPS will have the following results:

  • Metro style applications will output Microsoft XPS (*.xps) by default.
  • Desktop applications will default to Microsoft XPS (*.xps); however, the user can choose OpenXPS (*.oxps) from the "Save as type" combo box.

Returning the default to OpenXPS will restore the system to the original behavior.

Using Group Policy

To use Group Policy to change the default format, take the following steps:

  1. Search for Group Policy and select Edit Group Policy from Settings.

    Settings screen

  2. In the Group Policy control panel, select Local Computer Policy\Computer Configuration\Administrative Templates\Printers in the tree on the left of the screen. Then, double-click Change Microsoft XPS Document Writer (MXDW) default output format to the legacy Microsoft XPS format (*.xps) to open the options.

    Local Group Policy Editor screen

  3. You can make the following selections:
    • NotConfigured and Disabled will set the MXDW default to OpenXPS.
    • Enabled will set the MXDW default to Microsoft XPS.
  4. Click OK to save settings.

    Change policy screen

  5. note iconNote: You may need to logoff/logon or force a Group Policy update from an administrator command prompt (gpupdate /force) before the change in policy will take effect.

Using Windows PowerShell

Windows PowerShell provides a powerful set of commands that allow the user to manage Windows 8.1. With Windows PowerShell, the user can change the same registry value for the MXDW default that is updated by Group Policy in the above procedure.

To use Windows PowerShell to change the default, follow these steps:

  1. Search for PowerShell and select Windows PowerShell from Apps.

    Apps results screen

  2. Launch Windows PowerShell as an administrator. You can do this by selecting Windows PowerShell with a right-click and then choosing Run as administrator from the options at the bottom of the screen, or by holding down CTRL+Shift while left-clicking Windows PowerShell.

    By default, the execution policy for Powershell is restricted. Execute the following command to change the policy for the Powershell process you are working in: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process

  3. When you are prompted to confirm the execution policy change, enter Y.

    The following script will check for the appropriate registry path and key and then toggle the format between OpenXPS and Microsoft XPS:

    Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force

    if(!(test-path "hklm:\software\policies\Microsoft\Windows NT\Printers"))
    New-Item -Path "hklm:\software\policies\Microsoft\Windows NT\Printers"

    New-ItemProperty "hklm:\software\policies\Microsoft\Windows NT\Printers\" -Name "MXDWUseLegacyOutputFormatMSXPS" -Value 0 -PropertyType "DWORD" -ErrorAction SilentlyContinue
    $KeyValue = (Get-ItemProperty -Path "hklm:\software\policies\Microsoft\Windows NT\Printers" -Name "MXDWUseLegacyOutputFormatMSXPS")."MXDWUseLegacyOutputFormatMSXPS"

    Set-ItemProperty -Path "hklm:\software\policies\Microsoft\Windows NT\Printers" -Name "MXDWUseLegacyOutputFormatMSXPS" -Value 0
    Set-ItemProperty -Path "hklm:\software\policies\Microsoft\Windows NT\Printers" -Name "MXDWUseLegacyOutputFormatMSXPS" -Value 1

    note iconNote: You can download the script and run it from Windows PowerShell as shown below substituting the path on your system for the one in the example:


Related resources