WIMUnmountImage

Unmounts a mounted image in a Windows image (.wim) file from the specified directory.

BOOL
WINAPI
WIMUnmountImage(
     PWSTR  pszMountPath,
     PWSTR  pszWimFileName,
     DWORD  dwImageIndex,
     BOOL   bCommitChanges
    );

Parameters

pszMountPath

[in] A pointer to the full file path of the directory to which the .wim file was mounted. This parameter is required and cannot be NULL.

pszWimFileName

[in opt] A pointer to the full file name of the .wim file that must be unmounted. This parameter is required and cannot be NULL.

dwImageIndex

[in] Specifies the index of the image in the .wim file that must be unmounted.

bCommitChanges

[in] A flag that indicates whether changes (if any) to the .wim file must be committed before unmounting the .wim file. This flag has no effect if the .wim file was mounted not to enable edits.

Return Value

Returns TRUE and sets the LastError to ERROR_SUCCESS on the successful completion of this function. Returns FALSE in case of a failure and sets the LastError to the appropriate Win32® error value.

Remarks

The WIMUnmountImage function 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.

See Also

Concepts

WIMMountImage