views:

2322

answers:

4

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?

A: 

Well, why not just compile the service as a 32-bit service?

Dave Markle
because I don't have the source. I've just got an .exe.
Steve Cooper
If it's .Net, have you tried to decompile the exe and then recompile it in 32-bit?
Loïc Wolff
+8  A: 

Maybe this is an option:

Running NET Apps in 32 bit mode on 64bit Windows

Colin
thanks -- this is the right answer. Thomas Freudenberg also gave the right answers, and unfortunately I can't mark both as the accepted answer. Apologies for that, but I have upvoted you.
Steve Cooper
+11  A: 

Maybe the .NET tool corflags will help:

corflags /32bit+ myservice.exe

Thomas Freudenberg
wow. who knew such evil magic existed?
Dave Markle
+1 for the great answer, but the options come last:Usage: Corflags.exe Assembly [options]
BQ
@BQ it works both ways
Thomas Freudenberg
A: 

Is there any way to force a service develped in visual basic 6 to start in 32-bit mode on a win64 machine?

I believe the corflags tool works only for a .NET service.

Thanks Dietmar

Dietmar
Hi -- this is a question, not an anwer. Start a new question.
Steve Cooper