Windows image file types

File Types

This topic explains how to create new file types and how to associate your app with your file type and other well-defined file types. Files with a shared common file name extension (.doc, .html, and so on) are of the same type. For example, if you create a new text editor, then you can use the existing .txt file type. In other cases, you might need to create a new file type.

This topic is organized as follows:

Additional information can be found on the following topics:

Public and Private File Types

Public file types are also known as popular or contentious types because competing applications might want to be associated with these file types. Characteristics of public file types include:

  • They are typically defined by standards bodies, and/or are promoted by their defining organizations as interchange formats.
  • They are often exchanged between computers and users for diverse purposes.
  • They need to be supported on many different platforms.
  • Applications from multiple vendors are likely to handle them.

Some examples of file types that are considered public are the image file types .png, .gif, .jpg, and .bmp, and the audio types .wav, .mp3, and .au.

Unlike public file types, private or proprietary file types typically have a format that is implemented and understood by only one application or vendor. As a result, private file types are typically not prone to conflicts between applications. Some file types can start as private file types but later become public file types.

Windows does not differentiate between public and private file types. The distinction is relevant only in making decisions about your choice of file type registration.

Registering a File Type

To associate the file type with an existing application, locate the application ProgID in the registry. To associate the file type with a new application, define a ProgID for your application. For information about defining a new ProgID, see Programmatic Identifiers.

File name extension subkeys have the following general form: extension=ProgID. File name extension subkeys are stored in the HKEY_CLASSES_ROOT subtree.

It is important to include the leading period (.) when creating file type subkeys in the registry. For example, if you want a file type with the short extension .myp and the long extension .myp-file to be opened with an application called MyProgram, use the following syntax:

As demonstrated in the preceding example, if you also register a short file name extension (.myp), you should create a subkey for the long extension (.myp-file) as well. For more information, see File Type Handlers.

Setting Optional Subkeys and File Type Extension Attributes

File type extension entries in the registry have several optional subkeys and attributes.

The file type extension entries that are used by file associations are described in the following table. All values are of the REG_SZ type.

Registry entry Action
Default Set the default value of the extension subkey to the ProgID to which it is linked.
Content Type Set the Content Type value to the file type’s MIME content type.
OpenWithList Do not use. This subkey contains one or more application subkeys for applications that appear in the Open with dialog box entry for the file type and is intended only for .exe applications on operating systems prior to WindowsВ XP. Use OpenWithProgIds instead.
OpenWithProgIds This subkey contains a list of alternate ProgIDs for this file type. The programs for these ProgIDs appear in the Open with menu and are available as default Windows Store apps for the file type. Whenever an application takes over this file type by changing the default value, it should also add an entry to this list.
PerceivedType Set the PerceivedType value to the PerceivedType to which the file belongs, if any. This string is not used by Windows versions prior to WindowsВ Vista. For more information, see Perceived Types and Application Registration.

The general form of a file name extension subkey is as follows. All entry types are of the REG_SZ type.

Important considerations about file types include:

The HKEY_CLASSES_ROOT subtree is a view formed by merging HKEY_CURRENT_USER\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes

In general, HKEY_CLASSES_ROOT is intended to be read from but not written to. For more information, see the HKEY_CLASSES_ROOT article.

To register a file type globally on a particular computer, create an entry for the file type in the HKEY_LOCAL_MACHINE\Software\Classes subkey.

To make a file type registration visible to the current user only, create an entry for the file type in the HKEY_CURRENT_USER\Software\Classes subkey.

An application can provide its own implementation of a verb, such as open or play, as shown in the following registry example.

Subkeys of the verb subkey include the command line and the drop target method: command and DropTarget.

When you create or change a file association, it is important to notify the system that you have made a change. Do so by calling SHChangeNotify and specifying the SHCNE_ASSOCCHANGED event. If you do not call SHChangeNotify, the change may not be recognized until after the system is rebooted.

To retrieve registry information regarding a file association, use the IQueryAssociations interface. For a scenario that illustrates this procedure, see File Association Sample Scenario.

Both the App Paths and Applications registry subkeys are used to register and control the behavior of the system on behalf of applications. For more detailed information about this functionality, see Application Registration.

Deleting Registry Information During Uninstallation

When uninstalling an application, the ProgIDs and most other registry information associated with that application should be deleted as part of the uninstallation. However, applications that have taken ownership of a file type (by setting the Default value of the file type’s HKEY_CLASSES_ROOT\.extension subkey to the ProgID of the application) should not attempt to remove that value when uninstalling. Leaving the data in place for the Default value avoids the difficulty of determining whether another application has taken ownership of the file type and overwritten the Default value after the original application was installed. Windows respects the Default value only if the ProgID found there is a registered ProgID. If the ProgID is unregistered, it is ignored.

Note that other file-type ownership information is stored in the HKEY_CURRENT_USERsubtree and also is used only when the application that it references is registered. Therefore, this data does not need to be removed when uninstalling an application.

As an example, the following shows the state of the registry before an application is uninstalled:

The following shows the state of those same registry entries after the application has been uninstalled.

File Types That Support Open Metadata

In WindowsВ 7 and later, the following file types support open metadata.

Windows Image Files and Catalog Files Overview

Windows System Image Manager (WindowsВ SIM) uses Windows image (.wim) files and catalog (.clg) files to display the available components and packages that can be added to an answer file (Unattend.xml). Windows images and catalog files contain configurable settings that you can modify after the component or package is added to an answer file.

Install.wim is located in the Sources folder of your Windows Installation Media download. See OEM deployment of Windows 10 for desktop editions for steps to make and deploy Windows images.

You can open Windows SIM by searching your computer for «Windows System Image Manager».

Supported architectures

Windows SIM can create catalog files for Windows images of the following architecture types

