Freigeben über


Forcing an executable to run in 32bit mode

Since i am not a OS expert I would normally not write about this, but i was trying to run the BizTalk Documenter tool and always got startup errors.

The customer environment is:

  • BizTalk 2006 R2 SP1 64 bits
  • Windows 2003 server R2 64Bits
  • SQL Server 2005 SP3 64 Bits

 

In my case the error was due that it seems Documenter Tool it is not able to run on 64bits on the detailed environment. So how literally force the tool to run on 32 bit mode?

Just running a tool called CorFlags.exe

 

Syntax

corflags.exe Microsoft.Services.Tools.BiztalkDocumenter.exe /force /32BIT+

 

Great… but  I do not see the tool, where is it?

As far as i know it is installed by:

  • Microsoft Windows 200X SDK   (C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64>)  (note: this path is from a Windows 7 SDK)
  • Visual Studio 2005 and above  (C:\Program Files\Microsoft Visual Studio\SDK\v 2.0\Bin)

 

First time i have run , it fails  :-(

if you got an error like this:

corflags : error CF001 : Could not open file for writing,

Can be solved by granting access to the user running the tool in the path where the BizTalk docuementer tool is installed

note: (in my case i have added everyone, full control,  and after running the tool i have restored the permissions again)

 

Great… but… Second time i have run, i got a warning message  :-(

corflags : warning CF011 : The specified file is strong name signed.  Using /For
ce will invalidate the signature of this image and will require the assembly to
be resigned.

Nothing to be worried about :-) In my case has worked fine

 

So Finally…

Run the tool, and it just simply works as a 32 bit mode application  ;-)

take a look:

image

 

in fact, before doing anything, i have executed the corflags tool  like this:

corflags.exe Microsoft.Services.Tools.BiztalkDocumenter.exe  (as you can see, with no parameters) and i got:

 

Version   : v2.0.50727
CLR Header: 2.5
PE        : PE32
CorFlags  : 9
ILONLY    : 1
32BIT : 0
Signed    : 1

 

After running with /Force and /32bit+ parameters i got:

 

Version   : v2.0.50727
CLR Header: 2.5
PE        : PE32
CorFlags  : 9
ILONLY    : 1
32BIT : 1
Signed    : 1

 

Enjoy!  :-)

Comments

  • Anonymous
    January 02, 2012
    Worked like a charm for usercontrolTestContainer as well.Nice work
  • Anonymous
    May 20, 2016
    I got the same error "The specified file is strong name signed. Using /Force will invalidate the signature of this image and will require the assembly to be resigned." Only after going through your blog i went ahead and used the /force option. It worked in my case as well.Thanks