Why is my 64 bit service running as 32 bit?

拥有回忆 提交于 2019-12-04 08:27:16

I had this issue when a previous version of the service had been 32 bit. I knew the currently installed one wasn't (checked CORFLAGS), but the process associated with the service was being created as 32 bit anyway, and for the life of me I couldn't work out why.

After a reboot the problem went away. I wonder if the Service Control Manager 'remembers' the bitness for each service, as a startup optimization (or something).

Maybe your installation tool is using 32 bit installutil to install the process? As I understand from this article

using 32 bit installutil results in forcing the executable to run as 32 bit in a 64 bit OS.

This part of the article in particular seems to say so:

To get around this problem, please run installutil.exe outside of the appropriate Framework/Framework64 directory. If you have a snap-in built for ILONLY (ILONLY indicates that the executable contains pure IL code and can run either as 32-bit or as a 64-bit process), but want to register it under the wow64 hive, use installutil.exe that is available in the directory %windir%\microsoft.net\framework\v2.n.n.n. For the 64-bit hive registration, run installutil.exe from the directory %windir%\microsoft.net\framework64\v2.n.n.n.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!