Запуск командного инструмента dism для восстановления образа windows 10

Run DISM.EXE from Windows 10 Recovery Mode

/Capture-Image

Captures an image of a drive to a new .wim file. Captured directories include all subfolders and data. You cannot capture an empty directory. A directory must contain at least one file. DISM can also optionally apply and capture extended attributes (EA).

You can capture the image as a Windows image (.wim) file or a set of split Windows image (.swm) files, but this option doesn’t support capturing a virtual hard disk (.vhd/.vhdx) file. See if you are looking to capture an FFU.

Syntax:

Parameter Description
/ConfigFile Specifies the location of a configuration file that lists exclusions for image capture and compress commands. For more information, see DISM Configuration List and WimScript.ini Files.
/Compress Specifies the type of compression used for the initial capture operation. The maximum option provides the best compression, but takes more time to capture the image. The fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximum option. This is also the default compression type that is used if you do not specify the argument. The none option does not compress the captured image at all.
/Bootable Marks a volume image as being a bootable image. This argument is available only for WinPE images. Only one volume image can be marked as bootable in a .wim file.
/CheckIntegrity Detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations.
/Verify Checks for errors and file duplication.
/NoRpFix Disables the reparse point tag fix. A reparse point is a file that contains a link to another file on the file system. If /NoRpFix is not specified, reparse points that resolve to paths outside of the value specified by /ImageFile will not be captured.
/WIMBoot Use /WIMBoot to append the image with Windows image file boot (WIMBoot) configuration. This only applies to Windows 8.1 images that have been captured or exported as a WIMBoot file. This feature isn’t supported in Windows 10.
/EA Captures extended attributes. The switch must be explicitly specified to capture extended attributes. DISM will capture extended attribute bits if they are set in the components to be captured in the WIM image. If the bits are not set, DISM won’t set them. Only the inbox components of CAB packages and drivers will have these extended attribute bits, not the AppX package components or Win32 application components. Extended attributes with prefix “$Kernel.” in name will be skipped because only user mode extended attributes are captured. If you use DISM in Windows 10, version 1607 to capture extended attributes and use an earlier version of DISM to apply the image, the operation will succeed but the extended attributes will not be set to the applied image.

Examples:

Установка Windows с LiveDisk by Sergei Strelec

/Unmount-Image

Unmounts the .ffu, .wim, .vhd or .vhdx file and either commits or discards the changes that were made when the image was mounted.

You must use either the /commit or /discard argument when you use the /Unmount-Image option.

Syntax:

Parameter Description
/CheckIntegrity Detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations.
/Append Adds the modified image to the existing .wim file instead of overwriting the original image. The /CheckIntegrity and /Append arguments do not apply to virtual hard disk (VHD, VHDX), or FFU files.

Examples:

To restore removed Windows features

  1. Enable a specific feature in the image. If you do not specify a source, DISM will look in the default location specified by group policy for the required files needed to enable the feature For more information, see Configure a Windows Repair Source.

    If the files are not found in the default location, DISM will contact Windows Update (WU) for the required files. You can use the argument to prevent DISM from contacting WU.

    If you specify multiple arguments, the files are gathered from the first location where they are found and the rest of the locations are ignored.

    For example, type:

    To service an offline image, specify the location of the mounted image directory. For example, type:

  2. Optional: Get the status of the feature you have enabled. For example, type:

    If the status is EnablePending, you must boot the image in order to enable the feature entirely.

Описание распространенных ошибок повреждения

/Commit-Image

Requirements

