Re: [python-win32] granting SeServiceLogonRight on a network account with pywin32?

2010-10-15 Thread Mike Driscoll
On 1:59 PM, Tim Roberts wrote: Tim Roberts wrote: However, I admit that NT security is a twisty maze of little passages, all different, so it's quite possible this is just a wrong turn. And I wonder how many of you are old enough to get the reference in that sentence... I'm pretty sure I

Re: [python-win32] granting SeServiceLogonRight on a network account with pywin32?

2010-10-15 Thread Aahz
On Thu, Oct 14, 2010, Tim Roberts wrote: > Tim Roberts wrote: >> >> However, I admit that NT security is a twisty maze of little passages, >> all different, so it's quite possible this is just a wrong turn. > > And I wonder how many of you are old enough to get the reference in that > sentence...

[python-win32] Avoid bare except

2010-10-15 Thread Aahz
On Thu, Oct 14, 2010, Bill Janssen wrote: > > try: > import win32api, win32security > > username = win32api.GetUserNameEx(win32api.NameSamCompatible) > print 'granting "logon as a service" rights to ' + username > policy_handle = win32security.LsaOpenPolicy(None, > win32security.

Re: [python-win32] Avoid bare except

2010-10-15 Thread Bill Janssen
Aahz wrote: > On Thu, Oct 14, 2010, Bill Janssen wrote: > > > > try: > > import win32api, win32security > > > > username = win32api.GetUserNameEx(win32api.NameSamCompatible) > > print 'granting "logon as a service" rights to ' + username > > policy_handle = win32security.LsaOpen

[python-win32] crash on Windows Server 2008

2010-10-15 Thread Bill Janssen
I'm trying to run a Python service on Windows Server 2008. It does start up, but then faults out, leaving this message in the event viewer: Log Name: Application Source:Application Error Date: 10/15/2010 2:59:41 PM Event ID: 1000 Task Category: (100) Level: Erro

Re: [python-win32] crash on Windows Server 2008

2010-10-15 Thread Tim Roberts
Bill Janssen wrote: > I'm trying to run a Python service on Windows Server 2008. It does > start up, but then faults out, leaving this message in the event viewer: > > Log Name: Application > Source:Application Error > Date: 10/15/2010 2:59:41 PM > Event ID: 1000 > Task

Re: [python-win32] crash on Windows Server 2008

2010-10-15 Thread Bill Janssen
Tim Roberts wrote: > Bill Janssen wrote: > > I'm trying to run a Python service on Windows Server 2008. It does > > start up, but then faults out, leaving this message in the event viewer: > > > > Log Name: Application > > Source:Application Error > > Date: 10/15/2010 2:59

Re: [python-win32] Problem using win32com.client.Dispatch on Win7 64bit

2010-10-15 Thread Mark Hammond
On 16/10/2010 6:23 AM, Eileen Wei wrote: Thanks Mark, that solved the problem. But I am wondering since 32bit Python and pywin32 work on 64bit machine, why do we need the 64bit version? - I have always thought that you need to install 64bit version on 64bit machines... In practice, it is rare y

Re: [python-win32] Problem using win32com.client.Dispatch on Win7 64bit

2010-10-15 Thread Preston Landers
The main use I've found for 64 bit Python is for running the Python ISAPI stuff under the IIS web server on 64 bit Windows. I guess technically that falls under using 64 bit COM objects. That and it helps when you need to open >4 GB files and use >2GB memory in a process. regards, -Preston On F

Re: [python-win32] Problem using win32com.client.Dispatch on Win7 64bit

2010-10-15 Thread Eileen Wei
Thanks Mark, that solved the problem. But I am wondering since 32bit Python and pywin32 work on 64bit machine, why do we need the 64bit version? - I have always thought that you need to install 64bit version on 64bit machines... -Original Message- From: Mark Hammond [mailto:skippy.hamm..