Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

I am trying to install services during a wix installer.

The service itself will install with no issues using the SC command, however, when I use the ServiceInstall node as follows :-
XML
<Component Id="SCHEDULER_SOURCE_09" DiskId="1" KeyPath="yes" Guid="81FF8979-5827-4556-A22C-FAE6EFDFC159">
<File Id="TRAMCountersService.exe" Source="$(var.Root)\Scheduler\TRAMCountersService.exe"/>
<ServiceInstall Name="Test" Id="Test" ErrorControl="normal" Type="ownProcess" Start="auto"/>
</Component>

When the installer runs, no service is installed and the log shows the following.
Action 14:42:19: InstallServices. Installing new services
Action start 14:42:19: InstallServices.
Action ended 14:42:19: InstallServices. Return value 1.

Does anybody have any pointers or suggestions?

Thanks to all
Posted
Updated 6-Jan-16 4:43am
v3
Comments
Richard Deeming 6-Jan-16 10:56am    
Shouldn't the KeyPath attribute be set on the File element, not the Component element?

1 solution

you must have KeyPath="yes" on File element and also you should have ServiceControl element as childe of Component to Start/stop and uninstall service.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900