MSEndpointMgr / ModernDriverManagement

Official repo of Modern Driver Management from MSEndpointMgr.com
https://www.msendpointmgr.com
MIT License
132 stars 77 forks source link

DISM fails with error 2. #145

Open sjnett01 opened 2 years ago

sjnett01 commented 2 years ago

When we are trying to install drivers as part of bare metal image they are not getting installed, DISM Log section for a driver

2022-02-15 12:41:13, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: 
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Host machine information: OS Version=10.0.19041, Running architecture=amd64, Number of processors=8
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Dism.exe version: 10.0.19041.1
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Executing command line: "X:\WINDOWS\system32\Dism.exe" /Image:C:\ /Add-Driver /Driver:"C:\_SMSTaskSequence\DriverPackage\GRY002DB\WT64_21H1\Audio\REALTEK\P00Y9L-B2A\src\USBAud\Win64\RtXUsbADFT2.inf" /LogLevel:3  /LogPath:X:\WINDOWS\TEMP\SMSTSLog\DISM.log 
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Connecting to the provider located at X:\WINDOWS\system32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-02-15 12:41:13, Warning               DISM   DISM Provider Store: PID=2676 TID=2712 Failed to load the provider: X:\WINDOWS\system32\Dism\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Connecting to the provider located at X:\WINDOWS\system32\Dism\FfuProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Connecting to the provider located at X:\WINDOWS\system32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Connecting to the provider located at X:\WINDOWS\system32\Dism\VHDProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Connecting to the provider located at X:\WINDOWS\system32\Dism\ImagingProvider.dll. - CDISMProviderStore::Internal_LoadProvider
2022-02-15 12:41:13, Warning               DISM   DISM Provider Store: PID=2676 TID=2712 Failed to load the provider: X:\WINDOWS\system32\Dism\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FfuManager
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: FfuManager.
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: VHDManager
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
2022-02-15 12:41:13, Info                  DISM   DISM Provider Store: PID=2676 TID=2712 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2022-02-15 12:41:13, Info                  DISM   DISM FFU Provider: PID=2676 TID=2712 [C:\] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
[2676] [0x8007007b] FIOReadFileIntoBuffer:(1452): The filename, directory name, or volume label syntax is incorrect.
[2676] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[2676] [0xc142011c] WIMGetMountedImageHandle:(2906)
2022-02-15 12:41:13, Info                  DISM   DISM WIM Provider: PID=2676 TID=2712 [C:\] is not a WIM mount point. - CWimMountedImageInfo::Initialize
2022-02-15 12:41:13, Info                  DISM   DISM VHD Provider: PID=2676 TID=2712 [C:\] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2022-02-15 12:41:13, Info                  DISM   DISM FFU Provider: PID=2676 TID=2712 [C:\] is not recognized by the DISM FFU provider. - CFfuImage::Initialize
2022-02-15 12:41:13, Info                  DISM   DISM Imaging Provider: PID=2676 TID=2712 The provider FfuManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage
2022-02-15 12:41:13, Info                  DISM   DISM VHD Provider: PID=2676 TID=2712 [C:\] is not recognized by the DISM VHD provider. - CVhdImage::Initialize
2022-02-15 12:41:13, Info                  DISM   DISM Imaging Provider: PID=2676 TID=2712 The provider VHDManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage
[2676] [0x8007007b] FIOReadFileIntoBuffer:(1452): The filename, directory name, or volume label syntax is incorrect.
[2676] [0xc142011c] UnmarshallImageHandleFromDirectory:(641)
[2676] [0xc142011c] WIMGetMountedImageHandle:(2906)
2022-02-15 12:41:13, Info                  DISM   DISM WIM Provider: PID=2676 TID=2712 [C:\] is not a WIM mount point. - CWimMountedImageInfo::Initialize
2022-02-15 12:41:13, Info                  DISM   DISM Imaging Provider: PID=2676 TID=2712 The provider WimManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage
2022-02-15 12:41:13, Info                  DISM   DISM Imaging Provider: PID=2676 TID=2712 No imaging provider supported CreateDismImage for this path - CGenericImagingManager::CreateDismImage
2022-02-15 12:41:13, Error                 DISM   DISM.EXE: Failed to access the image folder or image's windows folder.
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: 
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
2022-02-15 12:41:13, Info                  DISM   DISM.EXE: 