You must install the Windows Assessment and Deployment Kit (Windows ADK) on your development computer in order to create DISM API applications:

  • Your customized solutions on the DISM platform are developed using the DISM SDK. This is installed when the Windows ADK is installed. For more information about supported operating systems, see the Windows Assessment and Deployment Kit (Windows ADK) Technical Reference.

  • When running customized solutions on the DISM platform, you must verify that the Windows ADK architecture version matches the operating system architecture version. For example, a customized solution developed for 32-bit PCs runs on the 32-bit version of Windows.

  • In order to properly develop and run your customized solutions on the DISM platform, you must verify you are using the DISM binaries from the Windows ADK:

    • Install the latest version of the Windows ADK on the PC that will run the customized solution.

    • The binary files for your customized solutions must be saved in the same directory as the DISM binaries installed by the Windows ADK. For example, if you are running Windows 8 (x64) and the Windows ADK for Windows 8.1, your customized solutions binaries must be located in c:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM.

    • Run your customized solutions from the Deployment and Imaging Tools Environment so that the necessary environment variables are set up prior running your solutions.

      From the start screen, type deployment. Right-click Deployment and Imaging Tools Environment and select Run as administrator.

      Note  
      If you don’t run from the Deployment and Imaging Tools Environment, you must verify that the PATH environment variable uses the location of the DISM binaries from the Windows ADK.

  • You will need a supported Windows image file type, .wim, .vhd, or .vhdx, or an online installation of Windows to use the DISMAPI for servicing and management. Some operations are not valid on online images. For more information, see the DISM API Reference.

Mount an image

You can mount an image using the /optimize option to reduce initial mount time. However, When using the /optimize option, processes that are ordinarily performed during a mount will instead be completed the first time that you access a directory. As a result, there may be an increase in the time that is required to access a directory for the first time after mounting an image using the /optimize option.

  1. Open a command prompt with administrator privileges.

    Note

    If you are using a version of Windows other than Windows 8 or Windows 10, use the Deployment Tools Command Prompt that gets installed with the ADK.

  2. Use DISM to mount the image

    Note

    To mount a Windows image from a VHD or FFU file, you must specify .

    For more information about the options available for the /Mount-Image option in DISM, see DISM Image Management Command-Line Options.

Unmounting an image

After you modify a mounted image, you must unmount it. If you mounted your image with the default read/write permissions, you can commit your changes. This makes your modifications a permanent part of the image.

If you modified an applied image, you don’t have to do anything else. You’ll see any changes you made when you boot the PC.

  1. Open a command prompt or the Deployment and Imaging Tools Environment with administrator privileges.

  2. Unmount the image.

    where is the location of the mount directory. If you do not specify the parameters to unmount, this option lists all of the mounted images but does not perform the unmount action.

    Important

    You must use either the /commit or /discard argument when you use the /unmount option.

Get App Package (.appx) Servicing Information

You can use the app package (.appx) servicing commands to list the provisioned apps in a Windows image. Provisioned apps will be registered for every user profile that is created for the Windows image.

For more information about app package servicing commands available in DISM, see DISM App Package (.appx or .appxbundle) Servicing Command-Line Options.

To list provisioned apps in the Windows image

  1. Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.

  2. To list provisioned apps in a mounted offline Windows image, type:

    For a running operating system, type:

The report generated includes the following information:

Field Description Example

DisplayName

The name of the app.

Fabrikam.Sample.CS

Version

The version number of the app package.

1.0.0.0

Architecture

The architecture of the app.

neutral

ResourceID

For more information, see App packaging glossary.

PackageName

The full name of the app package.

Fabrikam.Sample.CS_1.0.0.0_neutral_s9y1p3hwd5qda

Get Driver Information

The driver-servicing commands can be used to enumerate driver packages in the driver store based on their .inf files. You can use the /Get commands to display basic information about third-party driver packages or all driver packages in the offline image. When you point to an offline image or a running operating system, you can determine what driver packages are in the image, and get information about the drivers.

You can display detailed information about a specific installed .inf file, or one that is not yet installed. Installed drivers in the driver store will be named Oem0.inf, Oem1.inf, and so on.

For more information about driver-servicing commands available in DISM, see DISM Driver Servicing Command-Line Options.

To list driver packages in the offline image

  1. Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.

  2. Use one of the following commands to list information about all of the driver packages in a mounted offline Windows image:

    For a running operating system, type one of the following commands:

The report generated includes the following information:

Field Description Example

Published Name

The name of the driver package after it is added to the driver store.

Oem0.inf

Original File Name

The original .inf file name of the driver package.

Toaster.inf

Inbox

Yes for a default driver (inbox driver) or No for third-party driver packages.

No

Class Name

The friendly name of the device class the driver is a member of.

Printer

Provider Name

