问题
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>
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?
Thank you
回答1:
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.
来源:https://stackoverflow.com/questions/17785669/wix-install-windows-service-to-run-in-x64-mode