BVLog Bryan Voss’ mental synchronization point

28Jun/100

Creating/deleting Windows services

I always have to look the procedure up when I need to create/delete a Windows service, so here it is for posterity.

Create service (note the space after binPath=):
sc create "[service name]" binPath= "[path to executable]"

Delete service:
sc delete "[service name]"

<rant>
And as long as we're on the subject, I really wish our "enterprise" software vendors would stop setting things up to run as Windows console apps when all they do is display a logfile in a window. If the app has the ability to run as a service, run it as a service. I can tail a logfile to debug issues, even if your support people don't know how to do that.

Running apps on the console tends to cause problems if people login via RDP. I can either:

  1. Explain to people that they have to login via RDP using a particular account with an obscure password in order to restart an app, making sure to include a "/console" after mstsc on the commandline.
  2. Tell them to login using their own account, double-click the Services icon on the desktop, right-click the app on the list and click Start.

Hmm. I think I prefer option 2.
</rant>

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.