I'm having trouble calling the Microsoft Cabinet Maker utility (makecab) from a batch script on a Windows Server 2003 server. The batch script is being run by Hudson (continuous integration service) installed as a windows service on the machine.
The hudson.exe
(64-bit) process spawns a java.exe
(32-bit) process, which spawns a cmd.exe
(32-bit) process, which spawns a makecab.exe
(32-bit) process. Makecab then produces an error:
D:\Hudson\jobs\Testing\workspace>C:\WINDOWS\system32\makecab.exe /F "D:\Build\2.3.278.40859.cab.df"
Microsoft (R) Cabinet Maker - Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved..
Parsing directives
Parsing directives (D:\Build\2.3.278.40859.cab.df: 1 lines)
D:\Build\2.3.278.40859.cab.df(12): ERROR:
However if I open a remote desktop connection to the server and open a command prompt window and run makecab it works perfectly. But I've noticed that running cmd.exe from Start > Run spawns a 64-bit process, which then runs a 64-bit makecab process.
Can anyone explain why the 32-bit makecab might be throwing an error? The executable exists in both C:\WINDOWS\system32
and C:\WINDOWS\SysWOW64
.
Is there any way, from within the 32-bit cmd.exe
batch script that java.exe
spawns and runs, to run the 64-bit version of makecab.exe
(other than copying the physical executable from C:\WINDOWS\system32
to C:\WINDOWS\SysWOW64
)?
Thanks