Offline servicing of image files

A method for offline servicing of an image file by mapping the image to a directory using a file system mini-filter driver. The file system mini-filter driver maps the contents of the image to the directory and provides either read-only or read-write access to the contents of the image. The method further displays the contents of the image mapped to the directory for review by a user.

BACKGROUND

Computer users conventionally use image files to create a snapshot of a computer memory, such as a hard drive. One such image file is a Windows Imaging (WIM) file, which is a collection of image files that may or may not contain an operating system (OS) and its components. The WIM image format, which is file-based rather than sector-based, describes the layout of the image files. The WIM image can be used for any number of imaging applications, including the setup and deployment (including upgrades) of an OS (e.g., a Windows OS). Beyond OS setup and deployment, the WIM images can also be used for backing up or restoring a system or volume with data and executable files. Conventional tools and application programming interfaces (APIs) are available for creating and restoring these images to or from volumes or directories on a system.

Known image files, including WIM image files, share two key features, namely: the contents of a stored image file are essentially opaque and image files themselves are static after creation. With respect to the opaque nature of the contents of an image file, once an image file is created, its contents cannot be accessed unless the file is restored in its entirety, or booted, to a system volume or a directory. This restoration of the entire image file can be cumbersome when there is a need to access only a small portion of the contents of the image file (e.g., a small number of files or file identifiers only). For example, a user may wish to verify the contents of an existing image file to ensure that it has the latest binary files. To do so conventionally, the user would need to restore, or boot, the entire image file to a system volume or directory to access the files of interest. This restoration may take considerable time, depending on the number of image files and their sizes.

With respect to the static nature of known image files, conventionally, once an image file is created, its contents cannot be changed or updated. This inability to modify an image file can be a problem in certain scenarios where the capability to modify the contents of an image would be helpful. Conventionally, once an image file is created, the only way to update or apply a patch to files within the image file is to recreate the entire image file with the modifications and then discard the old image file. Generating an entirely new image file can take some time, particularly if the size of the image is large, or if the number of image files that need to be recreated is large. A way to view and/or modify the contents of an image file would be useful.

SUMMARY

The following simplified summary provides a basic overview of some aspects of the present technology. This summary is not an extensive overview. It is not intended to identify key or critical elements or to delineate the scope of this technology. This Summary is not intended to be used as an aid in determining the scope of the claimed subject matter. Its purpose is to present some simplified concepts related to the technology before the more detailed description presented below.

Accordingly, methods for listing the contents of an image file for offline viewing and servicing by a user are disclosed. The contents of the image file may be outlined by a control program for review by the user.

DETAILED DESCRIPTION

Referring now toFIGS. 1 and 2, a system, generally indicated at21, is disclosed for offline servicing a file-based image format image file, such as a Windows Imaging (WIM) image format image, i.e., servicing the image file without having to restore the entire image to a hard disk drive, depicted as154inFIG. 5. Such image files may be used for any number of imaging applications, for example, to create a snapshot of a computer memory, such as a hard disk drive154. One such image file is the WIM image noted above, which is a collection of image files that may or may not contain an operating system (OS) and its components. The WIM image format is one type of image that describes the layout of the image files. The WIM image can also be used for the setup and deployment (including upgrades) of an OS (e.g., a Microsoft® Windows OS) or for readily backing up or restoring a system or volume with data files. As used herein, the terms “offline” and “offline state” with respect to a WIM image refer to the image when stored in a memory for later copying or booting to a computer, whereas the term “online state” with respect to a WIM image refers to an image that has been restored, or imaged, to a hard disk drive154and, if necessary, booted to the imaged portion of the hard disk drive. Conventionally, to revise a WIM image, the WIM image must be restored, or imaged, to a hard disk drive154, booted to the imaged-portion of the hard disk drive, if needed, and modified by making changes to the files or recreating the image file by capturing the portion of the hard disk drive including the modified files, all of which may be very time consuming. Embodiments of the systems, computer-readable media, and methods of the present invention offer an alternative to this process.

