Меню

Dism ошибка 1812 указанный файл образа не содержит секции ресурсов

  • Remove From My Forums
  • Question

  • I am running WDS for deployment of windows 10 and I would like to keep the wim files up to date with windows updates.  When I mount the file using the following command I get the following results.  I have looked up error 1812 and what I am finding
    it is telling me that my file is damaged.  I know this is not the case because I just created the file using the capture in WDS.  Also when I look in the folder that the file is suppose to mount to it is empty.  If I try to mount again it state
    that something is already mounted in the folder.

    DISM.EXE /MOUNT-WIM /WIMFILE:E:RemoteInstallImagesSX2019-q370.wim  /INDEX:1 /MOUNTDIR:e:MOUNT

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.3750

    Mounting image

    Error: 1812

    The specified image file did not contain a resource section.

    The DISM log file can be found at C:WindowsLogsDISMdism.log

Answers

    • Marked as answer by

      Thursday, October 29, 2020 6:13 PM

  • Remove From My Forums
  • Question

  • I am running WDS for deployment of windows 10 and I would like to keep the wim files up to date with windows updates.  When I mount the file using the following command I get the following results.  I have looked up error 1812 and what I am finding
    it is telling me that my file is damaged.  I know this is not the case because I just created the file using the capture in WDS.  Also when I look in the folder that the file is suppose to mount to it is empty.  If I try to mount again it state
    that something is already mounted in the folder.

    DISM.EXE /MOUNT-WIM /WIMFILE:E:RemoteInstallImagesSX2019-q370.wim  /INDEX:1 /MOUNTDIR:e:MOUNT

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.3750

    Mounting image

    Error: 1812

    The specified image file did not contain a resource section.

    The DISM log file can be found at C:WindowsLogsDISMdism.log

Answers

    • Marked as answer by

      Thursday, October 29, 2020 6:13 PM

  • Remove From My Forums
  • Question

  • I am running WDS for deployment of windows 10 and I would like to keep the wim files up to date with windows updates.  When I mount the file using the following command I get the following results.  I have looked up error 1812 and what I am finding
    it is telling me that my file is damaged.  I know this is not the case because I just created the file using the capture in WDS.  Also when I look in the folder that the file is suppose to mount to it is empty.  If I try to mount again it state
    that something is already mounted in the folder.

    DISM.EXE /MOUNT-WIM /WIMFILE:E:RemoteInstallImagesSX2019-q370.wim  /INDEX:1 /MOUNTDIR:e:MOUNT

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.3750

    Mounting image

    Error: 1812

    The specified image file did not contain a resource section.

    The DISM log file can be found at C:WindowsLogsDISMdism.log

Answers

    • Marked as answer by

      Thursday, October 29, 2020 6:13 PM

  • Remove From My Forums
  • Question

  • I am running WDS for deployment of windows 10 and I would like to keep the wim files up to date with windows updates.  When I mount the file using the following command I get the following results.  I have looked up error 1812 and what I am finding
    it is telling me that my file is damaged.  I know this is not the case because I just created the file using the capture in WDS.  Also when I look in the folder that the file is suppose to mount to it is empty.  If I try to mount again it state
    that something is already mounted in the folder.

    DISM.EXE /MOUNT-WIM /WIMFILE:E:RemoteInstallImagesSX2019-q370.wim  /INDEX:1 /MOUNTDIR:e:MOUNT

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.3750

    Mounting image

    Error: 1812

    The specified image file did not contain a resource section.

    The DISM log file can be found at C:WindowsLogsDISMdism.log

Answers

    • Marked as answer by

      Thursday, October 29, 2020 6:13 PM

LoadResource: Указанный файл образа не содержит секции ресурсов

