[python-win32] manipulating service action restart behavior?

2011-08-08 Thread Andrew Hammond
I am trying to control the behavior of a service with regards to failure handling as described here: http://blogs.msdn.com/b/jcalev/archive/2008/01/10/some-tricks-with-service-restart-logic.aspx I have done some reading and have the following snippet of code that I think is going in the right

Re: [python-win32] manipulating service action restart behavior?

2011-08-09 Thread Andrew Hammond
containing {'ResetPeriod':int,'RebootMsg':unicode,'lpCommand':unicode,'Actions':sequence of 2 tuples(int,int) Which I think is what I'm feeding it. Can someone please tell me what I'm doing wrong? A On Mon, Aug 8, 2011 at 7:06 PM, Andrew Hammond andrew.george.hamm...@gmail.com wrote: I am

Re: [python-win32] manipulating service action restart behavior?

2011-08-10 Thread Andrew Hammond
: 502-276-0459 Office: 502-212-9913 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord (Rom 6:23) On 08/09/2011 08:56 PM, Andrew Hammond wrote: I did some more hunting around and now have the following: hscm = win32service.OpenSCManager

Re: [python-win32] manipulating service action restart behavior?

2011-08-10 Thread Andrew Hammond
:08 PM, Andrew Hammond andrew.george.hamm...@gmail.com wrote: I tried that change and get the exact same error message. I found the code sending the error message in pywin32/win32/src/win32service.i I've extracted what I think are the relevant snippets: 1675 // @flag

[python-win32] lingering open filehandle?

2012-02-08 Thread Andrew Hammond
We're using pycurl to download a file. The file is written to disk in the context of a with statement. Once the file is written, we exit the context and then do an os.rename() to move the downloaded file to it's final destination. Immediately before doing the rename, I confirm that the filehandle

[python-win32] windows firewall woes?

2012-03-05 Thread Andrew Hammond
We have python running on a number of devices in the field and have experienced problems where it appears that a windows update has removed a windows firewall exception, blocking our python service from operating. Has anyone else experienced something like this? Is there a way to fix it without

Re: [python-win32] windows firewall woes?

2012-03-08 Thread Andrew Hammond
/aa366421(v=vs.85).aspx I'd use the VBScript examples as a base and determine what kind of exception is best for your needs. (i.e. as little of an exception as possible) Bill On Mon, Mar 5, 2012 at 9:05 PM, Andrew Hammond andrew.george.hamm...@gmail.com wrote: We have python running

Re: [python-win32] windows firewall woes?

2012-03-09 Thread Andrew Hammond
paths. (The error code shown appears to be ERROR_INVALID_POINTER, but that might be a red herring) Mark On 9/03/2012 11:16 AM, Andrew Hammond wrote: With the following code, def add_firewall_exception(): app = win32com.client.gencache.**EnsureDispatch('HNetCfg

[python-win32] determining service startType

2013-10-14 Thread Andrew Hammond
Hi All, I know how to change a service's configuration to manipulate the startType using win32serviceutil.ChangeServiceConfig('my_service', startType=4) # disable for example, but how do I query the current startType? Andrew ___ python-win32 mailing