Monday, June 15, 2009

Fix for building UBCD4Win on Vista / 7

I've found that UBCD4Win doesn't create proper ISOs when built from a Vista or Windows 7 host. The ISO is created but, when booted, throws all kinds of errors - mainly in the form of "X is not a valid Windows 32 binary." Here's a fix:

For UBCD4Win 3.50 on Windows 7 (build 7100) and presumably Vista (haven't tested).

The problem is due to a library call during infcache build. The version of setupapi.dll that comes with Vista / Windows 7 doesn't work with the version of infcachebuild included with Windows 7. The developer's site lists this as a non-issue as you just need an older version of setupapi.dll in the same directory as infcachebuild.exe. The problem is that UBCD4Win copies files to a temp location before trying the build meaning the dll won't be in the right place.

From an XP or 2k3 install image, find setupapi.dl_ in the i386 directory. Search for it if you don't see it there.

Expand it to your UBCD4Win location: expand setupapi.dl_ c:\UBCD4Win\setupapi.dll

Move this DLL to the proper directory in the UBCD4Win tree. Mine was at C:\UBCD4Win\plugin\AutoBuild\Files\. This should be the same location as infcachebuild.exe.

Here's the trick to get it to work: Modify the INF file located at (for me) C:\UBCD4Win\plugin\AutoBuild\autobuild_39_infcache.inf. In the [SourceDiskFiles] section, add the following line:

files\setupapi.dll=a,,1

This will tell UBCD4Win to copy that DLL over to the temp location with infcachebuild.exe which will allow infcachebuild to use the older DLL and function properly.

Note: This will probably all get wiped out if you upgrade your UBCD4Win version. Also, paths are all relative to my installation, ymmv.

Good luck building!

No comments:

Post a Comment