次の方法で共有


DISM Default Application Association Servicing Command-Line Options

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

You can use the default application association-servicing commands to import, export, list, and remove the settings that specify which application opens a file based on the file name extension or protocol.

The base syntax for servicing a Windows image using DISM is:

DISM.exe {/Image:<path_to_ image_directory> | /Online} [dism_global_options] {servicing_option} [<servicing_argument>]

The following default application servicing options are available for an offline image.

DISM.exe /image:<path_to_image_directory> [/Get-DefaultAppAssociations | /Import-DefaultAppAssociations | /Remove-DefaultAppAssociations]

The following default application association servicing options are available for a running operating system.

DISM.exe /Online [/Export-DefaultAppAssociations | /Get-DefaultAppAssociations | Import-DefaultAppAssociations | Remove-DefaultAppAssociations]

The following table provides a description of how each default application association servicing option can be used. These options are not case sensitive.

Option Description

/Get-Help

/?

When used immediately after a default application association servicing command-line option, information about the option and the arguments is displayed. Additional topics might become available when an image is specified.

Examples:

Dism /image:C:\test\offline /Import-DefaultAppAssociations /?

Dism /online /Get-DefaultAppAssociations /?

/Export-DefaultAppAssociations:<path_to_export_file>

Exports the default application associations from a running operating system to an .xml file.

Example:

Dism.exe /Online /Export-DefaultAppAssociations:C:\AppAssoc.xml

/Get-DefaultAppAssociations

Displays the list of default application associations that have been set in the specified Windows image. You can use this option to verify that default application associations were successfully imported to the image.

Examples:

Dism.exe /Image:C:\test\offline /Get-DefaultAppAssociations

Dism.exe /Online /Get-DefaultAppAssociations

/Import-DefaultAppAssociations:<path_to_xml_file>

Imports a set of default application associations to a specified Windows image from an .xml file. The default application associations will be applied for each user during their first logon.

Examples:

Dism.exe /Image:C:\test\offline /Import-DefaultAppAssociations:C:\AppAssoc.xml

Dism.exe /Online /Import-DefaultAppAssociations:C:\AppAssoc.xml

/Remove-DefaultAppAssociations

Removes the default application associations from the specified Windows image.

Examples:

Dism.exe /Image:C:\test\offline /Remove-DefaultAppAssociations

Dism.exe /Online /Remove-DefaultAppAssociations

See Also

Reference

DISM Image Management Command-Line Options

Concepts

DISM Overview (Deployment Image Servicing and Management)

Other Resources

Deployment Image Servicing and Management (DISM) Command-Line Options