[python-win32] permissions error

Jeff Peery jeffpeery at yahoo.com
Sat Feb 13 18:43:22 CET 2010


It works!
 
FYI - 
the trick was to remove the gen_py folder from the win32com/client directory. Then I was also not including win32com in the 'packages' option in my setup.py. Including this solved my issues. I can now install on a machine and win32com will create the gen_py files in the appdata folder.
 
thanks for those who offered advice,
Jeff

--- On Fri, 2/12/10, Preston Landers <planders at gmail.com> wrote:


From: Preston Landers <planders at gmail.com>
Subject: Re: [python-win32] permissions error
To: "Jeff Peery" <jeffpeery at yahoo.com>
Date: Friday, February 12, 2010, 10:30 PM


I don't know if this will work but one workaround may be to set a registry key:

HKLM\\SOFTWARE\\Python\\PythonCore\\2.6\\PythonPath\\win32com

The key is GenPath and the value would be a writable location.  See win32com/__init__.py SetupEnvironment().

You could also look at pre-generating the files in question with makepy.py and including those in the executable. I don't have much experience with packaging an app into the executable format.

-Preston


On Fri, Feb 12, 2010 at 11:37 PM, Jeff Peery <jeffpeery at yahoo.com> wrote:






hi, yes I can personally do that on my computer but it is not a good solution for my users to require an administrator to grant acces every time they want to launch the software. So I will need a more permanent fix. 
 
Is it a significant task to redirect these files to the application data folder or program data folder?
 
thanks,
Jeff


--- On Fri, 2/12/10, Preston Landers <planders at gmail.com> wrote:


From: Preston Landers <planders at gmail.com>

Subject: Re: [python-win32] permissions error
To: "Jeff Peery" <jeffpeery at yahoo.com>
Date: Friday, February 12, 2010, 7:24 PM





Have you tried manually granting a write permission for your user to that directory?  
-Preston


On Fri, Feb 12, 2010 at 9:08 PM, Jeff Peery <jeffpeery at yahoo.com> wrote:






hello,
yes, I am using 64 bit vista. and I am using py2exe to distribute my app. At the moment I'm dead in the water unti lI resolve this issue. Does anyone know of a quick fix?
 
thanks,
Jeff

--- On Fri, 2/12/10, Tim Roberts <timr at probo.com> wrote:


From: Tim Roberts <timr at probo.com>
Subject: Re: [python-win32] permissions error
To: "Python-Win32 List" <python-win32 at python.org>
Date: Friday, February 12, 2010, 10:37 AM 





Dave Angel wrote:
> 2) Are you running a 64bit version of Vista?

Yes, he is.  The path "Program Files (x86)" is prima facie evidence of
this.  He's running 32-bit Python on a 64-bit system.  And that's just fine.


> 3) What do you mean by "compile" and "compiled executable"?

It means he has used something like "py2exe" to turn his Python code
into an executable.

This is a real problem, and one that pywin32 probably needs to address. 
On Vista and beyond, the "Program Files" directories are not writable by
non-elevated programs.  The win32com-generated wrappers need to go
somewhere else, like "Local Settings\Temp" or "Local Settings\Apps".

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32


_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32







      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100213/18d57ebe/attachment-0001.htm>


More information about the python-win32 mailing list