x86 version of Windows

x86-based systems, x64-based systems, and ARM-based systems

x64 version of Windows

x64-based systems only

Don’t have an x86 PC handy?

  • You can install the 32-bit version of Windows on a 64-bit PC.
  • You can install Windows on a 32-bit virtual machine from a 64-bit PC.

Windows Image Files

A Windows image file contains one or more compressed Windows images. Each Windows image in a Windows image file contains a list of all of the components, settings, and packages that are available with that Windows image.

Limitations of Windows Image Files

The following list describes some of the limitations of using Windows image files:

  • Only an account that has administrator permissions can open Windows image files.
  • Only one user at a time can open Windows image files.
  • Because Windows image files can contain one or more Windows images, they are frequently large. Some Windows image files can be several gigabytes in size.
  • Because Windows images can be modified through different settings, using a Windows image file to create your answer file might cause you to apply altered default settings and configurations to a recaptured Windows image.

Because of these limitations, WindowsВ SIM uses catalog files to create an answer file.

Catalog Files

A catalog file is a binary file that only includes the settings and packages in a Windows image. Catalog files (.clg) are only used by Windows SIM and is not used by other deployment tools, nor is it required to install Windows. When Windows SIM creates a catalog file, it queries the Windows image for a list of all the settings and state of each setting in that image. Because the contents of a Windows image can change over time, you must re-create the catalog file whenever you update a Windows image.

Because only administrators can open Windows images, you must have administrator permissions on the system to create a catalog file.

When WindowsВ SIM opens a Windows image file or catalog file, all of the configurable components and packages inside that image are displayed in the Windows Image pane. You can then add components and settings to an answer file.

Contents of a Catalog File

A catalog file contains the following information:

  • A list of component settings and current values
  • Windows features and package states

Benefits of Catalog Files

Catalog files have several advantages over Windows image files:

  • The size of a catalog file can be less than 1 megabyte (MB), whereas the size of Windows image files can be several gigabytes. Also, catalog files are easier to copy to removable media or a network share.
  • Multiple users can create answer files for a single catalog file at the same time, whereas only one person can open and access a Windows image file at any particular time.
  • Non-administrators can create answer files for a catalog file. However, only administrators can open Windows image files.

Troubleshooting

«The catalog file for Windows Image (image name) cannot be opened for the following reason:

Cannot find the catalog file associated with the Windows image (image name)

You must have a valid catalog file to continue. Do you want to create a catalog file?»

Fix: Click Yes to create a catalog file. After you’ve created the catalog file, this message will no longer appear.

What’s going on: This message usually shows up the first time you open a .wim file.

«Access denied»

Fix: Copy the .wim file to a simple writable file location, like C:\Images, then try again.

What’s going on: This message appears when you’re creating a catalog file from a .wim file that’s in a location that the system can’t write to, like a DVD or secured network share.

«Catalog creation failed to complete. This 64-bit version of Windows SIM can only create catalogs for 64-bit Windows images. For a list of supported architecture types, see link below.»

Fix: Use an x86 version installation of Windows to create catalog files for x86 or ARM-based .wim files.

What’s going on: WindowsВ SIM can’t create x86 or ARM catalog files from a 64-bit Windows installation.

Open a Windows Image or Catalog File

When you open a WindowsВ® image (.wim) file in Windows System Image Manager (WindowsВ SIM), a catalog (.clg) file is automatically created. If a catalog file already exists, WindowsВ SIM re-creates the catalog file based on the contents of the Windows image that you select. When a catalog file is created, it queries the Windows image for a listing of all the settings in that image.

To create an answer file, you must first open a Windows image file or catalog file in WindowsВ SIM. For more information about Windows image files and catalog files, see Windows Image Files and Catalog Files Overview.

Open a Windows image file or catalog file

Copy a previously created catalog file (.clg) to the technician computer or copy your customized Windows image file (install.wim) to the technician computer.

Install.wim is located in the Sources folder of your Windows Installation Media download. See OEM deployment of Windows 10 for desktop editions for steps to make and deploy Windows images.

On the technician computer, open WindowsВ SIM. One way to do this is to search for «Windows System Image Manager».

On the File menu, click Select Windows Image.

In the Select a Windows Image dialog box, select the file type in the Files of type drop-down list, and then browse to a Windows image file or catalog file. If you open a Windows image file, WindowsВ SIM will automatically create a catalog of that Windows image.

If there is more than one type of Windows image in the file, select a specific Windows image in the Select an Image box. The Windows image file or catalog file appears in the Windows Image pane.

Click Open. If you have not previously opened that Windows image file or have not refreshed the catalog file recently, WindowsВ SIM prompts you to create or re-create the catalog file.

Create a catalog file

  1. Open WindowsВ SIM.
  2. On the Tools menu, click Create Catalog. The Open a Windows Image dialog box opens.
  3. Select a Windows image file, and then click Open. If you select a Windows image file that has more than one Windows image, the Select an Image dialog box opens.
  4. Click to select an image type (for example, Fabrikam Custom Image 1), and then click OK. The catalog file is created in the same directory as the Windows image file that you selected.

Troubleshooting

If Windows SIM does not create the catalog file, try the following steps:

  • Make sure you are using the Windows 8.1 version of the Windows Assessment and Deployment Kit (WindowsВ ADK).
  • To create a catalog file for 32-bit or ARM-based PCs, use a 32-bit PC.
  • Make sure the Windows base-image file (Install.wim) is in a folder that has read-write privileges, such as a USB flash drive or on your hard drive.

WindowsВ SIM cannot create catalog files for some Windows images of different architecture types. For information about the support of cross-platform catalog creation, see Windows Image Files and Catalog Files Overview.

Читайте также:  End button on windows
Оцените статью
Your version of Windows Windows images you can create catalog files from