I have a .Net application, written in C#. The application has been compiled with the "any" flag, allowing it to run as both 64 and 32 bits, depending on the OS that it's deployed on.

I'm wondering if it's possible to force the application to run as a 32 bit application, on a 64 bit version of windows (any 64 bit version of windows).

link|improve this question

77% accept rate
feedback

1 Answer

up vote 2 down vote accepted

Yup, use CorFlags to set the 32BIT flag on the executable. E.g:

corflags.exe myapp.exe /32BIT+

This will modify your exe, so you might wanna keep a backup just in case. You can also revert the flag using /32BIT- instead of /32BIT+

link|improve this answer
Just for the sake of completeness: That will actually modify myapp.exe, so keep a backup around if you want it to run in 64-Bit at some point. – Michael Stum Sep 24 '09 at 20:23
yup, I'll add that to the answer, thanks – Mauricio Scheffer Sep 24 '09 at 20:26
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.