And ApplyDriverPackage.log contains the following for each driver

[DriverPackageInstall]: Starting driver package install phase   ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
 - Attempting to apply drivers using dism.exe located in: C:\_SMSTaskSequence\DriverPackage\GRY002DB    ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
 - DriverInstallMode is currently set to: Single    ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
 - Attempting to install driver: C:\_SMSTaskSequence\DriverPackage\GRY002DB\WT64_21H1\Audio\REALTEK\P00Y9L-B2A\src\USBAud\Win64\RtXUsbADFT1.inf to C:\  ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
[DriverPackageInstall]: Starting driver package install phase   ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
 - Attempting to apply drivers using dism.exe located in: C:\_SMSTaskSequence\DriverPackage\GRY002DB    ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
 - DriverInstallMode is currently set to: Single    ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)
 - Attempting to install driver: C:\_SMSTaskSequence\DriverPackage\GRY002DB\WT64_21H1\Audio\REALTEK\P00Y9L-B2A\src\USBAud\Win64\RtXUsbADFT1.inf to C:\  ApplyDriverPackage  15/02/2022 12:41:13 1068 (0x042C)

We are imaging various HP EliteBook/Zbooks using standard package, and the image is not a captured WIM, we are installing directly from Windows 21H2 ISO from the VLSC

Can anyone help?

sjnett01 commented 2 years ago

ApplyDriverPackage.log DISM.log

I have uploaded the full logs in case you require them

HermanGB commented 2 years ago

The default is to run dism in recurse and not single. Have you tried that? I can also see that there is a newer version driverpack for your model. (21H1)

sjnett01 commented 2 years ago

The default is to run dism in recurse and not single. Have you tried that? I can also see that there is a newer version driver pack for your model. (21H1)

Hi @HermanGB,

Thank you for the reply and apologies in the slow reply.

We have tried both, and get the same issue. Also, the driver packs (according to HP) are the same for 20H2 and 21H2)

Thanks

kuraimistral commented 2 years ago

Hey @sjnett01 , did you ever find out what the problem was? We are having the similar issue. Also we have only HP devices. Starting to think its an ADK problem but not sure either tbh.

sjnett01 commented 1 year ago

Apologies for the late reply, i never found a solution to this and the issue persists, any one able to help??

kuraimistral commented 1 year ago

@sjnett01 my problem was, that i choose 7zip. But in order to use that function you had to copy the 7z.exe that was compiled so that it can run in winpe i think. It's somewhere in the manual.. nevertheless i changed to normal zip and it worked.

sjnett01 commented 1 year ago

Im not using ZIp/7Zip at all, this is purely when trying to inject the drivers

sjnett01 commented 1 year ago

Also, i am "imaging" as a thin image, IE, i extracted the ISO from MS VLSC and created and OS Image in SCCM that i am using, NOT a captured reference image.

If i look at the folders on the %OSPART% drive the Windows folder is not created until AFTER the Setup Windows & Configuration manager step.

Perhaps this is why it can't install the drivers to the image?

Anyone have any thoughts or workarounds for this?? (No we do not want to capture an image, as this way it is a LOT easier to change when MS release a new OS)

sjnett01 commented 1 year ago