In particular, the system21(e.g., a computer system) comprises both a user mode23components and a kernel mode25components. The kernel mode components comprise a WIM file system mini-filter driver29which operates in the kernel mode as described in detail below. Other drivers, such as non-mini-filter drivers and other alternative embodiments, having the properties described herein are also contemplated as within the scope of one or more embodiments of the claimed invention. The system21further comprises an application programming interface (API) layer33residing in the user mode23for communicating with the WIM file system mini-filter driver29. The system21also includes a user mode tool37for use by a user in communicating with the API layer33. The API layer further comprises a communication protocol39providing a basis for interaction between the kernel mode25WIM file system mini-filter driver29and the user mode tool37. Application writers seeking to compose applications complementary to one or more embodiments of the present invention can use this communication protocol39via a set of published APIs. Moreover, the WIM mini-filter driver29is configured to map the contents of the WIM image format image to a directory, generally indicated41, inFIG. 3, and more particularly to the paths41′ of the directory. The user may then view the contents of the WIM image mapped to the directory41with a standard file accessing application43. In one alternative embodiment, the user may access the mapped image with Microsoft® Windows Explorer, as shown inFIG. 3. As used herein, the term “mount” may be used interchangeably with the term “map,” as both are directed to making the contents of an image file accessible via the directory where the image contents are mapped, or mounted.

APPENDIX A provides an exemplary set of APIs for the user-mode applications to interact with mini-filter driver29to facilitate offline servicing of images. The APIs shown in the appendix allow applications to quickly and easily map or unmap WIM files to some specified map directories.

FIG. 2depicts a more detailed view of the kernel mode25of one exemplary embodiment of the present invention. This system21includes processor, adapter, and controller hardware47, supporting a hardware abstraction layer49, which in turn supports an input/output (I/O) manager51and an I/O system services element53. The system further includes a file system filter manager57which manages the WIM mini-filter driver29and other mini-filter drivers29′. The file system filter manager57interacts with other drivers57′ and system kernel mode25components to facilitate use of the WIM mini-filter driver29. In particular, the WIM mini-filter driver29monitors all calls from the file system filter manager57. If a call is on any of the directory paths41′ where the image is mapped, the WIM mini-filter driver29will intercept the call and handle (e.g., mapping the calls to the appropriate data from the WIM file) the request that triggered the call, thereby providing a transparent user experience. The WIM mini-filter driver29needs to be registered with the file system filter manager57for it to intercept calls made to the file system and map the requests to data within the WIM image file. If the WIM mini-filter driver29is not already loaded, the user mode tool37will load an instance of the WIM mini-filter driver and register it with the file system filter manager57, if necessary. Further details of the system21will be discussed in greater detail below with respect to the methods of one or more embodiments of the present invention.

In another exemplary system, depicted inFIGS. 1,2, and5, a system21for servicing, by a computer130(FIG. 5), a Windows Imaging (WIM) image format image stored on one or more target computer-readable media and having an online state and an offline state, is disclosed. The system21comprises a user interface184(FIG. 5) associated with the computer130and adapted for providing access to the contents of the WIM image format image. The system21further comprises a software tool executing on the computer130, the software tool responsive to the user interface184to provide access to the contents of the WIM image format image for review by a user when the WIM image format image is in the offline state. The software tool is further adapted to edit the WIM image format image in the offline state. The software tool is further adapted to at least one of open a file within the contents of the WIM image format image and execute an application within the contents of the WIM image format image, as will be discussed in detail below with respect to the methods of one or more embodiments of the present invention.

Methods Utilizing a Seed Media Item

