Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

DISM to service Server 2008 WIM?

- - - - -

  • Please log in to reply
7 replies to this topic

#1
pacardon

pacardon

    Newbie

  • Member
  • 11 posts
  • Joined 18-August 05
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:\WIM

then I tried to apply my folder of updates:
dism /Image:c:\wim /Add-Package /PackagePath:C:\updates

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385


Error: 2

An 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.log

Output 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=2
2012-03-30 07:57:23, Info                  DISM   DISM.EXE: Executing command line: dism  /Image:c:\wim /Add-Package /PackagePath:C:\updates
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::GetProviderCollection
2012-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_GetProvider
2012-03-30 07:57:23, Info                  DISM   DISM Provider Store: PID=3500 Loading Provider from location C:\Windows\System32\Dism\WimProvider.dll - CDISMProviderStore::Internal_GetProvider
2012-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_LoadProvider
2012-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_GetProvider
2012-03-30 07:57:23, Info                  DISM   DISM Provider Store: PID=3500 Loading Provider from location C:\Windows\System32\Dism\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider
2012-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_LoadProvider
2012-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_GetProvider
2012-03-30 07:57:23, Info                  DISM   DISM Provider Store: PID=3500 Loading Provider from location C:\Windows\System32\Dism\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider
2012-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_LoadProvider
2012-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: WimManager
2012-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: FolderManager
2012-03-30 07:57:23, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2012-03-30 07:57:23, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2012-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::GetProviderCollection
2012-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_FOUND
2012-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_SUCCESS
2012-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.exe
2012-03-30 07:57:24, Info                  DISM   DISM Provider Store: PID=3500 Getting Provider Compatibility Manager - CDISMProviderStore::GetProvider
2012-03-30 07:57:24, Info                  DISM   DISM Provider Store: PID=3500 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
2012-03-30 07:57:24, Info                  DISM   Compatibility Manager: PID=3500 Processing the top level command token(add-package). - CCbsCliParser::Private_ValidateCmdLine
2012-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::InternalExecuteCommand
2012-03-30 07:57:34, Info                  DISM   Compatibility Manager: PID=3500 PackageManager return code = 0x2 - CCompatManager::InternalExecuteCommand
2012-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_OnDisconnect
2012-03-30 07:57:34, Info                  DISM   DISM Provider Store: PID=3500 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
2012-03-30 07:57:34, Info                  DISM   DISM Provider Store: PID=3500 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
2012-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_OnDisconnect
2012-03-30 07:57:34, Info                  DISM   DISM Provider Store: PID=3500 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
2012-03-30 07:57:34, Info                  DISM   DISM Provider Store: PID=3500 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider

I'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?


How to remove advertisement from MSFN

#2
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,027 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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.
Posted Image

#3
pacardon

pacardon

    Newbie

  • Member
  • 11 posts
  • Joined 18-August 05
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.msu

Output:
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385


Error: 87

An 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.log



Log 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=2
2012-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.msu
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::GetProviderCollection
2012-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_GetProvider
2012-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_GetProvider
2012-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_LoadProvider
2012-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_GetProvider
2012-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_GetProvider
2012-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_LoadProvider
2012-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_GetProvider
2012-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_GetProvider
2012-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_LoadProvider
2012-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: WimManager
2012-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: FolderManager
2012-03-30 10:01:44, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2012-03-30 10:01:44, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2012-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::GetProviderCollection
2012-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_FOUND
2012-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_SUCCESS
2012-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.exe
2012-03-30 10:01:45, Info                  DISM   DISM Provider Store: PID=16468 Getting Provider Compatibility Manager - CDISMProviderStore::GetProvider
2012-03-30 10:01:45, Info                  DISM   DISM Provider Store: PID=16468 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
2012-03-30 10:01:45, Info                  DISM   Compatibility Manager: PID=16468 Processing the top level command token(add-package). - CCbsCliParser::Private_ValidateCmdLine
2012-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::InternalExecuteCommand
2012-03-30 10:01:50, Info                  DISM   Compatibility Manager: PID=16468 PackageManager return code = 0x57 - CCompatManager::InternalExecuteCommand
2012-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_OnDisconnect
2012-03-30 10:01:50, Info                  DISM   DISM Provider Store: PID=16468 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
2012-03-30 10:01:50, Info                  DISM   DISM Provider Store: PID=16468 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
2012-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_OnDisconnect
2012-03-30 10:01:50, Info                  DISM   DISM Provider Store: PID=16468 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
2012-03-30 10:01:50, Info                  DISM   DISM Provider Store: PID=16468 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider

Edited by pacardon, 30 March 2012 - 11:23 AM.


#4
leen2

leen2

    Member

  • Member
  • 44 posts
  • Joined 17-June 08
  • OS:Windows 7 x64
  • Country: Country Flag
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.

#5
pacardon

pacardon

    Newbie

  • Member
  • 11 posts
  • Joined 18-August 05
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 files
2. 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 by pacardon, 30 March 2012 - 12:28 PM.


#6
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
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 :).
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#7
pacardon

pacardon

    Newbie

  • Member
  • 11 posts
  • Joined 18-August 05
Got some Microsoft support on this issue. The solution is exactly as I thought it was:

1. Install Server 2008
2. Capture to a WDS server running the latest WDS/WAIK
3. 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 by pacardon, 03 April 2012 - 10:41 AM.


#8
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,814 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Try using the newest DISM in the Windows 8 ADK. :unsure:
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN