Re: [python-win32] share remote drive

2012-02-23 Thread Tim Golden
On 22/02/2012 22:48, pacopyc pacopyc wrote: Can I share a remote drive? How? code import wmi remote = wmi.WMI (remote-server) remote.Win32_Share.Create ( Path=c:/shared-folder, Name=myshare, Type=0 ) /code TJG ___ python-win32 mailing list

Re: [python-win32] share remote drive

2012-02-23 Thread Tim Golden
On 22/02/2012 22:48, pacopyc pacopyc wrote: Can I share a remote drive? How? or code import win32net win32net.NetShareAdd ( remote-server, 2, dict (netname=shared2, path=c:/shared-folder2 ) /code There-is-always-more-than-one-way-to-do-it-ly-yours TJG

[python-win32] COM-interfaces in python

2012-02-23 Thread Rafael Yengibaryan
Hi Tim, Can you please describe the steps of writing an ordinary COM-extension in python. Do I have to use C/C++ or is it possible to only use python. As I understand, ctypes or comtypes make it possible to call functions or access data from a library written in another language, don' t they?

Re: [python-win32] Anti-reverse Python-based binaries?

2012-02-23 Thread Sturla Molden
On 09.02.2012 07:51, Jun Koi wrote: 1) how serious this problem is in your opinion? is it really true that it is impossible to protect the binaries from reversing? You are probably aware that binary machine code from a C compiler can be decompiled as well (e.g. to x86 assemby). Decompiling

Re: [python-win32] Issuing a command via subprocess, other methods in Windows 7

2012-02-23 Thread Tim Roberts
David Hutto wrote: On Wed, Feb 22, 2012 at 12:59 PM, Tim Roberts t...@probo.com wrote: Yes. The one critical piece of information you did not supply here is that you are running 64-bit Windows 7. That's the root of the problem. Quick question, How did you know this? It was the only

Re: [python-win32] [ANN] pywin32 build 217 released.

2012-02-23 Thread Luc Kesters
Mark, to me this seems bizar I have a different behaviour when I work in a pure vbscript or work in vba. the vbs code doesn't work, while the vba code does work. Any idea, why there is a difference? 'vbs '- Sub Test() Set interpreter = CreateObject(Python.Interpreter) interpreter.exec

Re: [python-win32] Running a Windows Python service without pythonservice.exe?

2012-02-23 Thread Bill Tutt
Well, I know this isn't a solution per say, but the usual cause of this error message is that you failed to call the Win32 API SetServiceStatus() with a 'ask me again in x time' or 'i've finished starting successfully' call in a fairly quick manner. See

Re: [python-win32] Overlay Icon Question...

2012-02-23 Thread china . wangjunlong
Hi Andrea, I have made a python script which allows me to assign overlay icons to some particular files. The method I use is according to the discussion that you rise up as below: http://mail.python.org/pipermail/python-win32/2008-April/007313.html It works perfect! But when I copy this

Re: [python-win32] Python Windows Service and registering for preshutdown?

2012-02-23 Thread Bill Tutt
You'd simply need to override GetAcceptedControls() in your ServiceFramework subclass to OR in SERVICE_ACCEPT_PRESHUTDOWN and override SvcOtherEx to process SERVICE_CONTROL_PRESHUTDOWN. Other interesting service control notifications appear to be PowerEvent and TimeChange. I'd guess PowerEvent is