In one exemplary embodiment depicted inFIG. 2, a method, generally indicated61, for offline servicing of a Windows Imaging (WIM) image format image is disclosed. The method comprises mapping, at63, the contents of the WIM image format image to a directory41with the WIM file system mini-filter driver29. In one example, the mapping of the WIM image format image further comprises mapping, also at63, the WIM image format image with at least one of read-only access and read-write access. Mapping with read-only access allows a user to access, but not modify, the image, while mapping with read-write access allows a user to both access and modify the image, as will be explained in greater detail below. For example, when the image is mapped with read-only access, the mapping of the WIM image format image comprises mapping at least one image, and possibly to several different directories. In further examples, also at63, the method may comprise (i) mapping at least one image to one or more directories when the at least one image is mapped with read-only access, (ii) mapping each of at least two images to one or more directories when the at least two images are mapped with read-only access, (iii) mapping one image to one directory when the one image is mapped with read-write access, and (iv) mapping at least two images to at least two respective directories when the at least two images are mapped with read-write access. In other words, the method may act as a multiple reader, single writer, to protect the integrity of the original image file. If an image file is mapped in read-only mode, the image may be mapped to several different directories, because the underlying image will not change. Alternately, if you mount an image file for read-write access, the same image file cannot be mounted again for either read-only or read-write access, until the image file mapped for read-write access is unmapped. Moreover, a first image may be mapped to a first directory for read-write access and a second image may be mapped at the same time to a second directory for read-write access, because the first and second images are different image files. This mapping organizes the contents of the WIM image format image into a format readily understandable to a user. Once mapped63, the method further comprises providing access, at67, to the contents of the WIM image format image. In one exemplary embodiment, the providing access67may further comprise providing access to the mapped image with a standard file accessing application. In one alternative embodiment, the providing access67may further comprise accessing the mapped image with a Win32 application programming interface (API). In still another alternative embodiment, the providing access may further comprise accessing the mapped image with a file system explorer tool, such as at least one of Microsoft® Windows Explorer, Microsoft® Internet Explorer, Microsoft® Command Processor, Microsoft® Notepad, Microsoft® Word, and Microsoft® WordPad. Other alternative means for providing access to the mapped image are also contemplated as within the scope of one or more embodiments of the claimed invention.

In another alternative embodiment, the mapping63of at least one image may further comprise mapping a first image to a first directory41and mapping a second image to a second directory, whereby the providing access67further comprises comparing the first image with the second image. This comparison provides a user with the ability to readily compare one image to another, whereby changes in the images may be readily ascertained. This comparison may be manual, or by hand, or may be undertaken computationally by a processor132(e.g.,FIG. 5), whereby any and all differences between the first and second images are readily understood. In still another alternative embodiment, the method may further comprise displaying, at71, the contents of the WIM image format image mapped to the directory for review by a user. An example of such a display is shown as the directory41ofFIG. 3. With such a display of the image in a directory format, a user can readily review and consider the contents of the image. This allows the user to make a variety of decisions based upon the contents of the image, including whether or not the image contains the files desired by the user and whether those files are arranged in an appropriate structure.

Beyond providing access67to the contents of the WIM image and displaying71the contents of the image for review by a user, the method further comprises receiving edits, at75, to the contents of the WIM image format image. For example, a user viewing the displayed contents of the image in a directory41may wish to change one or more features of the image without recreating the image. Such receiving edits may comprise receiving at least one of file additions to the image, file modifications to the image, and file deletions from the image. Any such additions, modifications, and deletions may be utilized without departing from the scope of the one or more embodiments claimed invention. Once such edits are received, the method may further comprise displaying, at71, the contents of the WIM image format image with the received edits as part of the displayed image for review by the user. Because the edits are displayed, the user can view a current snapshot of the image as it would appear if the edits were applied. It is also contemplated that the user may disengage such a display of the received edits to view the image in its present form, without the received edits. In another alternative embodiment, it is also contemplated that the user may view one or more of the received edits as applied to the image, while one or more of the other received edits is now shown as applied to the displayed image.

