Prototype code for how to run an application as both a command prompt application and a windows service