pacardon Posted March 30, 2012 Posted March 30, 2012 Having quite the issue with applying updates to a Server 2008 WIM file.I've copied my Server 2008 install disk to a Windows 7 Machine, I've also installed WAIK on this computer.First I mounted my wim: dism /Mount-Wim /WimFile:C:\2008\Sources\install.wim /name:"Windows Longhorn SERVERSTANDARD" /MountDir:C:\WIMthen I tried to apply my folder of updates:dism /Image:c:\wim /Add-Package /PackagePath:C:\updatesDeployment Image Servicing and Management toolVersion: 6.1.7600.16385Error: 2An error occurred while processing the command.For more information, review the log files.The DISM log file can be found at C:\Windows\Logs\DISM\dism.logOutput from the log file:2012-03-30 07:57:23, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->2012-03-30 07:57:23, Info DISM DISM.EXE: 2012-03-30 07:57:23, Info DISM DISM.EXE: Host machine information: OS Version=6.1.7601, Running architecture=x86, Number of processors=22012-03-30 07:57:23, Info DISM DISM.EXE: Executing command line: dism /Image:c:\wim /Add-Package /PackagePath:C:\updates2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Provider has not previously been encountered. Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Loading Provider from location C:\Windows\System32\Dism\WimProvider.dll - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Connecting to the provider located at C:\Windows\System32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Provider has not previously been encountered. Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Loading Provider from location C:\Windows\System32\Dism\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Connecting to the provider located at C:\Windows\System32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Provider has not previously been encountered. Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Loading Provider from location C:\Windows\System32\Dism\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Connecting to the provider located at C:\Windows\System32\Dism\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider2012-03-30 07:57:23, Info DISM DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.2012-03-30 07:57:23, Info DISM DISM.EXE: Attempting to add the commands from provider: WimManager2012-03-30 07:57:23, Info DISM DISM.EXE: Succesfully registered commands for the provider: WimManager.2012-03-30 07:57:23, Info DISM DISM.EXE: Attempting to add the commands from provider: FolderManager2012-03-30 07:57:23, Info DISM DISM.EXE: Attempting to add the commands from provider: DISM Log Provider2012-03-30 07:57:23, Info DISM DISM.EXE: Attempting to add the commands from provider: Compatibility Manager2012-03-30 07:57:23, Info DISM DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.2012-03-30 07:57:23, Info DISM DISM Provider Store: PID=3500 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection2012-03-30 07:57:24, Info CSI 00000001 Shim considered [l:260{130}]"\??\c:\wim\Windows\Servicing\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe" : got STATUS_OBJECT_PATH_NOT_FOUND2012-03-30 07:57:24, Info CSI 00000002 Shim considered [l:254{127}]"\??\c:\wim\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe" : got STATUS_SUCCESS2012-03-30 07:57:24, Info DISM DISM.EXE: The target image version is: 6.0.6002.18005.2012-03-30 07:57:24, Info DISM DISM.EXE: The target image is downlevel and considered supported. Looking for PkgMgr.exe.2012-03-30 07:57:24, Info DISM DISM.EXE: Executing DISM against a downlevel image. Calling c:\wim\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe2012-03-30 07:57:24, Info DISM DISM Provider Store: PID=3500 Getting Provider Compatibility Manager - CDISMProviderStore::GetProvider2012-03-30 07:57:24, Info DISM DISM Provider Store: PID=3500 Provider has previously been initialized. Returning the existing instance. - CDISMProviderStore::Internal_GetProvider2012-03-30 07:57:24, Info DISM Compatibility Manager: PID=3500 Processing the top level command token(add-package). - CCbsCliParser::Private_ValidateCmdLine2012-03-30 07:57:24, Info DISM Compatibility Manager: PID=3500 PackageManager command is being executed: c:\wim\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe /l:"C:\Windows\Logs\DISM\dism.log.pkgmgr" /o:"c:\wim;c:\wim\Windows" /ip /m:"C:\updates" /s:"C:\Users\ADMINI~1\AppData\Local\Temp\0618634A-3828-480D-9D3D-222AECC0FE44" - CCompatManager::InternalExecuteCommand2012-03-30 07:57:34, Info DISM Compatibility Manager: PID=3500 PackageManager return code = 0x2 - CCompatManager::InternalExecuteCommand2012-03-30 07:57:34, Error DISM Compatibility Manager: PID=3500 d:\w7rtm\base\ntsetup\opktools\dism\providers\compatprovider\dll\compatmanager.cpp:970 - CCompatManager::ProcessPackageList(hr:0x80070002)2012-03-30 07:57:34, Error DISM Compatibility Manager: PID=3500 d:\w7rtm\base\ntsetup\opktools\dism\providers\compatprovider\dll\compatmanager.cpp:589 - CCompatManager::CompatExecuteCmdLine(hr:0x80070002)2012-03-30 07:57:34, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.2012-03-30 07:57:34, Info DISM DISM.EXE: 2012-03-30 07:57:34, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->2012-03-30 07:57:34, Info DISM DISM.EXE: 2012-03-30 07:57:34, Info DISM DISM Image Session: PID=3500 Disconnecting the provider store - CDISMImageSession::Final_OnDisconnect2012-03-30 07:57:34, Info DISM DISM Provider Store: PID=3500 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider2012-03-30 07:57:34, Info DISM DISM Provider Store: PID=3500 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider2012-03-30 07:57:34, Info DISM DISM Provider Store: PID=3500 Found the OSServices. Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect2012-03-30 07:57:34, Info DISM DISM Provider Store: PID=3500 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider2012-03-30 07:57:34, Info DISM DISM Provider Store: PID=3500 Releasing the local reference to DISMLogger. Stop logging. - CDISMProviderStore::Internal_DisconnectProviderI'm not sure why its failing, I get error code 2, but I'm not sure why. I've scoured this forum and google with no helpful results.What am I doing wrong?
MagicAndre1981 Posted March 30, 2012 Posted March 30, 2012 point to a MSU file, not a folder.But I tried it with Vista and it also failed, although WAIK docu says DISM wotks for Vista/Server 2008 WIMs.
pacardon Posted March 30, 2012 Author Posted March 30, 2012 (edited) That was the first thing I thought and that as well right after I posted:dism /Image:c:\WIM /Add-Package /PackagePath:C:\updates\Windows6.0-KB2588516-x86.msuOutput:Deployment Image Servicing and Management toolVersion: 6.1.7600.16385Error: 87An error occurred while processing the command.For more information, review the log files.The DISM log file can be found at C:\Windows\Logs\DISM\dism.logLog scrapings from my 2008 server using dism from waik, got the same error there:2012-03-30 10:01:44, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->2012-03-30 10:01:44, Info DISM DISM.EXE: 2012-03-30 10:01:44, Info DISM DISM.EXE: Host machine information: OS Version=6.0.6002, Running architecture=x86, Number of processors=22012-03-30 10:01:44, Info DISM DISM.EXE: Executing command line: dism /Image:c:\tempcd /Add-Package /PackagePath:C:\update\Windows6.0-KB2588516-x86.msu2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Provider has not previously been encountered. Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Loading Provider from location C:\Program Files\Windows AIK\Tools\x86\Servicing\WimProvider.dll - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Connecting to the provider located at C:\Program Files\Windows AIK\Tools\x86\Servicing\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Provider has not previously been encountered. Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Loading Provider from location C:\Program Files\Windows AIK\Tools\x86\Servicing\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Connecting to the provider located at C:\Program Files\Windows AIK\Tools\x86\Servicing\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Provider has not previously been encountered. Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Loading Provider from location C:\Program Files\Windows AIK\Tools\x86\Servicing\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Connecting to the provider located at C:\Program Files\Windows AIK\Tools\x86\Servicing\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider2012-03-30 10:01:44, Info DISM DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.2012-03-30 10:01:44, Info DISM DISM.EXE: Attempting to add the commands from provider: WimManager2012-03-30 10:01:44, Info DISM DISM.EXE: Succesfully registered commands for the provider: WimManager.2012-03-30 10:01:44, Info DISM DISM.EXE: Attempting to add the commands from provider: FolderManager2012-03-30 10:01:44, Info DISM DISM.EXE: Attempting to add the commands from provider: DISM Log Provider2012-03-30 10:01:44, Info DISM DISM.EXE: Attempting to add the commands from provider: Compatibility Manager2012-03-30 10:01:44, Info DISM DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.2012-03-30 10:01:44, Info DISM DISM Provider Store: PID=16468 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection2012-03-30 10:01:45, Info CSI 00000001 Shim considered [l:266{133}]"\??\c:\tempcd\Windows\Servicing\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe" : got STATUS_OBJECT_PATH_NOT_FOUND2012-03-30 10:01:45, Info CSI 00000002 Shim considered [l:260{130}]"\??\c:\tempcd\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe" : got STATUS_SUCCESS2012-03-30 10:01:45, Info DISM DISM.EXE: The target image version is: 6.0.6002.18005.2012-03-30 10:01:45, Info DISM DISM.EXE: The target image is downlevel and considered supported. Looking for PkgMgr.exe.2012-03-30 10:01:45, Info DISM DISM.EXE: Executing DISM against a downlevel image. Calling c:\tempcd\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe2012-03-30 10:01:45, Info DISM DISM Provider Store: PID=16468 Getting Provider Compatibility Manager - CDISMProviderStore::GetProvider2012-03-30 10:01:45, Info DISM DISM Provider Store: PID=16468 Provider has previously been initialized. Returning the existing instance. - CDISMProviderStore::Internal_GetProvider2012-03-30 10:01:45, Info DISM Compatibility Manager: PID=16468 Processing the top level command token(add-package). - CCbsCliParser::Private_ValidateCmdLine2012-03-30 10:01:45, Info DISM Compatibility Manager: PID=16468 PackageManager command is being executed: c:\tempcd\Windows\WinSxS\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.0.6002.18005_none_0b4ada54c46c45b0\pkgmgr.exe /l:"C:\Windows\Logs\DISM\dism.log.pkgmgr" /o:"c:\tempcd;c:\tempcd\Windows" /ip /m:"C:\update\Windows6.0-KB2588516-x86.msu" /s:"C:\Users\ADMINI~1\AppData\Local\Temp\FFA19293-66D8-4AAB-9339-A21C9C17479A" - CCompatManager::InternalExecuteCommand2012-03-30 10:01:50, Info DISM Compatibility Manager: PID=16468 PackageManager return code = 0x57 - CCompatManager::InternalExecuteCommand2012-03-30 10:01:50, Error DISM Compatibility Manager: PID=16468 d:\w7rtm\base\ntsetup\opktools\dism\providers\compatprovider\dll\compatmanager.cpp:970 - CCompatManager::ProcessPackageList(hr:0x80070057)2012-03-30 10:01:50, Error DISM Compatibility Manager: PID=16468 d:\w7rtm\base\ntsetup\opktools\dism\providers\compatprovider\dll\compatmanager.cpp:589 - CCompatManager::CompatExecuteCmdLine(hr:0x80070057)2012-03-30 10:01:50, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.2012-03-30 10:01:50, Info DISM DISM.EXE: 2012-03-30 10:01:50, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->2012-03-30 10:01:50, Info DISM DISM.EXE: 2012-03-30 10:01:50, Info DISM DISM Image Session: PID=16468 Disconnecting the provider store - CDISMImageSession::Final_OnDisconnect2012-03-30 10:01:50, Info DISM DISM Provider Store: PID=16468 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider2012-03-30 10:01:50, Info DISM DISM Provider Store: PID=16468 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider2012-03-30 10:01:50, Info DISM DISM Provider Store: PID=16468 Found the OSServices. Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect2012-03-30 10:01:50, Info DISM DISM Provider Store: PID=16468 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider2012-03-30 10:01:50, Info DISM DISM Provider Store: PID=16468 Releasing the local reference to DISMLogger. Stop logging. - CDISMProviderStore::Internal_DisconnectProvider Edited March 30, 2012 by pacardon
leen2 Posted March 30, 2012 Posted March 30, 2012 The original error you were getting was "0x80070002" = ERROR_FILE_NOT_FOUND. This is usually caused by a little known feature of DISM, that it is horribly case sensitive and treats C:\path... as different from c:\Path... even though Windows explorer and the command line see them as the same. Note, if copying and pasting text from a text editor, smart quotes are different characters than regular quotes, etc... and will generate the same error.So best advice is to locate the correct path in windows explorer and copy the entire path from the explorer bar as it is actually displayed. You can also copy it from the command line. This will copy the correct capitalization into the command.In the second post, error code "0x80070057" = "The parameter is incorrect", so something is incorrect in the command you are trying to execute.
pacardon Posted March 30, 2012 Author Posted March 30, 2012 (edited) Yikes. Reminds me of Linux where cd Home and cd home are two different directories. I'll give it a try and report my results. Thanks leen2!Interesting results:1. I can't seem to point DISM to a directory of cabs or msu files2. DISM refuses to accept an MSU file as a package using the /PackagePath command.3. I specifically have to tell it the cab to install. with /Add-Package /PackagePath:"C:\path\update.cab"On the bright side, at least it isn't imagex and pkgmgr... I was trying that as well and I do not like it at all.So I guess I have my answer. Just needed a nudge in the right direction. Thank you all!And giving back to the community... scripts I came up with:for /f "tokens=*" %%a in ('dir /b *.msu') do expand %%a -F:* C:\<TEMP CAB FILE FOLDER>imagex.exe /mountrw <WIM FILE> <INDEX> c:\<MOUNT FOLDER>cd /<TEMP CAB FILE FOLDER>for /f "tokens=*" %%b in ('dir /b *.xml') do start /w pkgmgr /n:"C:\cabs\%%b" /o:"C:\<MOUNT FOLDER>;c:\<MOUNT FOLDER>\windows" /l:c:\temp\insert.log(insert error checking)imagex /unmount /commit c:\<MOUNT FOLDER>Same thing with DISM:for /f "tokens=*" %%a in ('dir /b *.msu') do expand %%a -F:* C:\<TEMP CAB FILE FOLDER>dism /Mount-WIM /WimFile:<WIM FILE> <INDEX> /MountDir:C:\<MOUNT FOLDER>for /f "tokens=*" %%b in ('dir /b C:\<TEMP CAB FILE FOLDER>\*.cab') do dism /Image:c:\<MOUNT FOLDER> /Add-Package /PackagePath:C:\<TEMP CAB FILE FOLDER>\%%b(add error checking)dism /Unmount-WIM /MountDir:C:\<MOUNT FOLDER> /commit(Specifically for Vista/Server 2008 SP2 WIMs) Edited March 30, 2012 by pacardon
cluberti Posted March 30, 2012 Posted March 30, 2012 I've come across some other issues that the Win7 version of DISM has against a Vista or 2008 source - it's worth noting though, that DISM is just acting as a frontend for pkgmgr in this instance (you can see it in the logs), whereas on Win7 DISM does what pkgmgr did on Vista/2008. You'll notice in the log that the pkgmgr command line that is being passed contains /ip and /m, which means servicing a Vista or 2008 image via Win7's DISM cannot be pointed to a directory that doesn't already contain the requisite CAB and catalog files - ergo, the package you're trying to pass in cannot be an MSU package . That's the issue - you must manually expand the MSU file into it's CAB format before DISM on Win7 will be able to use those packages to service 2008 or Vista images (because of the options it chooses to pass to pkgmgr, which is actually doing the work).Your script handles this already, so it's probably a better option in the meantime .
pacardon Posted April 3, 2012 Author Posted April 3, 2012 (edited) Got some Microsoft support on this issue. The solution is exactly as I thought it was:1. Install Server 20082. Capture to a WDS server running the latest WDS/WAIK3. Use DISM on the image.But this ruins the point, I want to use original WIM image for software source integrity. Also makes the results much harder to reproduce. Edited April 3, 2012 by pacardon
Tripredacus Posted April 4, 2012 Posted April 4, 2012 Try using the newest DISM in the Windows 8 ADK.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now