The provider or digital signature for the driver package.

Microsoft

Date

The date associated with the driver, as it is specified in the .inf file. The date will be formatted appropriately for your locale.

10/31/2006

Version

The version number that is specified in the INF driverVer directive.

6.1.6801.0

To get information about a specific driver

  1. Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.

  2. List information about a specific driver package in the offline Windows image. For example, type:

    For a running operating system, type:

The report generated includes the following information:

Field Description Example

Published Name

The name of the driver package after it is added to the driver store.

Oem0.inf

Driver Store Path

The path to the driver location. If the driver is installed, the path to the driver store is listed. If the driver is not installed yet, the path to the driver on the servicing host is listed.

E:\Images\Mount_depset\Windows\System32\DriverStore\FileRepository\Fasttx2k.inf_x86_neutral_0328f62e\Fasttx2k.inf

Class Name

The friendly name of the device class the driver is a member of.

Printer

Class Description

The description of the device class the driver is a member of.

Printers

Class GUID

The GUID of the device class that the driver is a member of.

{4D36E97B-E325-11CE-BFC1-08002BE10318}

Date

The date associated with the driver, as it is specified in the .inf file. The date will be formatted appropriately for your locale.

8/6/2003

Version

The driver version number that is specified in the INF driverVer directive.

1.0.1.37

Boot Critical

Yes if the driver is boot critical or No if it is not.

No

Drivers for architecture

The architecture of the image that it is installed on. If the driver is not installed yet, the field is reported repeatedly for each supported operating system architecture.

x86

Manufacturer

The manufacturer of the supported device.

Adventure Works

Description

A description of the supported device.

Windows XP Adventure Works 376 Controller

Architecture

The architecture of the driver.

x86

Hardware ID

The hardware ID of the supported device.

ABC_3376

Service Name

The service name of the driver.

C1232k

Compatible IDs

Alternate Plug and Play (PnP) IDs for the device, if any apply.

12ABC

Exclude IDs

PnP IDs that will not match the device, any apply.

A_123

Note
If you point to a driver that is not yet installed, the report will be slightly different.

/Append-Image

How to Fix DISM.exe /Online /Cleanup-Image /Restorehealth Error 87

Modify an image

After you mount an image, you can use DISM to add and remove drivers, packages, language packs, enumerate drivers and packages, modify configuration settings, and more.

View and modify an image

You can create, view, and edit files on a mounted image, just as you would any other file on your PC. When you modify the files in a mounted image, those file changes get saved in the image. Note that although you can add application files and folders, you can’t install applications directly into a mounted image in the same way that you would on a running PC. If you must add an application or a device, verify that you included all of the required files.

Add and remove drivers

See Add and remove drivers to an offline Windows image to learn how to work with drivers. Note that the DISM driver commands will only run against an offline image.

Upgrade to a higher Windows edition

Any changes you make to a mounted image are also applied to each potential target edition of Windows. Each target edition is staged in the image. The changes will not be lost when you upgrade to a higher edition of Windows.

See Change the Windows image to a higher edition using DISM to learn how to change editions.

Reduce the size of an image

You can use DISM to reduce the footprint of a Windows image by cleaning up superseded components and resetting the base of the superseeded components.

At an elevated command prompt, run the following command to reduce the size of the image file:
Dism /Image:C:\test\offline /cleanup-image /StartComponentCleanup /ResetBase

Limitations

  • If you do not enter the product key when you set the edition of your offline image, you must either enter the product key during OOBE, or use an unattended answer file to enter the product key during the specialize configuration pass.

  • You cannot use edition-servicing commands on a Windows Preinstallation Environment (Windows PE) image.

  • To maintain edition-specific customizations, you should apply edition-specific answer files after the edition upgrade.

  • If you want to run the /Set-Edition option against a 64-bit image with more than 30 language packs, you must run it from a 64-bit computer. Otherwise, you might receive an out-of-memory error. This limitation only exists if you are manipulating a 64-bit image from a 32-bit computer. This limitation does not exist when you run this option on a computer that matches the architecture of the image.

  • You cannot set a Windows image to a lower edition. The lowest edition will not appear when you run the /Get-TargetEditions option.

  • You should not use the /Set-Edition option on an image that has already been changed to a higher edition.