Once such edits are received75, the method may further comprise modifying, at77, the WIM image format image mapped to the directory41to include the received edits. By modifying77the WIM image format image with the received edits, a user has the ability to modify the WIM image without recreating the image in an online state, as is conventional. By modifying77the existing image, much effort and time can be saved over conventional image recreation techniques, as would be readily understood by one skilled in the art. In particular, the modifying77may comprise unmapping the contents of the WIM image format image from the directory41, unmapping the WIM image format image from the directory, and applying the received edits to the unmapped WIM image format image to create a modified WIM image format image. Modifications requested by the user are recorded in temporary files while the WIM image is mapped for use as described above. While unmapping the WIM image format image from the mapped directory41, the user also has the option to discard the changes made to the WIM image format image. The method may further comprise storing, at81, the modified WIM image format image in an offline state without recreating the image, which would conventionally require restoring the old image, adding the modifications, and re-capturing into a new image. In particular, the storing of the WIM image format image may comprise storing a file-based image, rather than conventional sector-based imaging.

In another alternative embodiment, the method may further comprise opening, at85, a file within the contents of the displayed image. For example, if a user wishes determine if an image contains the correct version of a file, the user may open the file in question directly from the accessed image. In this manner, all files stored in the image may be reviewed for accuracy, without bringing the entire image into an online state. Offline review of the contents of the image is particularly useful for a large image that would take some time to bring to an online state for review. According to the present opening85, the contents of any file may be readily reviewed in a copy of the image, which is achieved much more efficiently than by having to restore the image to a portion on the hard disk drive154and verify the contents of the image.

In yet another alternative embodiment, the method may further comprise executing, at87, an application within the contents of the displayed image. As with the opening85of a file within the contents of the displayed image, the executing87of an application allows the user to determine if an image contains the correct version of an application, or other executable file. Moreover, by executing87an application within the image, the behavior of the application within the image may be understood without having to restore the image.

General Purpose Computing Device

FIG. 5shows one example of a general purpose computing device in the form of a computer130. In one embodiment of the invention, a computer such as the computer130is suitable for use in the other figures illustrated and described herein. In one example, the system21discussed above may be embodied by computer130. Computer130additionally has one or more processors or processing units132and a system memory134. In the illustrated embodiment, a system bus136couples various system components including the system memory134to the processors132. The bus136represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus also known as Mezzanine bus.

The computer130typically has at least some form of computer readable media. Computer readable media, which include both volatile and nonvolatile media, removable and non-removable media, may be any available medium that can be accessed by computer130. By way of example and not limitation, computer readable media comprise computer storage media and communication media. Computer storage media include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. In one example, computer storage media include RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by computer130. Communication media typically embody computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and include any information delivery media. Those skilled in the art are familiar with the modulated data signal, which has one or more of its characteristics set or changed in such a manner as to encode information in the signal. Wired media, such as a wired network or direct-wired connection, and wireless media, such as acoustic, RF, infrared, and other wireless media, are examples of communication media. Combinations of the any of the above are also included within the scope of computer readable media.

The system memory134includes computer storage media in the form of removable and/or non-removable, volatile and/or nonvolatile memory. In the illustrated embodiment, system memory134includes read only memory (ROM)138and random access memory (RAM)140. A basic input/output system142(BIOS), containing the basic routines that help to transfer information between elements within computer130, such as during start-up, is typically stored in ROM138. RAM140typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit132. By way of example, and not limitation,FIG. 5illustrates operating system144, application programs146, other program modules148, and program data150.

The drives or other mass storage devices and their associated computer storage media discussed above and illustrated inFIG. 5, provide storage of computer readable instructions, data structures, program modules and other data for the computer130. InFIG. 5, for example, hard disk drive154is illustrated as storing operating system170, application programs172, other program modules174, and program data176. Note that these components can either be the same as or different from operating system144, application programs146, other program modules148, and program data150. Operating system170, application programs172, other program modules174, and program data176are given different numbers here to illustrate that, at a minimum, they are different copies.

