Executing Commands From Windows Service

Sean DiZazzo half.italian at gmail.com
Mon Feb 8 07:28:19 CET 2010

On Feb 7, 4:57 pm, T <misceveryth... at gmail.com> wrote:
> Thanks for the suggestions -  I think my next step is to try running
> it under an admin user account, as you guys both mentioned.  Alf -
> you're absolutely right, Microsoft has srvany.exe, which allows you to
> run any EXE as a Windows service.  I've done this in the past, but
> it's more of a "hack"..so this go around (since I will be distributing
> this program), I wanted to go the more professional route..which,
> unfortunately, involves learning the "scum". :)  I  posted this to
> comp.os.ms-windows.programmer.win32, so we'll see if what the Win32
> programmers have to say as well.  Thanks again!

I use windows services and they are very reliable.  I would say though
that relying on plink.exe is much less reliable than either python or
the service that it is running under.

Why not take a look at paramiko as the ssh client library?  I think it
runs under windows.  Also perhaps Twisted has something.  Either way
would be light years ahead of using subprocess with plink.

Just my thoughts.


More information about the Python-list mailing list