Update or remove packages

You can remove a preinstalled app, including the license and custom data files, from a Windows image by using the DISM.exe tool or the DISM cmdlets in Windows PowerShell. You should remove the old version of the app before installing a new one.

Remove a preinstalled app by using DISM

  1. Open the Deployment Tools Command Prompt, installed with the Windows ADK, with administrator privileges. From the Start screen, type Deployment and Imaging Tools Environment, right-click the icon, and select Run as Administrator.

  2. Mount the offline image for servicing. At the command prompt, type:

  3. Find the full package name of the app that you want to remove. At the command prompt, type:

  4. Remove the app from the mounted image. For example, at the command prompt, type:

  5. If you want to update the app, you can preinstall the updated version of the Microsoft Store-signed app. At a command prompt, type:

  6. Save changes and unmount the image. At the command prompt, type:

Решение для Windows 7 с пакетом обновления 1 (SP1) и Windows Server 2008 R2 с пакетом обновления 1 (SP1)

Improving Security for Windows Images

Your Windows images contain custom configuration data, custom applications, and other intellectual property. There are several ways to improve the security of your Windows images, both online and offline.

  • Restrict access to Windows images. Depending on your environment, you can edit the access control lists (ACLs) or permissions on a file. Only approved accounts can have access to Windows images.

  • Update your Windows images with the latest fixes and software updates. There are many ways you can service a Windows image. After servicing your Windows image, test the validity and stability of the computer.

  • During Windows installation, configure the computer to automatically download and install Windows updates. This extends installation time, but ensures that the Windows image that you are installing contains the latest updates. For more information, see the setting in the Microsoft-Windows-Setup component in the Unattended Windows Setup Reference.

/Export-Image

Exports a copy of the specified image to another file. The source and destination files must use the same compression type. You can also optimize an image by exporting to a new image file. When you modify an image, DISM stores additional resource files that increase the overall size of the image. Exporting the image will remove unnecessary resource files.

This command-line option does not apply to virtual hard disk (VHD) files.

Syntax:

Parameter Description
/SWMFile Enables you to reference split .wim files. pattern is the naming pattern and location of split files. You can also specify wildcard characters. For example, «E:\image\install*.swm» will export the split files in the E:\image directory named install1.swm, install2.swm, and so on.
/Compress Specifies the type of compression used for the initial capture operation. The /Compress argument does not apply when you export an image to an existing .wim file, you can only use this argument when you export an image to a new .wim file. The maximum option provides the best compression, but takes more time to capture the image. The fast option provides faster image compression, but the resulting files are larger than those compressed by using the maximum option. This is also the default compression type that is used if you do not specify the argument. Use the recovery option to export push-button reset images. The resulting files are much smaller in size, which in turn, greatly reduce the amount of disk space needed for saving the push-button reset image on a recovery drive. The destination file must be specified with an .esd extension. The none option does not compress the captured image at all.
/Bootable Marks a volume image as being a bootable image. This argument is available only for WinPE images. Only one volume image can be marked as bootable in a .wim file.
/WIMBoot Use /WIMBoot to append the image with Windows image file boot (WIMBoot) configuration. This only applies to Windows 8.1 images that have been captured or exported as a WIMBoot file. This feature isn’t supported in Windows 10.
/CheckIntegrity Detects and tracks .wim file corruption when used with capture, unmount, export, and commit operations. /CheckIntegrity stops the operation if DISM detects that the .wim file is corrupted when used with apply and mount operations.

Example:

Preinstall the device metadata or service metadata package

To preinstall a device metadata or service metadata package

  1. If you are preinstalling a Microsoft Store device app then you should have acquired the device metadata package. If you are preinstalling a mobile broadband app then you should have acquired the service metadata package.

    Note   Device metadata packages and service metadata packages use the same file name extension (.devicemetadata-ms).

  2. Copy the device metadata or service metadata package (devicemetadata-ms file) to your system image in the %ProgramData%\Microsoft\Windows\DeviceMetadataStore folder. You can do this in one of the following ways:

    • Online before running Sysprep

    • Offline after running Sysprep by using DISM. To do this:

      1. Mount the offline image for servicing.

      2. Copy the metadata package files to the device metadata store of the mounted image. For example, to copy the 0ECF2029-2C6A-41AE-9E0A-63FFC9EAD877.devicemetadata-ms metadata package file to the device metadata store, ProgramData\Microsoft\Windows\DeviceMetadataStore:

      3. Save the changes and unmount the image.

      For more info about offline image servicing, see DISM Overview.

