tags:

views:

21

answers:

1

I have to develop ATL app that is meant to run as service most the time, however we need to deploy it as user application in few environments

A: 

I believe that the answer is no, but I could easily be wrong - in either case however this probably isn't the approach I would take. Personally in your situation I would either:

  • Develop 2 apps, a service and a user application, or
  • Develop a console application and use the Windows Server 2003 resource kit to run it as a service.

See here for instructions on how to run any Application as a Windows service (I'm sure there are better guides out there, but I'm struggling to find them at the moment)

Kragen
What if I implement my own WinMain and run alternate run() loop for specific command line switch like "/app" or so?
grzegorz_p