0

I am new to WiX and I've been trying to use it to create a installer for a basic console application which just prints hello world in console and hangs there. My question is, can WiX be used to create windows service for any console application?

I know that it can be used to create service installer for windows service application.

i did create installer for windows service for the console application, and while installing i get

Service failed to start. Verify that you have sufficient privileges to start system services
Pritesh Acharya
  • 1,596
  • 5
  • 15
  • 36
  • What do you mean by 'create windows service for any console application'? – Morten Frederiksen Jul 09 '14 at 13:01
  • It's highly unlikely that a console application can be a service because it will be trying to create a console window, and running a console windows with the system account is very dubious, and it won't interact with the desktop. Console apps aren't windows services. – PhilDW Jul 09 '14 at 17:05

1 Answers1

0

Not directly. You need to use a helper (Service host wrapper) such as srvany.exe and then have WiX define a service for srvany. Service Control Manager will send a start command to the service which will start wrvany.exe and then srvany.exe will read an additional registry value to know what EXE to call. For more details see:

Wix installer to replace INSTSRV and SRVANY for user defined service installation

Community
  • 1
  • 1
Christopher Painter
  • 54,556
  • 6
  • 63
  • 100