Forcing a .Net Windows service to run as 32-bit on a 64-bit machine

Steve Cooper picture Steve Cooper · Jul 3, 2009 · Viewed 29.8k times · Source

I've been given a windows service which references a COM component that only runs on 32-bit. My machine is x64, so the service tries to start, fails to create the COM component, and dies.

I don't have the source, just the .exe file. Is there any way to force a service to start in 32-bit mode on a win64 machine?

Answer

Thomas Freudenberg picture Thomas Freudenberg · Jul 3, 2009

Maybe the .NET tool corflags will help:

corflags /32bit+ myservice.exe