When you create a Windwows Service, you end up with a .exe file that you need to register, and you start it from the "Services" snap-in.
If you try to execute this .exe file, you get the message: "Cannot start service from the command line or debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command."
Is it somehow possible to set something in the service so that when run as a regular .exe, instead of displaying this message, it'll do something we can control in code? (Like run a Sub Main(), or something like that, that'd obviously be a different entry point than the one you get when you start it as a services)
Thanks!
Daniel