My Azure role startup task is invoking a .cmd file:
<Startup>
<Task commandLine="startup.cmd" executionContext="elevated" taskType="simple"/>
</Startup>
The .cmd file contains invokation of regsvr32
:
//startup.cmd
regsvr32 PathToMyComServer\MyComServer.dll
for registering a 32-bit in-proc COM server.
Now on 64-bit systems there're two versions of regsvr32
- one in SysWOW64 folder for 32-bit COM servers and one in System32 folder for 64-bit COM servers. Of course only the matching version of regsvr32
can be used for any given in-proc COM server.
When I login onto my development Windows 2008 box and run regsvr32
from a command line the 64-bit version is invoked, but when my startup task runs - both in Compute Emulator and in the live cloud - the 32-bit version is invoked and properly registers my in-proc COM server. This puzzles me.
Why is 32-bit version of regsvr32
invoked in Azure startup task?