Anyone able to help???? :(

HermanGB commented 1 year ago

Hi,

I cannot see "Downloaded driver package content contains a compressed archive with driver content" in your ApplyDriverPackage.log.

Please make sure you are compressing your packages in WIM format. image This is one of the main advantages with Modern Driver Management. See this link for more information: https://www.deploymentresearch.com/speed-up-driver-package-downloads-for-configmgr-osd/

Get the latest wim from VLSC. Make sure your 64-bit WinPE image is up to date with the latest ADK. Get the latest driverpackage from vendor and recreate your driverpackages and compress them as WIM.

sjnett01 commented 1 year ago

Hi,

I cannot see "Downloaded driver package content contains a compressed archive with driver content" in your ApplyDriverPackage.log.

Please make sure you are compressing your packages in WIM format. image This is one of the main advantages with Modern Driver Management. See this link for more information: https://www.deploymentresearch.com/speed-up-driver-package-downloads-for-configmgr-osd/

Get the latest wim from VLSC. Make sure your 64-bit WinPE image is up to date with the latest ADK. Get the latest driverpackage from vendor and recreate your driverpackages and compress them as WIM.

Hi Herman,

I have done the above, and still getting issues.

2023-06-01 12:49:13, Info DISM DISM.EXE: 2023-06-01 12:49:13, Info DISM DISM.EXE: <----- Starting Dism.exe session -----> 2023-06-01 12:49:13, Info DISM DISM.EXE: 2023-06-01 12:49:13, Info DISM DISM.EXE: Host machine information: OS Version=10.0.22000, Running architecture=amd64, Number of processors=20 2023-06-01 12:49:13, Info DISM DISM.EXE: Dism.exe version: 10.0.22000.1 2023-06-01 12:49:13, Info DISM DISM.EXE: Executing command line: "X:\WINDOWS\system32\Dism.exe" /Image:C:\ /Add-Driver /Driver:C:\_SMSTaskSequence\DriverPackage\GRY00326 /Recurse 2023-06-01 12:49:13, Info DISM DISM FFU Provider: PID=2536 TID=2540 [C:\] is not recognized by the DISM FFU provider. - CFfuImage::Initialize 2023-06-01 12:49:13, Info DISM DISM Imaging Provider: PID=2536 TID=2540 The provider FfuManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage 2023-06-01 12:49:13, Info DISM DISM VHD Provider: PID=2536 TID=2540 [C:\] is not recognized by the DISM VHD provider. - CVhdImage::Initialize 2023-06-01 12:49:13, Info DISM DISM Imaging Provider: PID=2536 TID=2540 The provider VHDManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage [2536.2540] [0x8007007b] FIOReadFileIntoBuffer:(1456): The filename, directory name, or volume label syntax is incorrect. [2536.2540] [0xc142011c] UnmarshallImageHandleFromDirectory:(641) [2536.2540] [0xc142011c] WIMGetMountedImageHandle:(2910) 2023-06-01 12:49:13, Info DISM DISM WIM Provider: PID=2536 TID=2540 [C:\] is not a WIM mount point. - CWimMountedImageInfo::Initialize 2023-06-01 12:49:13, Info DISM DISM Imaging Provider: PID=2536 TID=2540 The provider WimManager does not support CreateDismImage on C:\ - CGenericImagingManager::CreateDismImage 2023-06-01 12:49:13, Info DISM DISM Imaging Provider: PID=2536 TID=2540 No imaging provider supported CreateDismImage for this path - CGenericImagingManager::CreateDismImage [2536.2540] [0x8007007b] FIOReadFileIntoBuffer:(1456): The filename, directory name, or volume label syntax is incorrect. [2536.2540] [0xc142011c] UnmarshallImageHandleFromDirectory:(641) [2536.2540] [0xc142011c] WIMGetMountedImageHandle:(2910)

HermanGB commented 1 year ago

Can you check if this is the case with you too?

Figured it out. I was using apply OS from an original installation source instead of apply from a captured image. Doing it this way meant that the Windows directory was not present until after the Setup Windows and Config Mgr step, but I need to deploy in PE and cant stop it from restarting. I extracted the WIM from my ISO and changed to apply from an image and now its working!

https://www.reddit.com/r/SCCM/comments/wai9ae/dism_unable_to_access_the_image_mdm/

sjnett01 commented 1 year ago

Can you check if this is the case with you too?

Figured it out. I was using apply OS from an original installation source instead of apply from a captured image. Doing it this way meant that the Windows directory was not present until after the Setup Windows and Config Mgr step, but I need to deploy in PE and cant stop it from restarting. I extracted the WIM from my ISO and changed to apply from an image and now its working!

https://www.reddit.com/r/SCCM/comments/wai9ae/dism_unable_to_access_the_image_mdm/

i was using the ISO extracted, so i have just added the WIM now, i will test and let you know.

sjnett01 commented 1 year ago

Thanks for your help Herman, that looks a lot better on one of my tests, just waiting for my team to be able to do more tests Next week.

It may be worth updating the documentation to explain that it needs to use the Captured Imaged to the install.wim from the ISO as this isn't specified as far as i can see. This will need to be added in the Operating Systems in MEMC