I'm trying to build a Windows Embedded Standard 2009 image, following a process written for creating an XP Embedded SP2 image with adjustments where necessary. When executing the XPECMD.wsf
script (c:\Program Files (x86)\Windows Embedded\bin\xpecmd.wsf
) using the cscript
command, I get the following error:
c:\Program Files (x86)\Windows Embedded\bin\xpecmd.wsf(3405, 15) WScript.CreateObject: Could not create object named "CMI.CMI".
CMI is the Component Manager Interface, and the XPECMD.wsf script that contains that line is, I think, delivered with the Windows Embedded Std 2009 tools, so I don't think the problem is that Win Embedded Std obsoleted it. EDIT: In fact, apparently the whole point of XPECMD is to provide a scriptable interface to the CMI: http://msdn.microsoft.com/en-us/library/aa940741(v=winembedded.5).aspx
I have no idea what's causing this, I don't see any similar errors in google searches or elsewhere, and I don't even really know if this is an appropriate StackOverflow question, but I'm mystified, so if anyone can offer some suggestions, I'd appreciate it greatly.
I found the answer here: http://social.msdn.microsoft.com/Forums/en-US/79c59599-373d-4062-9900-55477429e759/help-error-component-manager-interface-cmi
The XPECMD
script must be run with the 32-bit version of cscript.exe
, which is found in %windir%\SysWoW64
rather than %windir%\system32
. This can be done either by using the WoW64 version of cmd.exe
to launch cscript
or by explicitly calling %windir%\SysWoW6\cscript.exe
.