Тема в разделе «WASM.WIN32», создана пользователем vladqq, 28 май 2009.


  1. vladqq

    vladqq

    New Member

    Публикаций:

    0

    Регистрация:
    24 мар 2009
    Сообщения:
    69

    хай всем

    пишу стаб для своего pe-компрессора, в образовательных целях :)
    сделал для теста простой загрузчик, который распакованный в память exe приводит в порядок (за счёт секции релоков) и передаёт ему управление.
    всё сделал, всё работает, за исключением одного момента — ресурсы.

    ресурсы обрабатываю таким образом — выделяю память по адресу >ImageBase текущего процесса (стаба), туда копирую секцию ресурсов от сжатого екзе. для текущего процесса (стаба) в хедерах прописываем VA новой секции ресурсов:

    our_data_directory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = NewResourcesVA; // NewResourcesVA = NewResources-ImageBase
    our_data_directory[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = NewResourcesSize;

    после правлю VA для всех найденных в ресурсах IMAGE_RESOURCE_DATA_ENTRY.
    после когда уже всё готово для передачи управления entry point-у, ради теста написал такой вот код (в память загружался пустой скомпиленый билдером екзе):

    HRSRC rs = FindResource(hInstance, «TFORM1», RT_RCDATA); // тут получаем правильный адрес, NewResources+0x130
    DWORD cbRes = SizeofResource(hInstance, rs); // тут 0
    HGLOBAL glb = LoadResource(hInstance, rs); // тут NULL
    LPVOID pResData = LockResource(glb); // тут NULL
    ShowError(); // тут — указанный файл образа не содержит секции ресурсов

    Вопрос — что я забыл сделать ?


  2. AndreyMust19

    AndreyMust19

    New Member

    Публикаций:

    0

    Регистрация:
    20 окт 2008
    Сообщения:
    714

    Значит ты неправильно восстановил секцию ресурсов. Я не помню — какие — VA или RVA адреса в директории ресурсов, но

    даст тебе RVA-адрес. Может ты хотел VA?

    Сначала проверь тест на нормальных файлах (то есть неупакованный тест-файл). Если он сработает, значит 100% дело в ошибке упаковщика, а не в самом тесте. Тогда выложи сам упаковщик, а именно — ту часть, к-я работает с ресурсами.


  3. vladqq

    vladqq

    New Member

    Публикаций:

    0

    Регистрация:
    24 мар 2009
    Сообщения:
    69

    В общем оказалось надо устанавливать в заголовках PE SizeOfImage = NewResourcesVA+NewResourcesSize, тк функция которая резолвит ресурсы проверяет не вылезли ли они за пределы размеров образа PE, и если вылезли — заканчивает резолвинг с ошибок что образ не содержит ресурсов (эту ошибку он выдаёт в разных случаях, не обязательно файл должен не содержать ресурсов).


  4. AndreyMust19

    AndreyMust19

    New Member

    Публикаций:

    0

    Регистрация:
    20 окт 2008
    Сообщения:
    714

    SizeOfImage — это размер виртуального образа. Должен определяться так:

    1. SizeOfImage = RVAадрес_последней_секции + Виртуальный_размер_последней_секции

    Секция ресурсов необязательно должна быть последней (н-р, после упаковки AsPack’ом после ресурсов появляется еще 2 секции).
    Если (Виртуальный_размер_последней_секции == 0), то он определяется как физический размер, выровненный на выравнивание секций в памяти (SectionAligment).


  5. vladqq

    vladqq

    New Member

    Публикаций:

    0

    Регистрация:
    24 мар 2009
    Сообщения:
    69

    Дело в том что после того как я её распакую вслед за стабом она станет последней в любом случае. Я просто сразу не обратил внимания на SizeOfImage в заголовке, а текст сообщения об ошибке сбил с толку.


WASM

  • Remove From My Forums
  • Question

  • I am running WDS for deployment of windows 10 and I would like to keep the wim files up to date with windows updates.  When I mount the file using the following command I get the following results.  I have looked up error 1812 and what I am finding
    it is telling me that my file is damaged.  I know this is not the case because I just created the file using the capture in WDS.  Also when I look in the folder that the file is suppose to mount to it is empty.  If I try to mount again it state
    that something is already mounted in the folder.

    DISM.EXE /MOUNT-WIM /WIMFILE:E:RemoteInstallImagesSX2019-q370.wim  /INDEX:1 /MOUNTDIR:e:MOUNT

    Deployment Image Servicing and Management tool
    Version: 10.0.14393.3750

    Mounting image

    Error: 1812

    The specified image file did not contain a resource section.

    The DISM log file can be found at C:WindowsLogsDISMdism.log

Answers

    • Marked as answer by

      Thursday, October 29, 2020 6:13 PM

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Dism ошибка 1 неверная функция как исправить
  • Dism ошибка 1 неверная функция windows 10