A user may enter commands and information into computer130through input devices or user interface selection devices such as a keyboard180and a pointing device182(e.g., a mouse, trackball, pen, or touch pad). Other input devices (not shown) may include a microphone, joystick, game pad, camera, scanner, or the like. These and other input devices are connected to processing unit132through a user input interface184that is coupled to system bus136, but may be connected by other interface and bus structures, such as a parallel port, game port, or a Universal Serial Bus (USB). A monitor188or other type of display device is also connected to system bus136via an interface, such as a video interface190. In addition to the monitor188, computers often include other peripheral output devices (not shown) such as a printer and speakers, which may be connected through an output peripheral interface (not shown). In one example, the user interfaces discussed above may be embodied by such input devices and monitors.

The computer130may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer194. The remote computer194may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to computer130. The logical connections depicted inFIG. 5include a local area network (LAN)196and a wide area network (WAN)198, but may also include other networks. LAN136and/or WAN138can be a wired network, a wireless network, a combination thereof, and so on. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets, and global computer networks (e.g., the Internet).

When used in a local area networking environment, computer130is connected to the LAN196through a network interface or adapter186. When used in a wide area networking environment, computer130typically includes a modem178or other means for establishing communications over the WAN198, such as the Internet. The modem178, which may be internal or external, is connected to system bus136via the user input interface184, or other appropriate mechanism. In a networked environment, program modules depicted relative to computer130, or portions thereof, may be stored in a remote memory storage device (not shown). By way of example, and not limitation,FIG. 5illustrates remote application programs192as residing on the memory device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.

In operation, computer130executes a computer-implemented method of operation on one or more data processing devices such as described above for servicing, by a computer, an image having a file-based image format in an offline state. The computer130(or its components) maps the contents of the image to a directory with a file system filter driver. The computer130(or its components) provides access to the contents of the image. The computer130(or its components) displays the contents of the image mapped to the directory for review by a user.

Also in operation, computer130executes a computer-implemented method of operation on one or more data processing devices such as described above for servicing, by a computer, an image having a file-based image format in an offline state. The computer130(or its components) mapping the contents of the image to a directory with a file system filter driver. The computer130(or its components) providing access to the contents of the image. The computer130(or its components) receiving edits to the contents of the image.

Those skilled in the art will note that the order of execution or performance of the methods illustrated and described herein is not essential, unless otherwise specified. That is, it is contemplated by the inventors that elements of the methods may be performed in any order, unless otherwise specified, and that the methods may include more or less elements than those disclosed herein.

APPENDIX A

The WIMMountImage API can be used to mount an Image in a WIM file to the specified directory.

/// <summary>///  The WIMMountImage method maps the contents of the given///  image in a WIM file to the specified mount directory. After the///  successful completion of this operation users or applications can///  access the contents of the Image mapped under the mount directory./// </summary>/// <param name=“lpszMountPath”>///  The full path of the directory to which the WIM has to be mounted.///  This parameter is required and cannot be NULL./// </param>/// <param name=“lpszWimFileName”>///  The full file name of the WIM file that has to be mounted. This///  parameter is required and cannot be NULL./// </param>/// <param name=“dwImageIndex”>///  The index of the image in the WIM file that has to be mounted./// </param>/// <param name=“lpszTempPath”>///  The full path to the temp directory in which changes to the WIM///  file can be tracked. If this parameter is NULL, the image will not be///  mounted for edits./// </param>/// <returns>///  Returns TRUE and sets the LastError to ERROR_SUCCESS on the///  successful completion of this method. Returns FALSE in case of a///  failure and the LastError is set to the appropriate Win32 error value./// </returns>BOOLWINAPIWIMMountImage(LPWSTR lpszMountPath,LPWSTR lpszWimFileName,DWORD dwImageIndex,LPWSTR lpszTempPath);

The WIMUnmountImage API can be used to unmount an Image in a WIM file from the specified mount directory.

