2
1
Who knows a simple solution how to install or uninstall a Windows service remotely on a Win2k8R2 server?
This server is a hosted at the internet, so it's not in a domain or such. Thus I want to avoid the use of windows file sharing or administration services.
I would prefer a possibility where I can trigger the execution of a server-side script which installs already uploaded service-binaries.
You're welcome to name any tools or .NET code solutions if you know how to accomplish that.
Edit: Sorry, I have to clarify a bit, it's not as easy as using powershell or scripting with InstallUtil in my case. I'll try it with bullet points:
- I want to install a service unattendedly by invoking the service installation on a server, running on the internet, from a client.
- I don't have a GUI from the server while invoking the service install. For example, I trigger a setup.exe, which installs the services itself via SSH (self-installing service to make use of custom service names). Not having a GUI seems to be a problem(?).
I even tried desperately to invoke the service setup program via a php web service (shell_exec), but the result is always the same: Setup is executed, but no services are installed.
To the client it should be as easy as possible to invoke the service installation on the server, without seeing anything of it. It's for a periodic and automated deployment of some service-based applications we create.
This sounds like a programming question, perhaps it should be on stackoverflow instead of superuser? – Harry Johnston – 2011-09-20T21:17:45.970
Is the installer (setup.exe) your own code? – Harry Johnston – 2011-09-20T21:19:08.760
Its our own installer, yes, and here at superuser I'm actually looking for a non-programming answer (although I could handle that as well ;) ). I'm quite certain it's possible to remote-install a windows service on an internet host unattendedly. Or prove me wrong ;) – derFunk – 2011-09-21T08:06:29.683
From what you've said, though, the problem seems to be that your setup.exe doesn't work properly when invoked remotely. Fixing this problem would be a programming question. If you're looking for an existing solution, I don't understand what you want that solution to do other than run setup.exe, which you've already tried. – Harry Johnston – 2011-09-22T21:17:32.317
The installer is not doing anything else than what can be done via command line. So forget the setup.exe for now. My most urgent question is: Is there any way to remotely install a windows service on an Win2k8 Server machine running on the internet? – derFunk – 2011-10-12T11:45:13.143
Well, it depends on the service. Have you tried using the sc create command from a server-side script? – Harry Johnston – 2011-10-13T22:36:09.243