WiX-安装Windows服务以在x64模式下运行 [英] WiX - install windows service to run in x64 mode

查看:138
本文介绍了WiX-安装Windows服务以在x64模式下运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WiX 3.5及其ServiceInstall标记安装Windows服务:

I'm installing a Windows Service using WiX 3.5 and its ServiceInstall tag:

<DirectoryRef Id="WindowsServiceContentDir">
        <Component Id="WindowsServiceExecutableComponent" Guid="*" Win64="yes">
            <File Source="$(var.WindowsServiceTargetDir)$(var.WindowsServiceTargetName).exe" KeyPath="yes" />

            <ServiceInstall Id="WindowsServiceInstall" Type="ownProcess" Start="auto" ErrorControl="normal" Vital="yes"
                            Name="[WIN_SERVICE_NAME]" DisplayName="Name"
                            Description="Name"
                            Account="[DENTITY_DOMAIN]\[IDENTITY_NAME]"
                            Password="[IDENTITY_PWD]">
            </ServiceInstall>


            <ServiceControl Id="WindowsServiceStop" Name="[WIN_SERVICE_NAME]" Stop="both" Remove="uninstall" Wait="yes" />
        </Component>
</DirectoryRef>

在64位计算机上安装后,尽管具有Win64 ="yes"属性,该服务仍以32位(x86)模式运行.在安装后以x64模式运行服务还需要做什么?

After installation on 64bit machine, the service is running in 32bit (x86) mode, despite the Win64="yes" attribute. What else need to be done to run service in x64 mode after installation?

谢谢

推荐答案

Type ="ownProcess"适用于win32进程,因此该服务以32位模式运行.也许您可以使用自定义操作代替ServiceInstall元素来安装服务.

Type="ownProcess" in service install is for win32 process hence the service is running in 32bit mode. Maybe you can use custom actions to install the service instead of ServiceInstall element.

这篇关于WiX-安装Windows服务以在x64模式下运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