/// <summary>///  The WIMUnmountImage API unmaps the contents of the given///  image in the WIM file from the specified mount directory. After the///  successful completion of this operation users or applications will///  not be able to access the contents of the image previously///  mapped under the mount directory./// </summary>/// <param name=“lpszMountPath”>///  The full path of the directory to which the WIM has been mounted.///  This parameter is required and cannot be NULL./// </param>/// <param name=“lpszWimFileName”>///  The full file name of the WIM file that has to be unmounted. This///  parameter is required and cannot be NULL./// </param>/// <param name=“dwImageIndex”>///  The index of the image in the WIM file that has to be unmounted./// </param>/// <param name=“bCommitChanges”>///  Flag to indicate whether changes (if any) to the WIM file should///  be committed before unmounting the WIM file. This flag will have///  no effect if the WIM file was mounted to not allow edits./// </param>/// <returns>///  Returns TRUE and sets the LastError to ERROR_SUCCESS on the///  successful completion of this method. Returns FALSE in case of a///  failure and the LastError is set to the appropriate Win32 error value./// </returns>BOOLWINAPIWIMUnmountImage(LPWSTR lpszMountPath,LPWSTR lpszWimFileName,DWORD dwImageIndex,BOOL bCommitChanges);

The WIMGetMountList API can be used to get the list of WIM files and the current mount paths to which they are mounted.

/// <summary>///  The WIMGetMountList API gets a list of mounted images,///  their corresponding mount paths and whether they have beenmounted for Read-only access or not./// </summary>/// <param name=“lpMountList”>///  The buffer to which the information about all mounted imagesis written to./// </param>/// <param name=“lpcbBufferSize”>///  The pointer to the size of the input buffer. If the input buffer is not///  large enough to hold all the mounted images information, then the///  size of the buffer needed is written to this pointer. If the buffer///  was large enough to hold all mounted image information, the pointeris updated to hold the actual size of/// the buffer that was used./// <returns>///  Returns TRUE and sets the LastError to ERROR_SUCCESS on the///  successful completion of this method. Returns FALSE in case of a///  failure and the LastError is set to the appropriate Win32 error value./// </returns>BOOLWIMGetMountList(LPWIM_MOUNT_LIST lpMountList,LPDWORD lpcbBufferSize);

The buffer containing the list of mounted Images is an array of _WIM_MOUNT_LIST structure.

The WIMIsImageMounted API can be used to check whether a particular image in a WIM file is mounted to a directory or not. It can also be used to check whether any of the images in the WIM file is currently mounted to a directory or not.

/// <summary>///  The WIMIsWimMounted API checks whether an image within the///  given WIM file is mounted under any mount directory./// </summary>/// <param name=“WimFileName”>///  The full path file name of the WIM file. This parameter is required///  and cannot be NULL.///</param>/// <param name=“ImageIndex”>///  The index of the image in the WIM file that has to be checked///  whether it is currently mounted or not. If the specified image///  index is zero, then this API will check if any of the images///  within the WIM file is currently mounted or not./// </param>/// <returns>///  A BOOL true value if the image within the WIM file is///  currently mounted. A BOOL false value otherwise./// </returns>BOOLWINAPIWIMIsImageMounted(LPWSTR lpszWimFileName,DWORD dwImageIndex);

The WIMIsFileChanged API can be used to check whether a given file within a WIM file has been changed or not after it was mounted.

/// <summary>///  The WIMIsFileChanged API checks whether the given file within a///  WIM file has been changed after the WIM file was mounted./// </summary>/// <param name=“WimFileName”>///  The full file name of the WIM file that is mounted. This parameter is///  required only if the MountPath parameter is not specified.///</param>/// <param name=“MountPath”>///  The full path to the directory to which the WIM has been mounted.///  This parameter is required only when the WimFileNameis not specified./// </param>/// <returns>///  A BOOL true value if the given file within WIM file has been///  modified. A BOOL false value otherwise./// </returns>BOOLWIMIsFileChanged(PWSTR WimFileName,PWSTR MountPath,PWSTR FileName);