Windows SIM is failing to open a .wim with a System.BadImageFormatException
I might have just hit this error.
I was still on Windows 10 1809, but installed the Windows 10 1903 ADK.
Once I removed the 1903 ADK then installed 1809's ADK, install.wim was successfully cataloged.
Related videos on Youtube
Catachan
I am just a guy who hammers away on a keyboard occasionally to do things for fun.
Updated on September 18, 2022Comments
-
Catachan almost 2 years
I'm trying to validate my Answer file using Windows System Image Manager. To do this, I need to open the Install.wim off of the .iso provided by my vendor, however when I try to open both the x64 and x86 versions of the install.wim, I get the same error. I've included the error dialog and the text from the log file below.
Windows System Image Manager
Windows SIM was unable to generate a catalog. For troubleshooting assistance, see the topic: 'Windows System Image Manager Technical Reference' in the Windows ADK User's Guide.
Details: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformImplementation, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.
[Click to see an image of Windows System Image Manager Error Dialog]
14:40 : 14:40 : Windows SIM was unable to generate a catalog. For troubleshooting assistance, see the topic: 'Windows System Image Manager Technical Reference' in the Windows ADK User's Guide. 14:40 : 14:40 : System.BadImageFormatException: Could not load file or assembly 'Microsoft.ComponentStudio.ComponentPlatformImplementation, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Microsoft.ComponentStudio.ComponentPlatformImplementation, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' Server stack trace: at Microsoft.ComponentStudio.ComponentPlatformInterface.Cpi.CreateOfflineImageInstance(OfflineImageInfo imageInfo) at Microsoft.ComponentStudio.ComponentPlatformInterface.OfflineImageCatalog.Serialize(OfflineImageInfo imageInfo) at Microsoft.ComponentStudio.ComponentPlatformInterface.OfflineImageInfo.CreateCatalog() at Microsoft.ComponentStudio.ComponentPlatformInterface.CatalogCreatorImpl.CreateCatalog(OfflineImageInfo offlineImageInfo) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.ComponentStudio.ComponentPlatformInterface.ICatalogCreator.CreateCatalog(OfflineImageInfo offlineImageInfo) at Microsoft.ComponentStudio.CatalogGenerator.CreateCat(ProgressDialog pd, Object o) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Can anyone help me figure this out?
-
JW0914 about 5 years
An attempt was made to load a program with an incorrect format.
This is indicative of a problem with the WIM file. Are you certain it was a WIM file and not an ESD file? If it was the latter, convert it to WIM withDISM
. Otherwise, verify the images contained within the WIM:DISM /get-wiminfo /wimfile:z:\install.wim
(for index info, add/index:<#>
). Outside of that, I'm not sure how to troubleshoot, as it's an issue with the image, other than using a different image if unable to determine what the issue is with the image. -
Catachan about 5 yearsThe extension on the install.wim is ".wim" can an esd file have a .wim extension? I've also already used the install.wim to install a base image on a device, and it is working there.
-
JW0914 about 5 yearsNo, an ESD file is a different image format that utilizes a compression algorithm that's ~33% more efficient than WIM's (ESD from Windows 10 forward is only allowed on WIMboot and one other type of image). IIRC from when I had a similar issue a few years back, the
install.wim
is missing a file from it's Windows directory. This was a common issue with most of the Windows 8 & 8.1 images, but I can't recall what file it was that needed to be added. -
Catachan about 5 yearsAny chance you remember how you figured out the missing file? I can go off on the google hunt myself, but if you have any suggestions for search starting points, I'd greatly appreciate it.
-
JW0914 about 5 yearsI'm sorry, I don't... I looked through my bookmarks before posting my previous reply, as I was hoping I had bookmarked it, but it appears I either did not, or I deleted it once I upgraded to Windows 10 years ago.
-
Catachan about 5 yearsThat's okay, I appreciate the clue!
-
Daniel B about 5 years
BadImageFormatException
actually is totally unrelated to the WIM file. The “image” refers to a DLL the application is trying to load. It means the installation of SIM or Windows itself is somehow corrupted.
-
-
trindflo about 5 yearsAlso found I needed to install the ADK on a 32-bit version of Windows 10 if I want to configure a 32-bit target installation.