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

前端 未结 2 689
执念已碎
执念已碎 2020-12-07 20:19

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 comp

相关标签:
2条回答
  • 2020-12-07 21:07

    corflags.exe comes with the Windows SDK, not .NET.

    corflags.exe needs to run only once against the target service exe. Then the service will run in 32-bit mode thereafter.

    Note the argument needed is /32bitreq+ or /32bitpref+ .

    corflags.exe /32bitreq+ myservice.exe

    0 讨论(0)
  • 2020-12-07 21:17

    Maybe the .NET tool corflags will help:

    corflags /32bit+ myservice.exe

    0 讨论(0)
提交回复
热议问题