Re: win32 service

2006-12-16 Thread g.franzkowiak
Tim Williams schrieb: > On 16/12/06, g.franzkowiak <[EMAIL PROTECTED]> wrote: >> Hi everybody, >> >> have a little problem with a service on Win32. >> >> I use a TCP server as service, but can't access from an other machine. >> Only local access is possible. >> >> The service starts like this: >> >

Re: win32 service

2006-12-16 Thread g.franzkowiak
Tim Williams schrieb: > On 16/12/06, g.franzkowiak <[EMAIL PROTECTED]> wrote: >> Hi everybody, >> >> have a little problem with a service on Win32. >> >> I use a TCP server as service, but can't access from an other machine. >> Only local access is possible. >> >> The service starts like this: >> >

Re: win32 service

2006-12-16 Thread Tim Williams
On 16/12/06, g.franzkowiak <[EMAIL PROTECTED]> wrote: > Hi everybody, > > have a little problem with a service on Win32. > > I use a TCP server as service, but can't access from an other machine. > Only local access is possible. > > The service starts like this: > > -> myService.py --username user

win32 service

2006-12-16 Thread g.franzkowiak
Hi everybody, have a little problem with a service on Win32. I use a TCP server as service, but can't access from an other machine. Only local access is possible. The service starts like this: -> myService.py --username user --password password install <- followed by start The user is member

RE: Starting Win32 Service

2006-09-28 Thread Tim Golden
| Tim Golden wrote: | ... | > Yes, sorry about that, it's a well-known (to me) gotcha. | > Basically there's no way I can extract the params from | > the COM interface in a way which implies order, so I | > can't take them in positionally. (Corrections to this | > statement will be gratefully recei

Re: Starting Win32 Service

2006-09-28 Thread Roger Upole
Tim Golden wrote: ... > Yes, sorry about that, it's a well-known (to me) gotcha. > Basically there's no way I can extract the params from > the COM interface in a way which implies order, so I > can't take them in positionally. (Corrections to this > statement will be gratefully received). > > TJG

RE: Starting Win32 Service

2006-09-27 Thread Tim Golden
[placid] | > Now i was trying to use service.ChangeStartMode but each | time i pass in | > an argument i get the error; | > | > #TypeError: __call__() takes exactly 1 argument (2 given) | > | > but; | > | > >>> print service.ChangeStartMode | > (ReturnValue)> | > | > ChangeStartMode needs an argu

Re: Starting Win32 Service

2006-09-27 Thread placid
placid wrote: > Tim Golden wrote: > > [placid] > > | Using Tim Golden's wmi module you can get the service names > > | > > | import wmi > > | c = wmi.WMI () > > | stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped") > > | if stopped_services: > > | for s in stopped_services: >

Re: Starting Win32 Service

2006-09-27 Thread placid
Tim Golden wrote: > [placid] > | Using Tim Golden's wmi module you can get the service names > | > | import wmi > | c = wmi.WMI () > | stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped") > | if stopped_services: > | for s in stopped_services: > | print s.Caption, "service

Re: Starting Win32 Service

2006-09-27 Thread Gabriel Genellina
At Wednesday 27/9/2006 01:39, placid wrote: Using Tim Golden's wmi module you can get the service names but how do i start services that are stopped? Surely there are fancier ways: >net start servicename Gabriel Genellina Softlab SRL __

RE: Starting Win32 Service

2006-09-27 Thread Tim Golden
[placid] | Using Tim Golden's wmi module you can get the service names | | import wmi | c = wmi.WMI () | stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped") | if stopped_services: | for s in stopped_services: | print s.Caption, "service is not running" | else: | print "N

Starting Win32 Service

2006-09-26 Thread placid
Hi all, Using Tim Golden's wmi module you can get the service names import wmi c = wmi.WMI () stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped") if stopped_services: for s in stopped_services: print s.Caption, "service is not running" else: print "No auto services stop

