WIndows Service and Standalone

  • Thread starter Thread starter Jason Callas
  • Start date Start date
J

Jason Callas

I want a single executable to be able to run as a Windows Service or from
the command line.

Is there a way to do this? How can I tell where I am being started from so I
can know how to load myself?

Thanks,

Jason
 
Thanks Dan.

That is what I thought but was hoping for a way without the command line
args.

- Jason

Dan Kelley said:
Yes. Create a windows service project. Then in the ServiceBase, Sub Main
check for any command line args. You could use the args to determine how you
want your app to start. If you want it to run in command line mode, you
could use a windows form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top