Hello,

           This is about a process that runs as a Windows 7 service. It is a 
python executable that I am trying to run as a service and when it is executed 
from the commandline it runs fine. However when it runs as a local account 
(which is the same user as the user that runs it from commandline) it fails 
with the following error:-

                                                      (<class 
'pywintypes.com_error'>, com_error(-2147024891, 'Access is denied.', None, None)

The line where it fails is the following:-

                                                   MyConn = 
win32com.client.gencache.EnsureDispatch("Outlook.Application").GetNamespace("MAPI")

I deployed the service using a python wrapper. I have also deployed the said 
python executable using the NSSM utility with identical results. My initial 
reaction was it has to do with not being able to find the binaries and I added 
the environment variable PATH to the session thru 
sys.path.append(os.getenv('path')) but that didn't help.

>From a profile standpoint I think it should use the default profile if I don't 
>specify one. How do I determine what profile it is using? The user in question 
>does not have Admin privileges and it is a domain user. I am able to open 
>Outlook from the commandline as well with the said user credentials.

A resolution to this vexing problem would be greatly appreciated.

Thanks
Vish Rao

The information contained in this e-mail and in any attachments is intended 
only for the person or entity to which it is addressed and may contain 
confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon, this 
information by persons or entities other than the intended recipient is 
prohibited. This message has been scanned for known computer viruses.
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to