Re: win32 Service: path to .py script

2006-09-19 Thread Gregor Horvath
Larry Bates schrieb: > I believe that your problem is that services run under Local > System account. Normally Local System account would not have > a drive mapping Y:\. You can change the account that a service You are absolutly correct. I moved the script to a local drive instead of a mapped

Re: win32 Service: path to .py script

2006-09-19 Thread Larry Bates
Gregor Horvath wrote: > Hi, > > I have a testservice.py (see below). I installed the Windows-Service > successfully. (via commandlineoption install) > The problem is that it runs only when it is in c:\windows\system32 or in > the python path. > I added the desired path (Y:\) to the PYTHONPATH envi

win32 Service: path to .py script

2006-09-19 Thread Gregor Horvath
Hi, I have a testservice.py (see below). I installed the Windows-Service successfully. (via commandlineoption install) The problem is that it runs only when it is in c:\windows\system32 or in the python path. I added the desired path (Y:\) to the PYTHONPATH environment variable for the system acco

Re: win32 service and time.sleep()

2005-09-22 Thread Steve Horsley
Oracle wrote: > On Tue, 20 Sep 2005 10:49:13 -0400, rbt wrote: > >> I have a win32 service written in Python. It works well. It sends a >> report of the status of the machine via email periodically. The one >> problem I have is this... while trying to send an email, the

Re: win32 service and time.sleep()

2005-09-20 Thread Steve Holden
rbt wrote: > I have a win32 service written in Python. It works well. It sends a > report of the status of the machine via email periodically. The one > problem I have is this... while trying to send an email, the script > loops until a send happens and then it breaks. Should it

Re: win32 service and time.sleep()

2005-09-20 Thread Laszlo Zsolt Nagy
rbt wrote: >I have a win32 service written in Python. It works well. It sends a >report of the status of the machine via email periodically. The one >problem I have is this... while trying to send an email, the script >loops until a send happens and then it breaks. Should it be una

Re: win32 service and time.sleep()

2005-09-20 Thread Oracle
On Tue, 20 Sep 2005 10:49:13 -0400, rbt wrote: > I have a win32 service written in Python. It works well. It sends a > report of the status of the machine via email periodically. The one > problem I have is this... while trying to send an email, the script > loops until a send happens

win32 service and time.sleep()

2005-09-20 Thread rbt
I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it breaks. Should it be unable to send, it sleeps for 10

win32 service and time.sleep()

2005-09-20 Thread rbt
I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it breaks. Should it be unable to send, it sleeps for 10

Re: win32 service and sockets

2005-02-09 Thread Tom Brown
On Wednesday 09 February 2005 10:48, David Bolen wrote: > Tom Brown <[EMAIL PROTECTED]> writes: > > Well, I have found that it works if I launch the client on the same > > machine as the service. It will not work from a remote machine. Any > > ideas? > > Since you mentioned Xp, could any of it's bu

Re: win32 service and sockets

2005-02-09 Thread David Bolen
Tom Brown <[EMAIL PROTECTED]> writes: > Well, I have found that it works if I launch the client on the same > machine as the service. It will not work from a remote machine. Any > ideas? Sounds like it might be an issue at the network layer rather than in your code - perhaps a routing or filterin

Re: win32 service and sockets

2005-02-09 Thread Tom Brown
On Tuesday 08 February 2005 16:41, Tom Brown wrote: > Hi, > > I created a win32 service for XPPro called N4010ATestService.py (see > below). The service runs as a particular user with administrative rights. > It starts a thread that creates a simple socket server > (N4010ASocke

win32 service and sockets

2005-02-08 Thread Tom Brown
Hi, I created a win32 service for XPPro called N4010ATestService.py (see below). The service runs as a particular user with administrative rights. It starts a thread that creates a simple socket server (N4010ASocketServer.py -- also below) that just waits for 20 character string. When I run