For more info about service metadata, see Service metadata.

Scan for Corruption and Verify the Integrity of System Files

Before you deliver a computer to an end user, you should verify the integrity of Windows system files. You can use the /Cleanup-Image option to identify file corruption and perform repair operations on the image. For more information about the /Cleanup-Image option in DISM, see DISM Operating System Package Servicing Command-Line Options.

You can also use System File Checker (Sfc.exe) on an online or offline reference image. System File Checker is released with all versions of Windows.System File Checker requires elevated permissions, and you must be an Administrator to run it. It scans all protected files to verify the file versions. To verify only the integrity of the Windows system files, run the sfc.exe /verifyonly option. For complete command-line syntax, at an elevated command prompt, type sfc.exe /?.

Running Sfc.exe can take a significant amount of time. The expected result is that there are no system integrity violations. However, if there are problems with Windows system files, you should investigate the issues. We do not recommend that you use the Sfc.exe scan options to automatically fix Windows system files.

Использование Dism с файлом Install Esd

Как пользоваться командой Dism /Online /Cleanup-Image /RestoreHealth

Для использования команды DISM/RestoreHealth запустите командную строку от админа, и в ней наберите указанную выше команду:

После чего нажмите на ввод. В процессе выполнения процедуры вы будете видеть прогресс выполнения в процентном отображении.

Отображение прогресса при выполнении процедуры

Дождитесь окончания процедуры. Последняя может занять примерно 10-20 минут, после чего вы получите сообщение об удачном окончании операции.

Окончание процедуры проверки

Кроме традиционной формы реализации данной команды, вы можете также указать DISM где брать файлы для восстановления образа Виндовс. Если по умолчанию DISM черпает файлы с Центра обновления Виндовс, то оператор /source позволит вам указать, откуда брать указанные файлы.

Обычно для этого понадобится образ Виндовс той же сборки, что и установленная Виндовс на вашем PC. Из этого образа сделайте копию файла install.wim, и разместите её в удобной директории на вашем жёстком диске.

Далее запустите командную строку от админа, и в ней наберите:

DISM /Online /Cleanup-Image /RestoreHealth /Source:ПАПКА ВОССТАНОВЛЕНИЯinstall.wim

Вместо «ПАПКА ВОССТАНОВЛЕНИЯ» вы должны указать путь к папке, где находится файл install.wim, например, D:sources. Теперь команда будет выглядеть как:

DISM /Online /Cleanup-Image /RestoreHealth /Source:D:sourcesinstall.wim

Укажите директорию, в которой находится файл wim

Для блокировки доступа DISM к узлу Виндовс Update вы можете использовать оператор /LimitAccess, тогда команда будет выглядеть как:

DISM /Online /Cleanup-Image /RestoreHealth /Source:ПАПКА ВОССТАНОВЛЕНИЯinstall.wim /LimitAccess

В этом случае DISM будет обращаться только к указанной вами папке восстановления, и не задействует Центр обновления.

Также вы можете использовать рассматриваемую команду с зашифрованными образами .ESD, в этом случае команда будет иметь следующий вид:

DISM /Online /Cleanup-Image /RestoreHealth /Source:ПАПКА ВОССТАНОВЛЕНИЯInstall.esd

Укажите путь к файлу Install.esd

Учтите, что DISM всегда создаёт log-файл по пути %windir%/Logs/CBS/CBS.log, в котором можно найти перечень обнаруженных и исправленных утилитой проблем.

Наиболее распространенные проблемы с файлом Dism.exe

