Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows service support #18

Open
jordansissel opened this issue Mar 4, 2014 · 4 comments
Open

Windows service support #18

jordansissel opened this issue Mar 4, 2014 · 4 comments

Comments

@jordansissel
Copy link
Owner

No description provided.

@haf
Copy link

haf commented Mar 10, 2014

This one is finicky. You probably need a wrapper because Windows isn't file-based.

  1. Ensure wrapper available next to executable
  2. Generate xml
  3. rename winsw.exe -> myservice.exe
  4. myservice.exe install

@jordansissel
Copy link
Owner Author

You can use powershell (and batch, if you're crazy) to add new windows services. See Powershell's New-Service http://technet.microsoft.com/en-us/library/hh849830.aspx

Basically, get some credentials (Get-Credentials) and pass them to New-Service and boom you've got a service.

You can also do it with the older sc command, but powershell's interface is much nicer to work with, imo.

My idea here is that pleaserun for windows will create a powershell script to run that installs the service; powershell for reusability outside the host generating it ;)

@igalic
Copy link
Contributor

igalic commented Mar 10, 2014

is there no way to call the .Net API behind New-Service directly, rather than relying on Powershell as a mediator?

@jordansissel
Copy link
Owner Author

@igalic My thoughts on this were that pleaserun should output a thing you can install somewhere else.

So, if pleaserun can only be run on the system you are installing a service on, I think it misses a useful case where you could package a 'service'.

For example, we could package an init script or a systemd service configuration, so I think it makes sense to be able to provide a packagable windows service output, and that probably means a powershell script or something exportable to the host you want to run it on.

At least, that's my thinking, anyway.

A long-term project idea is to have a webapp that you can say "Make me a service configuration that does X" and it hands you a script to do it. If pleaserun was required to run on your system itself, this would fall down a bit ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants