Re: [python-win32] Pywin32 latest documentation

2020-04-27 Thread Tim Golden
04/2020 06:50, Tim Golden wrote: Well I've just updated those docs from the latest release TJG On 21/04/2020 08:25, Hossein Hasanpour wrote: Hello everyone, Is there any kind of updated documentation concerning Pywin32? The only online documentation that I know of is http://timgolden.me.

Re: [python-win32] Pywin32 latest documentation

2020-04-22 Thread Tim Golden
All my code does is to take the .chm file which ships with pywin32, unpick it, and turn it into a series of HTML pages. There's a tiny bit of tidying-up but that's all. So if there are no docs in that Help file for some modules, there won't be any on those web pages. If they *are* there and I'

Re: [python-win32] Pywin32 latest documentation

2020-04-21 Thread Tim Golden
Well I've just updated those docs from the latest release TJG On 21/04/2020 08:25, Hossein Hasanpour wrote: Hello everyone, Is there any kind of updated documentation concerning Pywin32? The only online documentation that I know of is http://timgolden.me.uk/pywin32-docs which is the online ver

Re: [python-win32] Moving pywin32 source from Sourceforge to Github

2017-10-09 Thread Tim Golden
On 09/10/2017 07:51, Mark Hammond wrote: Hi all, Sourceforge appears to be in its death throes, and with Python moving to git/github I've decided to do the same. I hope that this might encourage more contributors, particularly for better supporting PyPi/pip, creating wheels etc. Effective imm

Re: [python-win32] pythonw.exe

2017-06-23 Thread Tim Golden
On 23/06/2017 06:15, Damien Sykes-Lindley wrote: Hi, I’m relatively new to Python so please excuse me if this question has a pretty obvious answer that I may have missed somewhere. Since I work exclusively with Windows, the majority of my projects are orientated towards GUI interfaces, meaning th

Re: [python-win32] questions

2016-03-06 Thread Tim Golden
On 05/03/2016 21:39, Jon Joseph wrote: To Whom It May Concern: Is there any semi-comprehensive resource on how to use win32gui or any of the other win32* modules? As a beginning example I’m just trying to: 1)Open notepad (done) 2)Automatically File->Exit A simple demo would be helpful. Unf

Re: [python-win32] python-win32 is for Python on Windows

2015-12-27 Thread Tim Golden
The problem here is that changing the name (as opposed to the description) would break all sorts of existing links. Frankly, I doubt if anyone's actually stopping short of posting to the list merely over a doubt as to whether they can ask about 64-bit issues! TJG On 27/12/2015 18:33, R Schuma

Re: [python-win32] Windows 10

2015-10-28 Thread Tim Golden
On 28/10/2015 10:20, Laura Creighton wrote: > In a message of Wed, 28 Oct 2015 09:55:07 +0000, Tim Golden writes: >> I've just made the (I believe) uncontroversial change to: "Python on >> Windows" for the description. If Mark or anyone wants to extend it >&g

Re: [python-win32] Windows 10

2015-10-28 Thread Tim Golden
On 28/10/2015 09:45, Laura Creighton wrote: > In a message of Wed, 28 Oct 2015 17:59:05 +1100, Mark Hammond writes: >> On 26/10/2015 10:07 AM, Laura Creighton wrote: >>> Can I suggest a mailing list name change to reflect 64 bit windows? >>> >>> python-windows would be my suggestion >> >> pyth

Re: [python-win32] Is there a _simple_ way to find out what version of Windows you are running?

2015-10-08 Thread Tim Golden
On 08/10/2015 13:37, Tim Golden wrote: > On 08/10/2015 10:56, Laura Creighton wrote: >> Hi, I am one of the python.org webmasters. We get people -- often children >> who want to install python on their computers but don't know what OS they >> are running. Nearly all o

Re: [python-win32] Is there a _simple_ way to find out what version of Windows you are running?

2015-10-08 Thread Tim Golden
On 08/10/2015 10:56, Laura Creighton wrote: > Hi, I am one of the python.org webmasters. We get people -- often children > who want to install python on their computers but don't know what OS they > are running. Nearly all of these people are running Windows, though I > did get somebody who was r

Re: [python-win32] SourceForge Mercrial Hosting

2015-07-21 Thread Tim Golden
They're having a major outage. TJG On 21/07/2015 11:19, Chris Smith wrote: > Has the URL for a pywin32 checkout changed, or is their server on a > walkabout? > Thanks, > Chris > -- > Cheers, > Chris > > > ___ > python-win32 mailing list > python-win3

Re: [python-win32] Oldest Python version for pywin32?

2015-04-15 Thread Tim Golden
On 15/04/2015 10:11, Mark Hammond wrote: > Hi Tim, > I still build for 2.5 and 3.1, but really only because they do still > build. If there's a reasonable reason to drop support for some I doubt > it will hurt many people - the sourceforge page should show you download > stats, but last I looked

[python-win32] Oldest Python version for pywin32?

2015-04-10 Thread Tim Golden
Really addressed to Mark / Roger, but in case anyone else wants to chip in anyway.. What's the oldest Python version still supported by pywin32? I ask because I'm slightly tweaking the [somewhat gnarly] hunt-the-SDK code in setup.py, and I don't want to introduce something which won't build on

Re: [python-win32] Tkinter newbie

2015-03-03 Thread Tim Golden
On 03/03/2015 16:50, Preston Landers wrote: It's not unusual for people to think this list is for general discussion of Python for Windows people, rather than specifically for the PyWin32 package. That's because it is. From https://mail.python.org/mailman/listinfo/python-win32: "All issues re

Re: [python-win32] python-win32 Digest, Vol 141, Issue 8

2014-12-27 Thread Tim Golden
On 27/12/2014 15:13, Chris Smith wrote: Also, is more than just a SourceForge account necessary to do a read-only checkout of the code? To do a read-only checkout of the code, you don't even need a SourceForge account. Just clone it: hg clone http://pywin32.hg.sourceforge.net:8000/hgroot/p

Re: [python-win32] Python scripting with Active Directory

2014-07-17 Thread Tim Golden
On 17/07/2014 09:19, Anis Liyana wrote: > I am currently on a project for back up server with python script. > The project is actually arise from problem whereby when I need to back > up my server (Windows Server 2003), I usually use Robocopy but, when I > copy the folders from server 1 to server 2

Re: [python-win32] Passing arguments/values back and forth between separate executables at/during runtime

2014-04-24 Thread Tim Golden
On 23/04/2014 23:45, Tim Roberts wrote: > Jacob Kruger wrote: > Windows has the concept of a memory-mapped files -- essentially a chunk > of memory pages that can be shared between multiple processes. That's > awfully easy, but I don't know if there is a Python mapping. The mmap stdlib module w

Re: [python-win32] pythoncom error -2147180508. What is it?

2014-04-01 Thread Tim Golden
On 01/04/2014 11:52, Joss Gray wrote: > I'm using the awesome wmi package in my application which I understand > uses pythoncom. > > I'm using wmi to perform operations like setting the IP of a network > adapter, reading various bits of system information. > > I'm finding that once in a while cal

Re: [python-win32] List of keys and values

2014-02-19 Thread Tim Golden
On 18/02/2014 18:59, Aaron Reabow wrote: > Hi Guys, > > This should be dead simple. > > I am just trying to find a list of all of the key value pairs held for > each message. > > > These are the ones that I have found so far: > > * subject > * SenderName > * Recipients > * TaskDueDate

Re: [python-win32] Programmatically turn off mouse auto-positioning

2014-02-04 Thread Tim Golden
On 04/02/2014 18:51, reckoner wrote: In the control panel, under mouse settings, there is a checkbox to automatically move the mouse to the "default button in a dialog box". Is there a way to programmatically turn this off/on using Python? I'm referring to windows 7/8. While I don't know the

Re: [python-win32] Excel Workbooks Exception

2014-01-31 Thread Tim Golden
On 31/01/2014 15:08, Mark Mordeca wrote: > I sometimes get a random exception when trying to open an Excel file. > It is not consistent. I will get the exception, and then try it > again and it will work fine. > xl=win32com.client.DispatchEx("Excel.Application") > > book=xl.Workbooks.Open(self.

Re: [python-win32] Building pywin32 & adsi support

2014-01-26 Thread Tim Golden
On 25/01/2014 03:43, Mark Hammond wrote: [...] hrmph - that file was sitting in my source tree, but apparently was being ignored by hg due to an overly greedy .hgignore line. I just added it - sorry about that. [...] hrmph - that's exactly what my version of __init__.py has, and as I menti

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Tim Golden
On 21/01/2014 15:36, Joseph L. Casale wrote: I have a scenario where I have a directory owned by localhost\Administrators with that group and SYSTEM set to full control without inheritance propagated. Under this, I have a folder owned by another account with only that account granted full cont

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Tim Golden
On 21/01/2014 15:36, Joseph L. Casale wrote: > I have a scenario where I have a directory owned by localhost\Administrators > with > that group and SYSTEM set to full control without inheritance propagated. > > Under this, I have a folder owned by another account with only that account > granted

Re: [python-win32] Building pywin32 & adsi support

2014-01-21 Thread Tim Golden
On 21/01/2014 12:20, Mark Hammond wrote: > On 21/01/2014 9:23 PM, Tim Golden wrote: >> I'm trying to bring my active_directory module up to scratch with Python >> 3. I'm hitting a couple of effective showstoppers. >> >> First: I can't even build pywin32 fo

[python-win32] Building pywin32 & adsi support

2014-01-21 Thread Tim Golden
I'm trying to bring my active_directory module up to scratch with Python 3. I'm hitting a couple of effective showstoppers. First: I can't even build pywin32 for any revision past 337015e6d473, which is when the IConverterSession stuff went in. I've tried a couple of tweaks, but basically: """ co

Re: [python-win32] clicking pyw file gives me a console

2014-01-08 Thread Tim Golden
On 08/01/2014 17:04, Mark Lawrence wrote: On 08/01/2014 15:16, Tim Golden wrote: On 06/01/2014 16:59, Mark Lawrence wrote: As the subject :( It only happens if I've a shebang line at the top of the file, remove that and the file is launched without the console. If I add a w to the e

Re: [python-win32] clicking pyw file gives me a console

2014-01-08 Thread Tim Golden
On 06/01/2014 16:59, Mark Lawrence wrote: As the subject :( It only happens if I've a shebang line at the top of the file, remove that and the file is launched without the console. If I add a w to the end of python on the shebang line I get a dialog box "Python launcher is sorry to say ... Inv

Re: [python-win32] Understanding "Access Denied" when calling win32process.TerminateProcess() from Run As Administrator prompt

2013-11-14 Thread Tim Golden
On 14/11/2013 02:01, Tony Cappellini wrote: > Sorry for the delay in replying, had a few more important crises to solve. > > To summarize, I have a program running under Windows XP, which launches > a process > via os.spawnv(). When the user wants to exit the program they press > Ctrl-C. The progr

Re: [python-win32] Python Error:WindowsError: [Error 32] The process cannot access the file.

2013-11-12 Thread Tim Golden
[Manu: it would help if you were to follow the convention on this list and post your answer underneath or within the text to which you're replying.] [... description of removing files raising WindowsError 32 because the file is in use by another process ...] On 12/11/2013 12:32, manu agarwal wrot

Re: [python-win32] Python Error:WindowsError: [Error 32] The process cannot access the file.

2013-11-12 Thread Tim Golden
On 12/11/2013 10:05, manu agarwal wrote: > I am getting the below error while executing the script on one of the > application server. > > *WindowsError: [Error 32] The process cannot access the file because it > is being used by another process* > * > * > Script used to delete the files from the

Re: [python-win32] Understanding "Access Denied" when calling win32process.TerminateProcess() from Run As Administrator prompt

2013-10-02 Thread Tim Golden
On 01/10/2013 20:03, Tony Cappellini wrote: > > When running from a *"Run As Administrator"* prompt on Windows 7 > Professional 32-Bit, > > my Top-level python script spawns a process (which is another python > script) using os.spawnv( ) > > When the top-level script ends, it attemps to call >

Re: [python-win32] Accessing MSFT_ classes using python com / wmi

2013-09-24 Thread Tim Golden
On 24/09/2013 14:39, Joss Gray wrote: > I'm trying to access the MSFT_ classes in python. Specifically > MSFT_NetAdapter. Win32_ works fine. > > But whatever I try, I get > > 0x80041002 WBEM_E_NOT_FOUND > 0x8004100E WBEM_E_INVALID_NAMESPACE > > errors. Incidentally, the MSDN page for that class

Re: [python-win32] Accessing MSFT_ classes using python com / wmi

2013-09-24 Thread Tim Golden
On 24/09/2013 14:39, Joss Gray wrote: > I'm trying to access the MSFT_ classes in python. Specifically > MSFT_NetAdapter. Win32_ works fine. > > But whatever I try, I get > > 0x80041002 WBEM_E_NOT_FOUND > 0x8004100E WBEM_E_INVALID_NAMESPACE > > errors. > > Specifically I been basing my code on

Re: [python-win32] Python 3 --> Can't pickle

2013-04-18 Thread Tim Golden
On 18/04/2013 12:09, Vernon D. Cole wrote: > Help me, Obiwan Kanobi... > > I have been tracking this one down, for two days, and have cleaned by my > data conversion routines and the documentation for them as a result. but > I can't determine the "right" way to fix this. > > This works fine in Py

Re: [python-win32] Dropping support for Python 2.3?

2013-03-26 Thread Tim Golden
[re supporting 2.3 for adodbapi] Ditch it, I say. I think the minimum I test against for any of my stuff is 2.4 -- and I'm more and more inclined towards 2.6+. As you say, there's a small but definite overhead, the more so as we support 2.x and 3.x from the same codebase. (I have to do some fancy

Re: [python-win32] USB device tree physical topology

2013-03-25 Thread Tim Golden
On 25/03/2013 19:15, Tim Roberts wrote: I write Windows USB drivers for a living, so I'm pretty well steeped in this. You can try asking some followup questions, and I'll see if I can't lead you down a rose-colored path. Is that a cross between wearing Rose-tinted Spectacles and leading someo

Re: [python-win32] Help for Excel Pivot Copy

2013-01-29 Thread Tim Golden
On 27/01/2013 12:37, Hsu. Victor (GSM) wrote: > Hi, > > I would like to copy a Pivot table to another location. > I can do that with VBA code below. Can someone guide me how to convert > below code to Python? Especailly the PivotTables PivotSelect part, I > don't know how to call it in py

Re: [python-win32] win32gui.EnumWindows does not work on worker threads

2013-01-28 Thread Tim Golden
On 28/01/2013 15:34, Radu Savutiu wrote: > I have multiple scripts in which i used win32gui.EnumWindows. > So far they all worked - but now it seems they pause on this call to > EnumWindows. > > I suspect this has nothing to do with pythoncom, as I use CoInitialize > there and it works. It's not

Re: [python-win32] win32print not printing

2013-01-25 Thread Tim Golden
On 24/01/2013 18:44, Marcelo Almeida wrote: > Hello everyone, > > I am trying to print a string (not a file) with win32print api and I'm > using Tim Golden's > third block of > code (pasted below) as a testing example but without success. T

Re: [python-win32] pywin32 service startup error (sys.winver issue?)

2013-01-24 Thread Tim Golden
On 23/01/2013 21:23, Jean Rousseau wrote: > After (much) further troubleshooting, I have located the bug - > completely my fault (why aren't you more surprised? ;-) The service > fails on startup because my own derived class implemented a method that > is only supported on platforms later than Win

Re: [python-win32] pywin32 service startup error (sys.winver issue?)

2013-01-23 Thread Tim Golden
On 23/01/2013 19:55, Jean Rousseau wrote: Tim, OK, so I restored the server VM from backup, ran the existing service (which worked fine) and then copied across and installed my new service .py files and installed. ALL of this still working on Python 3.2.3 and pywin-217. I ran pythonservice with

Re: [python-win32] pywin32 service startup error (sys.winver issue?)

2013-01-23 Thread Tim Golden
On 23/01/2013 15:45, Jean Rousseau wrote: > Here's the background - platform is Win 2003 Server x86: > 1. My test machine was running Python 3.2.3 / pywin32 build 217 and all > was well with the service classes that I wrote and tested. > 2. I then installed Python 3.3.0 and pywin32 build 218. > 3.

Re: [python-win32] Active Directory group creation

2013-01-15 Thread Tim Golden
On 14/01/2013 17:49, Trevor Rowland wrote: > Has anyone managed to create an Active Directory group using either > win32com.client or active_directroy modules ? if so how? > > I have a script automatically adding users to active directory groups > when they are added to projects in our project man

Re: [python-win32] com_error in win32com/client.Moniker

2012-12-05 Thread Tim Golden
On 05/12/2012 12:13, David Hughes wrote: > Originally posted in py2exe-us...@lists.sourceforge.net but re-posted > here at the suggestion of Mark Hammond: > > A customer running my software, distributed via py2exe (Python 2.7.2) is > consistently getting the following error > > Mon Dec 03 13

Re: [python-win32] Catching SIGBREAK with Python 3.3

2012-11-14 Thread Tim Golden
On 14/11/2012 16:47, Stefan Scherfke wrote: It seems like the sleep()-call cannot be interrupted. I added the changes you described to my code. Under XP, Py33 32bit, the child process takes 10s to terminate but doesn’t prints the last message. If I replace the sleep(10) call with a "for i in rang

Re: [python-win32] Catching SIGBREAK with Python 3.3

2012-11-14 Thread Tim Golden
On 13/11/2012 20:54, Stefan Scherfke wrote: > Hi Tim, > > Am 13.11.2012 um 21:44 schrieb Tim Golden : > >> On 12/11/2012 13:12, Stefan Scherfke wrote: >>> Hi all, >>> >>> recently I’ve been playing around with sending and catching signals on >>&

Re: [python-win32] Catching SIGBREAK with Python 3.3

2012-11-13 Thread Tim Golden
On 13/11/2012 20:54, Stefan Scherfke wrote: Hi Tim, Am 13.11.2012 um 21:44 schrieb Tim Golden : Possibly unhelpfully, I've just run your code on Python 2.7, 3.3 and 3.4, all of which gave the same output: parent waiting for child child terminating parent terminating This is on WinX

Re: [python-win32] Catching SIGBREAK with Python 3.3

2012-11-13 Thread Tim Golden
On 12/11/2012 13:12, Stefan Scherfke wrote: Hi all, recently I’ve been playing around with sending and catching signals on Windows. I finally found out how to send and catch a BREAK event. With Python 2.7(.2), I only need os.kill(pid, signal.CTRL_C_EVENT) and signal.signal(signal.SIGBREAK, hand

Re: [python-win32] Problem installing for Python 2.7, 32-bit: mc.exe not found

2012-10-29 Thread Tim Golden
On 29/10/2012 14:12, Gerard Blais wrote: I seem to be missing an executable: C:\Temp\pywin32-218>setup install Building pywin32 2.7.218.0 running install running build running build_py running build_ext Found version 0x600 in C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\SDKDDKVER.H buil

Re: [python-win32] unicode breaks win32com?

2012-10-04 Thread Tim Golden
On 03/10/2012 22:50, Matt LaPlante wrote: > user = 'mrunicode' > dnc = > win32com.adsi.ADsGetObject('LDAP://rootDSE').Get('DefaultNamingContext') > ado = win32com.client.Dispatch('ADODB.Connection') > ado.Open('Provider=ADsDSOObject') > lfilter = '(&(sAMAccountName=%s)(objectCategory=User))' % user

Re: [python-win32] ValueError in relpath

2012-09-14 Thread Tim Golden
On 14/09/2012 10:03, Niemann, Hartmut wrote: > Hello Tim! > > Thank you for your reply. > >> -Ursprüngliche Nachricht- >> Niemann, Hartmut wrote: >>> I am not subscribed to this mailing list (so CC me on all >> replies please), >> >> How did you send this? The list only accepts posting

Re: [python-win32] Python WMI SCript to get installed software

2012-07-25 Thread Tim Golden
On 25/07/2012 18:23, Carlos Hotmail wrote: Hi all on the list. The following question is regarding an error that raises when i try to execute this script: import _winreg import wmi r = wmi.Registry () result, names = r.EnumKey ( hDefKey=_winreg.HKEY_LOCAL_MACHINE, sSubKeyName="Software"

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Golden
On 17/07/2012 16:05, Kurt Munson wrote: > Dunno exactly what you mean by "what's your Dispatch code look > like". Well pretty much what you posted, in fact :) > Incidentally, I tried changing the dispatch line to use dynamic > dispatch using this code: > > xl = win32com.client.dynamic.Dispatch(

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Golden
[cc-ing the list back in so you get the benefit of more and greater intelligences...] On 17/07/2012 15:20, Kurt Munson wrote: > I don't get it: I haven't made any changes to that Dispatch call in > months! > > My code worked for months with the existing Dispatch method, up > through yesterday af

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Golden
On 17/07/2012 14:51, Kurt Munson wrote: > I have been using pywin32 successfully for years to control Excel. Now, > suddenly I get errors executing the same code that has run previously. [...] > The last line(‘xl.visible = 0’) now causes an error: [...] > This error goes away if I use xl.Visib

Re: [python-win32] How to disable Windows Firewall using WMI

2012-07-06 Thread Tim Golden
On 06/07/2012 14:36, prashant padaganur wrote: > Thanks. But does not help still. I am getting the same com error. import wmi c = wmi.WMI(namespace="root/Microsoft/HomeNet") for whatever in c.HNet_ConnectionProperties(): print whatever I'm not in a position to try it, but I don't imagi

Re: [python-win32] How to find the current/last system state from Python

2012-07-04 Thread Tim Golden
On 04/07/2012 06:01, prashant padaganur wrote: > On 03/07/2012 12:23, prashant padaganur wrote: >>>/ > />>/ I want to write an application that puts the system in to different > />>/ sleep states. Like S0,S1...S4. > />>/ > />>/ Before changing from one state to another I want to know the > />>/ c

Re: [python-win32] How to find the current/last system state from Python

2012-07-03 Thread Tim Golden
On 03/07/2012 12:23, prashant padaganur wrote: > > I want to write an application that puts the system in to different > sleep states. Like S0,S1...S4. > > Before changing from one state to another I want to know the > current/previous sleep state. > > For Ex: If the current state is S0 then I

Re: [python-win32] How to find corresponding WMI/COM object for given Windows Registry key?

2012-06-25 Thread Tim Golden
On 23/06/2012 14:03, Radek Holý wrote: > I was advised to look at the ``MappingStrings`` qualifier. So far it > seems that the only way is to list ``MappingStrings`` qualifiers of > all properties. Ahem. That was embarrassing. It appears that I already knew about the MappingStrings qualifier, beca

Re: [python-win32] How to find corresponding WMI/COM object for given Windows Registry key?

2012-06-23 Thread Tim Golden
On 23/06/2012 14:03, Radek Holý wrote: 2012/6/18 Radek Holý : 2012/6/18 Tim Golden : On 18/06/2012 00:58, Radek Holý wrote: My question is probably poorly formulated. In fact -- as I discovered -- some WMI objects reflect their values in the Windows Registry keys (for example there is

Re: [python-win32] How to invoke Python program from Windows service?

2012-06-22 Thread Tim Golden
> Yeah, that was exactly my problem; I had no way to diagnose what was > going on, and needed a springboard to tell me what I needed to know > in order to figure out what was happening (or not). I could verify > that the script *worked*, since I could run it from a DOS prompt > without errors. Bu

Re: [python-win32] accessing Win32_Tpm()

2012-06-20 Thread Tim Golden
On 20/06/2012 13:01, prashant padaganur wrote: > Thanks to your tutorial on WMI I had tried this yesterday. I get the > following error when I try printing wmi.WMI ().Win32_Tpm. > - > Traceback (most recent call last): > File "C:/Users/ppadagax/Documents/Scripts/freshTpm.py", line 14, in

Re: [python-win32] accessing Win32_Tpm()

2012-06-20 Thread Tim Golden
On 20/06/2012 06:14, prashant padaganur wrote: > Hi, > > I am new to WMI. > > I have installed WMI for python and pywin32 extensions to be able to use > win32 apis from my python scripts. While I can get all the info from > other clasees like Win32_Battery, Win32_Processor I am having tough time

Re: [python-win32] How to find corresponding WMI/COM object for given Windows Registry key?

2012-06-17 Thread Tim Golden
On 18/06/2012 00:58, Radek Holý wrote: My question is probably poorly formulated. In fact -- as I discovered -- some WMI objects reflect their values in the Windows Registry keys (for example there is mapping “root\cimv2:Win32_OSRecoveryConfiguration.AutoReboot” in “HKEY_LOCAL_MACHINE\SYSTEM\Curr

Re: [python-win32] How to find corresponding WMI/COM object for given Windows Registry key?

2012-06-17 Thread Tim Golden
On 17/06/2012 20:34, Radek Holý wrote: Hello, I'm playing with pywin32 and wmi modules last week. During my experiments I found some attribute/method of some object (COMObject/_wmi_object) or its property which listed the Windows Registry key path which is set by the object. Don’t you know which

Re: [python-win32] BCD WMI modification via pywin32 without effect

2012-06-15 Thread Tim Golden
On 15/06/2012 22:55, Radek Holý wrote: 2012/6/15 Roger Upole: Looks like the parameters to SetIntegerElement are reversed: objWBM.Methods_('SetIntegerElement').InParameters.Properties_[0].Name 'Integer' objWBM.Methods_('SetIntegerElement').InParameters.Properties_[1].Name 'Type' If I switc

Re: [python-win32] win32com.adsi limits number of members returned

2012-06-15 Thread Tim Golden
On 15/06/2012 22:43, Matt LaPlante wrote: Using the following code... import win32com.adsi DNC=win32com.adsi.ADsGetObject('LDAP://rootDSE').Get('DefaultNamingContext') path = 'LDAP://cn=BIG_GROUP,ou=Groups,'+DNC groupobj = win32com.adsi.ADsGetObject(path) users = groupobj.member print len(users)

Re: [python-win32] BCD WMI modification via pywin32 without effect

2012-06-15 Thread Tim Golden
On 15/06/2012 21:14, Roger Upole wrote: Looks like the parameters to SetIntegerElement are reversed: objWBM.Methods_('SetIntegerElement').InParameters.Properties_[0].Name 'Integer' objWBM.Methods_('SetIntegerElement').InParameters.Properties_[1].Name 'Type' If I switch the call to success,

Re: [python-win32] BCD WMI modification via pywin32 without effect

2012-06-15 Thread Tim Golden
On 15/06/2012 08:53, Radek Holý wrote: > Hello, > > I’m trying to edit the BCD (Boot Configuration Data) using WMI in Python: Hmmm. I'd love to help you, but I'd need to set up a VM first so I don't screw up my Boot Configuration along the way! I notice one small line in the docs for BcdIntegerE

Re: [python-win32] Importing tempfile (or random) results in disaster...

2012-05-31 Thread Tim Golden
On 31/05/2012 14:40, Kevin Horn wrote: > I'm setting up a new machine (Win7) and one of the first things I > thought I'd do is install Python, distribute, pip, virtualenv, etc. > > However, I can't seem to get that far. > > When trying to install distribute (using distribute_setup.py), I get the

Re: [python-win32] Retrieve file property values

2012-05-28 Thread Tim Golden
On 27/05/2012 11:54, damien moloney wrote: > Hi, > > Have been unable to retrieve the windows file properties/attributes > under "Subject", and "Description". for .msi files on a Win XP c using > win32api. Have been able to get version type info, > but unable to get much more. I came across the fo

Re: [python-win32] A little help for a n00b, please

2012-05-06 Thread Tim Golden
On 06/05/2012 18:37, Alan Jump wrote: I entered it in the shell, being too lazy to write a separate script file. The response is the same: Traceback (most recent call last): File "", line 1, in pywintypes.error: (31, 'ShellExecute', 'A device attached to the system is not functioning.') So

Re: [python-win32] A little help for a n00b, please

2012-05-06 Thread Tim Golden
On 06/05/2012 18:07, Alan Jump wrote: Much obliged to both you and Vernon. I'm going to be adding quite a few code snippets to these emails, just to let the various search engines work their magic in case anyone besides me is running into the same problem. I tried a couple of the extended comman

Re: [python-win32] A little help for a n00b, please

2012-05-06 Thread Tim Golden
On 06/05/2012 02:24, Alan Jump wrote: Trying to massage an older package (not written by me) into functioning order. The issue I'm having is getting printing functionality to work. The code snippet in question: if platform.system() == 'Windows': try: import

Re: [python-win32] Win32api install problem

2012-04-30 Thread Tim Golden
On 30/04/2012 08:50, Mark Hammond wrote: > On 30/04/2012 5:42 PM, Tim Golden wrote: >> (I was just about to get in touch with Mark H and offer a patch but >> I won't have time to do the mechanics until this afternoon at the >> earliest...) > > Thanks for the clue

Re: [python-win32] Win32api install problem

2012-04-30 Thread Tim Golden
On 30/04/2012 08:03, Aravind Kamble wrote: > Hi All, > > I am trying to install pywin32-217 for the first time on my Windows 7 64 > bit machine. I have following installed on my machine, > > Python 2.7.3 > MS Windows SDK for Windows 7 (7.1) > Downloaded pywin32-217 from sourceforge > > > When I

Re: [python-win32] Bug in pywin32 PyIADs?

2012-04-22 Thread Tim Golden
except that a recent change to distutils has broken the pywin32 setup.py. So I'll have to dig into that first before I can rebuild pywin32 before I can retest my own module. I feel like I have a hole in my bucket :) TJG On 22/04/2012 19:38, Tim Golden wrote: On 22/04/2012

[python-win32] Bug in pywin32 PyIADs?

2012-04-22 Thread Tim Golden
Could someone glance at this to confirm that it does indeed seem to be a bug before I start hunting up the chain of function calls to spot the issue, please? Steps are simple: 1) Use Python 3.2 and pywin32 217 2) Use the following code (obviously substituting some suitable domain): from win32c

Re: [python-win32] WMI to find private memory usage

2012-04-13 Thread Tim Golden
On 13/04/2012 16:22, Riz Hossain wrote: > Hello, > > I am looking for a way to capture the private memory usage by a process > (the one that shows on task manager). I searched online a lot but I am > only seeing information on working memory size. It would be also a > great if I could get the pe

Re: [python-win32] writing DWORD values > 0x7ffffff

2012-03-26 Thread Tim Golden
On 26/03/2012 20:20, Tim Roberts wrote: dw = struct.unpack('l',struct.pack('L', 0x80102030))[0] Seconded: I've used almost exactly this incantation for various Windows-y things for a few years now. TJG ___ python-win32 mailing list python-win32@py

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 import win32net win32net.NetShareAdd ( "remote-server", 2, dict (netname="shared2", path="c:/shared-folder2" ) There-is-always-more-than-one-way-to-do-it-ly-yours TJG ___

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? import wmi remote = wmi.WMI ("remote-server") remote.Win32_Share.Create ( Path="c:/shared-folder", Name="myshare", Type=0 ) TJG ___ python-win32 mailing list pytho

Re: [python-win32] Getting Remote Share User Group Names and Permissions

2012-02-20 Thread Tim Golden
On 18/02/2012 23:22, Rod Person wrote: On Fri, 17 Feb 2012 20:20:09 + Tim Golden wrote: On 17/02/2012 18:26, Rod Person wrote: import win32security as win32s sd = win32s.GetFileSecurity(sh,win32security.GROUP_SECURITY_INFORMATION) Assuming that "sh" here is the name of of

Re: [python-win32] Getting Remote Share User Group Names and Permissions

2012-02-17 Thread Tim Golden
On 17/02/2012 18:26, Rod Person wrote: Hi, I'm trying to get a list of User Groups that have access to shares on a remote server. I am able to get a listing of all the shares on the server using wmi. This is the cloesest I got so far: import win32security as win32s sd = win32s.GetFileSecurity(

Re: [python-win32] remote machine file query

2012-02-14 Thread Tim Golden
On 13/02/2012 22:52, Trevor Rowland wrote: where self.c is a wmi.WMI() connection to a remote machine using my username and password (I am admin) why does the line below ALWAYS return an empty list ??? aFile = self.c.Win32_Directory(Name = "C:\\Users"): print aFile [] I have tried various permu

Re: [python-win32] Several, totally isolated Python interpreters in the same process

2011-12-20 Thread Tim Golden
On 19/12/2011 15:26, Thomas Heller wrote: I made an experiment that I wanted to share because it is imo kind of cool: I managed to embed a second Python interpreter in a Python process, with help of WinSxS (WinSxS is a Microsoft technology that allows to isolate plugins from other plugins, or fr

Re: [python-win32] rename computer

2011-12-19 Thread Tim Golden
On 19/12/2011 14:32, Tim Golden wrote: import wmi c = wmi.WMI () for system in c.Win32_ComputerSystem (): system.Rename ("NEW-NAME", "TIM", "PASSWORD") For the record, the OP reported in private email that thi

Re: [python-win32] rename computer

2011-12-19 Thread Tim Golden
On 19/12/2011 14:20, cd wrote: import wmi c = wmi.WMI().Win32_ComputerSystem computer = c()[0] for propertyName in sorted( list( c.properties ) ): if propertyName == 'Name': print setattr( computer, propertyName, 'newname' ) Ah. I'm afraid, good as WMI is, it's not that good. You need to invok

Re: [python-win32] rename computer

2011-12-19 Thread Tim Golden
On 19/12/2011 11:57, cd wrote: hello I didn't find any example of howto rename a windows computer with python ? i've tried with wmi unsuccessfully What did you try with WMI, and what happened? TJG ___ python-win32 mailing list python-win32@pyth

Re: [python-win32] [Tutor] Handling a Unicode Return using Pyodbc

2011-11-15 Thread Tim Golden
On 15/11/2011 15:37, Tim Golden wrote: [cc-ing back to the list in case other readers find it helpful...] ... which they won't because I should have cc-ed the python tutor list. Sorry, python-win32! TJG ___ python-win32 mailing list python-

Re: [python-win32] [Tutor] Handling a Unicode Return using Pyodbc

2011-11-15 Thread Tim Golden
[cc-ing back to the list in case other readers find it helpful...] On 15/11/2011 15:16, Tony Pelletier wrote: Thanks, Tim! This is working brilliantly Slow, but working..:) I can go from here and see if there's a way to speed it up. Well you've got a few options, although an amount depen

Re: [python-win32] Accessing a Remote Registry....

2011-09-22 Thread Tim Golden
Not that it isn't a useful answer, but the original question was posed back in April 2008! http://mail.python.org/pipermail/python-win32/2008-April/007327.html TJG On 22/09/2011 12:54, kirancnair wrote: You can do something like this: import _winreg import wmi c = wmi.WMI(computer="XXX.XX

Re: [python-win32] WMI Win32_LoggedOnUser help

2011-09-02 Thread Tim Golden
On 02/09/2011 13:33, Rod Person wrote: Hi, I've been experimenting with the wmi module and so far everything is working great, but I'm having an issue with the Win32_LoggedOnUser class. I can seem to access it's properties. When I run the code in debug I can see the information I want is being s

Re: [python-win32] checking file permission on network share

2011-09-02 Thread Tim Golden
On 02/09/2011 10:58, Tim Golden wrote: filename = r"c:\windows\system32\drivers\etc\hosts", win32file.CreateFile ( ntsecuritycon.FILE_GENERIC_WRITE, 0, ## exclusive write None, win32con.OPEN_ALWAYS, 0, None ) Just noticed that my code is unnecessarily trying to get an exclusive

Re: [python-win32] checking file permission on network share

2011-09-02 Thread Tim Golden
On 31/08/2011 13:38, Steffen Frömer wrote: i try to check, if a file on network-share is read only. I tried different ways. What you're checking is the readonly attribute (which has been there since DOS version x.0). If that is what you intended to check, then I don't think I can offer anything

Re: [python-win32] AppData directory on Windows?

2011-09-01 Thread Tim Golden
On 01/09/2011 15:04, Werner F. Bruhin wrote: On 09/01/2011 02:49 PM, Tim Golden wrote: On 01/09/2011 13:39, Kevin Walzer wrote: Hi, I’m getting feedback from a Windows user that says my Tkinter app won’t write data to an app temporary directory. Here’s my code: sys.stderr=open(os.path.join

Re: [python-win32] AppData directory on Windows?

2011-09-01 Thread Tim Golden
On 01/09/2011 13:39, Kevin Walzer wrote: Hi, I’m getting feedback from a Windows user that says my Tkinter app won’t write data to an app temporary directory. Here’s my code: sys.stderr=open(os.path.join(os.path.expanduser('~'), 'Application Data', 'QuickWho', 'QuickWho_errors.txt'), 'w') This

Re: [python-win32] Issue with inserting Microsoft Excel charts into Word

2011-08-26 Thread Tim Golden
On 25/08/2011 17:50, Tom wrote: Hello all, I am writing a reporting application that uses word's COM interface. I recently found myself needing to insert a chart into the document, and the "AddChart" method seemed ideal (http://msdn.microsoft.com/en-us/library/bb226069(v=office.12).aspx). The cod

  1   2   3   4   5   6   7   >