Существует несколько типов ошибок, связанных с файлом Dism.exe. Файл Dism.exe может находиться в неправильном каталоге файлов на вашем устройстве, может отсутствовать в системе или может быть заражен вредоносным программным обеспечением и, следовательно, работать неправильно. Ниже приведен список наиболее распространенных сообщений об ошибках, связанных с файлом Dism.exe. Если вы найдете один из перечисленных ниже (или похожих), рассмотрите следующие предложения.

  • Dism.exe поврежден
  • Dism.exe не может быть расположен
  • Ошибка выполнения — Dism.exe
  • Ошибка файла Dism.exe
  • Файл Dism.exe не может быть загружен. Модуль не найден
  • невозможно зарегистрировать файл Dism.exe
  • Файл Dism.exe не может быть загружен
  • Файл Dism.exe не существует

Dism.exe

Не удалось запустить приложение, так как отсутствует файл Dism.exe. Переустановите приложение, чтобы решить проблему.

Проблемы, связанные с Dism.exe, могут решаться различными способами. Некоторые методы предназначены только для опытных пользователей. Если вы не уверены в своих силах, мы советуем обратиться к специалисту

К исправлению ошибок в файле Dism.exe следует подходить с особой осторожностью, поскольку любые ошибки могут привести к нестабильной или некорректно работающей системе. Если у вас есть необходимые навыки, пожалуйста, продолжайте

Command-line Syntax

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

DISM.exe {/Image:<path_to_image_directory> | /Online} {servicing_option}

You can use the following edition-servicing options on an offline image to list editions or to change a Windows image to a higher edition:

DISM.exe /Image:<path_to_image_directory> {/Get-CurrentEdition | /Get-TargetEditions | /Optimize-Image /WIMBoot | /Set-Edition | /Set-ProductKey:<product_key>}

The following edition-servicing options are available for a running Windows operating system:

DISM.exe /Online {/Get-CurrentEdition | /Get-TargetEditions | /Set-ProductKey:<product_key> | /Set-Edition:<target_edition> {/GetEula:< path> | /AcceptEula /ProductKey:<product_key>}}

The following table provides a description for how each edition-servicing option can be used. These options are not case-sensitive.

Option Description

/Get-Help

/?

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

Examples:

Dism /Image:C:\test\offline /Get-CurrentEdition /?

Dism /Online /Get-CurrentEdition /?

/Get-CurrentEdition

Displays the edition of the specified image.

Examples:

Dism /Image:C:\test\offline /Get-CurrentEdition

Dism /Online /Get-CurrentEdition

/Get-TargetEditions

Displays a list of Windows editions that an image can be changed to.

Examples:

Dism /Image:C:\test\offline /Get-TargetEditions

Dism /Online /Get-TargetEditions

/Set-Edition:<target_edition_ID> [{/GetEula:<path | /AcceptEula /ProductKey:<product_key>}]

Use the /Set-Edition option with no arguments to change an offline Windows image to a higher edition.

To change an online Windows Server operation system to a higher edition, you must use the /Set-Edition option with the /AcceptEula and /ProductKey arguments.

Important

You should not use the /Set-Edition option on an image that has already been changed to a higher edition. It is recommended that you use this option on the lowest edition available in the edition family.

Use /GetEula on an online image to copy the end-user license agreement to a specified path.

The /AcceptEula argument accepts the end-user license agreement and is required in order to change the Windows edition on an online image.

Example:

Dism /Image:C:\test\offline /Set-Edition:<edition name>

On a running Windows Server operating system only:

Dism /online /Set-Edition:<edition name> /GetEula:c:\eulapath

Dism /online /Set-Edition:<edition name> /AcceptEula /ProductKey:12345-67890-12345-67890-12345

Where <edition name> is the higher edition that you want to change to.

/Set-ProductKey:<productKey>

The /Set-ProductKey option can only be used to enter the product key for the current edition in an offline Windows image after you change an offline Windows image to a higher edition using the /Set-Edition option.

Example:

Dism /Image:C:\test\offline /Set-ProductKey:12345-67890-12345-67890-12345

Использование опций RestoreHealth и Source в Dism

Оцените статью
Рейтинг автора
5
Материал подготовил
Андрей Измаилов
Наш эксперт
Написано статей
116
Добавить комментарий