From davidc at enthought.com Tue Apr 1 00:43:11 2014 From: davidc at enthought.com (David Cournapeau) Date: Mon, 31 Mar 2014 23:43:11 +0100 Subject: [python-win32] pywin32, virtual environments and com dlls Message-ID: Hi, By default, when pywin32 is installed from the .exe, the *com dlls are instsalled in %WINDOWSDIR%. If the exe is installed in a virtualenv, they are installed in the virtualenv itself, and nothing gets written in %WINDOWSDIR%. Is there any consequence in putting those dlls outside %WINDOWSDIR% ? And is it ok to have multiple parallel installs of pywin32 (each in its own virtualenv) without causing trouble ? thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From skippy.hammond at gmail.com Tue Apr 1 05:35:40 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Tue, 01 Apr 2014 14:35:40 +1100 Subject: [python-win32] pywin32, virtual environments and com dlls In-Reply-To: References: Message-ID: <533A340C.4060101@gmail.com> On 1/04/2014 9:43 AM, David Cournapeau wrote: > Hi, > > By default, when pywin32 is installed from the .exe, the *com dlls are > instsalled in %WINDOWSDIR%. If the exe is installed in a virtualenv, > they are installed in the virtualenv itself, and nothing gets written in > %WINDOWSDIR%. > > Is there any consequence in putting those dlls outside %WINDOWSDIR% ? > And is it ok to have multiple parallel installs of pywin32 (each in its > own virtualenv) without causing trouble ? So long as you don't implement COM objects using Python, things should be fine. Simply using COM objects shouldn't cause a problem. HTH, Mark From skippy.hammond at gmail.com Tue Apr 1 06:17:39 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Tue, 01 Apr 2014 15:17:39 +1100 Subject: [python-win32] Pythonwin IDE hangs on tool menu edits -and workaround In-Reply-To: <53390841.8060902@spatialmedia.com> References: <53390841.8060902@spatialmedia.com> Message-ID: <533A3DE3.1050502@gmail.com> On 31/03/2014 5:16 PM, Peter Fraser wrote: > Hello Pywinonauts > > Pythonwin (pywin32 build218 python 2.7.6) is hanging after I edit the > tools menu (or rather; whenever I go to the "Tools menu" tab of > "PythonWin Options" and hit OK -I don't need to actually edit anything > to provoke the problem) > > It seems that ToolMenuPropPage.OnOK gets into an endless loop -because > it expects self.listControl.GetItemText(itemLook, 0) to raise > win32ui.error when it runs out of items *but* GetItemText is happily > returning zero length strings in this case. > > As a workaround I have added... > > if not self.listControl.GetItemText(itemLook, 0):break > > ..to toolmenu.py above the line... > > items.append( ( self.listControl.GetItemText(itemLook, 0), > self.listControl.GetItemText(itemLook, 1) ) ) > > > An older PythonWin (pywin32 build214 python 2.6.6) does not have the > problem -but I wonder if the difference that makes a difference is > particular to my machine. I tried deleting everything under under > "HKEY_CURRENT_USER\Software\Python 2.7\Python for Win32\Tools Menu" but > it made no difference. > > Is it just my machine (surely everyone else in the world can edit the > tools menu ok)? > > Am I missing something about GetItemText perhaps? heh - you are correct - that hangs for me too. I can't see why this would have changed, so I just implemented your fix. It will be in the next pywin32 build. Thanks! Mark From joss.gray at d3technologies.com Tue Apr 1 12:52:18 2014 From: joss.gray at d3technologies.com (Joss Gray) Date: Tue, 1 Apr 2014 11:52:18 +0100 Subject: [python-win32] pythoncom error -2147180508. What is it? Message-ID: 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 calls start failing with an error -2147180508 ( 0x8004A024 ). I can't find any reference to this error anywhere in the COM Error Codes documentation here http://msdn.microsoft.com/en-us/library/windows/desktop/dd542642(v=vs.85).aspx Has anyone observed anything similar? *Joss Gray* d3 Operator/Technician *d3 Technologies.* T. +44 20 7234 9840 M. +44 7969 542 844 d3technologies.com ************************************************************************************************** CONFIDENTIALITY NOTICE The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed, and may also be privileged. If you are not the addressee of this e-mail you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error, please e-mail the sender by replying to this message. It is your responsibility to carry out appropriate virus and other checks to ensure that this message and any attachments do not affect your systems / data. Any views or opinions expressed in this e-mail are solely those of the author and do not necessarily represent those of d3 Technologies unless specifically stated, nor does this message form any part of any contract unless so stated. ************************************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at timgolden.me.uk Tue Apr 1 13:23:52 2014 From: mail at timgolden.me.uk (Tim Golden) Date: Tue, 01 Apr 2014 12:23:52 +0100 Subject: [python-win32] pythoncom error -2147180508. What is it? In-Reply-To: References: Message-ID: <533AA1C8.5060906@timgolden.me.uk> 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 calls start failing with an > error -2147180508 ( 0x8004A024 ). I can't find any reference to this > error anywhere in the COM Error Codes documentation > here http://msdn.microsoft.com/en-us/library/windows/desktop/dd542642(v=vs.85).aspx > > Has anyone observed anything similar? No, but this looks relevant: http://support.microsoft.com/kb/2530185 TJG From rodperson at rodperson.com Tue Apr 1 13:22:32 2014 From: rodperson at rodperson.com (Rod Person) Date: Tue, 01 Apr 2014 07:22:32 -0400 Subject: [python-win32] pythoncom error -2147180508. What is it? In-Reply-To: References: Message-ID: <533AA178.5050806@rodperson.com> On 04/01/2014 6:52 AM, 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 calls start failing with an > error -2147180508 ( 0x8004A024 ). I can't find any reference to this > error anywhere in the COM Error Codes documentation here > http://msdn.microsoft.com/en-us/library/windows/desktop/dd542642(v=vs.85).aspx > > > Has anyone observed anything similar? Quickly, searching duckduck go for - COM ERROR-2147180508, seems to point to some kind of MDT error with the network adapter, although I don't know what MDT stands for in this case. -- Rod So little pains do the vulgar take in the investigation of truth, accepting readily the first story that comes to hand. -Thucydides History of The Peloponnesian War, 432BC From joss.gray at d3technologies.com Tue Apr 1 13:46:18 2014 From: joss.gray at d3technologies.com (Joss Gray) Date: Tue, 1 Apr 2014 12:46:18 +0100 Subject: [python-win32] pythoncom error -2147180508. What is it? In-Reply-To: <533AA178.5050806@rodperson.com> References: <533AA178.5050806@rodperson.com> Message-ID: Thanks, for some reason I couldn't find anything with google. Turns out it is a bug with windows, hotfix here http://support.microsoft.com/kb/2530185 Thanks. *Joss Gray* d3 Operator/Technician *d3 Technologies.* T. +44 20 7234 9840 M. +44 7969 542 844 d3technologies.com ************************************************************************************************** CONFIDENTIALITY NOTICE The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed, and may also be privileged. If you are not the addressee of this e-mail you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error, please e-mail the sender by replying to this message. It is your responsibility to carry out appropriate virus and other checks to ensure that this message and any attachments do not affect your systems / data. Any views or opinions expressed in this e-mail are solely those of the author and do not necessarily represent those of d3 Technologies unless specifically stated, nor does this message form any part of any contract unless so stated. ************************************************************************************************** On 1 April 2014 12:22, Rod Person wrote: > On 04/01/2014 6:52 AM, 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 calls start failing with an error - >> 2147180508 ( 0x8004A024 ). I can't find any reference to this error >> anywhere in the COM Error Codes documentation here >> http://msdn.microsoft.com/en-us/library/windows/desktop/ >> dd542642(v=vs.85).aspx > us/library/windows/desktop/dd542642%28v=vs.85%29.aspx> >> >> >> Has anyone observed anything similar? >> > > Quickly, searching duckduck go for - COM ERROR-2147180508, seems to point > to some kind of MDT error with the network adapter, although I don't know > what MDT stands for in this case. > > -- > Rod > > So little pains do the vulgar take in the investigation of truth, > accepting readily the first story that comes to hand. > -Thucydides > History of The Peloponnesian War, 432BC > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From accessnewbie at gmail.com Tue Apr 1 18:25:36 2014 From: accessnewbie at gmail.com (Access Newbie) Date: Tue, 1 Apr 2014 09:25:36 -0700 Subject: [python-win32] Write excel 2007 table to specific location in a word document using python 2.7.5 Message-ID: I posted the following question on stackoverflow but do not seriously think I will get any answers to the question and was hoping that one of you may know if what I want to do is even possible and if so, will a novice like me be able to do it; and most importantly, how to do it, at least conceptually. I have a series of data requests that I partially automate through ArcGIS and python scripting. The only hurdle I am really struggling with is how to get the excel tables into the word document. Right now I can run the analyses, format the results into paragraphs with the text that I want, and output the maps in pdf format. The pywin32 package has allowed me to execute the excel macros that import the dbf files, reformat the data in the tabular format I want, and export out to an xlsx workbook. To have the process completely automated, I would need to also load the excel tables into the word document. This is where I am at a complete loss. I haven't a clue as to where to even start to accomplish this. Could you please take a quick look at my post and let me know if this is doable, and if so, point me in the right direction as to how to accomplish this? The files I created to run the sample program are 4 very small files if anyone would like me to forward them to look at. A trillion thanks. Claudine. My posted link: http://stackoverflow.com/questions/22772929/write-excel-2007-table-to-specific-location-in-a-word-document-using-python-2-7 -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Apr 2 20:01:36 2014 From: timr at probo.com (Tim Roberts) Date: Wed, 2 Apr 2014 11:01:36 -0700 Subject: [python-win32] Write excel 2007 table to specific location in a word document using python 2.7.5 In-Reply-To: References: Message-ID: <533C5080.9@probo.com> Access Newbie wrote: > > I have a series of data requests that I partially automate through > ArcGIS and python scripting. The only hurdle I am really struggling > with is how to get the excel tables into the word document. Right now > I can run the analyses, format the results into paragraphs with the > text that I want, and output the maps in pdf format. The pywin32 > package has allowed me to execute the excel macros that import the dbf > files, reformat the data in the tabular format I want, and export out > to an xlsx workbook. To have the process completely automated, I > would need to also load the excel tables into the word document. This > is where I am at a complete loss. I haven't a clue as to where to even > start to accomplish this. Could you please take a quick look at my > post and let me know if this is doable, and if so, point me in the > right direction as to how to accomplish this? > There are a couple of options. None of them are particularly easy. You probably have some frustrating experimentation coming up. The easiest option, if your data does not have to be "live", is to convert the Excel cells to a Word table. A table is just another Word object, like a paragraph or a word. You can figure out the APIs to insert the table and update the cells. If the Excel data needs to be "live", so that the Word document updates automatically when you change the spreadsheet, then you are into the world of OLE -- Object Linking and Embedding. You would need to embed the hooks to the Excel spreadsheet into the Word document. To do that, you'll need to add a ChartData object to the InlineShapes collection in the ActiveDocument. I have never done this, although here is an example in VBA that might get you started: http://msdn.microsoft.com/en-us/library/office/ff821389.aspx -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From accessnewbie at gmail.com Wed Apr 2 21:06:11 2014 From: accessnewbie at gmail.com (Access Newbie) Date: Wed, 2 Apr 2014 12:06:11 -0700 Subject: [python-win32] Calling macro from python script bombs out when custom table style is used Message-ID: Posted the link below to stackoverflow but on reflection think this may be the better place to search for the answer. Until I figure out the code to copy my excel tables (up to 4 depending on analyses results) to the word document (not live link) I would at least like to automate the excel tables so I just have to copy and paste them into the word document without formatting it in excel first. I know I could just run the macro upon opening the excel file, but I'd rather do it from python, if not too complex. http://stackoverflow.com/questions/22818131/calling-macro-from-python-script-bombs-out-when-custom-table-style-is-used Thanks in advance. Also, I noticed in the archived section that my previous question was answered but I don't know how to respond to it since I am not receiving the questions/answers. I just signed up yesterday. Did I miss some important step to have more interactive access to the mailing list or did my question get posted faster than my name added to the mailings? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rupole at hotmail.com Thu Apr 3 13:51:47 2014 From: rupole at hotmail.com (Roger Upole) Date: Thu, 3 Apr 2014 07:51:47 -0400 Subject: [python-win32] python 3.4 and pywin32 References: Message-ID: It appears that pywintypes34.dll won't be loaded automatically when it's copied beside python.exe, but will load when copied to system32. May be due to python using the flag LOAD_WITH_ALTERED_SEARCH_PATH when loading pyd's, but it will take some more study of the MSDN docs for LoadLibraryEx. I think this is related to the issue where the post-install script (which copies pywintypes to one or the other) sometimes fails. Usually you can just rerun the postinstall, however if not rerun with administrative privs it copies pywintypes to the root of the python install, and it can't be loaded when you first import another module that links to it. Roger "Vernon D. Cole" wrote in message news:CAH-ZgAfxzVxXSTryxtyLBYT3dAswsJ9XZH8Nk4PE_MR55LsLCA at mail.gmail.com... > So why is _mine_ broken, too? What exactly did you clean up? > > > > On Mon, Mar 24, 2014 at 10:38 AM, Thomas Heller wrote: > >> Am 21.03.2014 21:22, schrieb Thomas Heller: >> >> [this has also been sent to the python-dev mailing list] >>> >>> With python 3.4 and pywin32 version 218 it is only possible >>> to import win32com or win32api when pywintypes has been imported before. >>> >> >> False alarm: after cleaning everything up and installing again this >> works now. Sorry for the noise. >> >> >> Thomas >> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 >> > -------------------------------------------------------------------------------- > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > From calderon.christian760 at gmail.com Tue Apr 8 21:27:12 2014 From: calderon.christian760 at gmail.com (Christian Calderon) Date: Tue, 08 Apr 2014 12:27:12 -0700 Subject: [python-win32] PyWin32 on windows 7 with 64-bit Python 3.4 Message-ID: <53444D90.4050708@gmail.com> I am trying to use the admin script found at http://stackoverflow.com/questions/19672352/ . So I installed pywin32 using the binary named pywin32-218.win-amd64-py3.4.exe from the sourceforge site, opened a python3.4 interpreter, and tried to import win32api. I got an ImportError saying the module couldn't be found. I imported win32, and looked at the output of help(win32), and win32api is listed as a submodule. But when I tried import win32 and then import win32.win32api, I get the same error. If I do "from win32 import *" and then I look at the output of globals(), I don't see anything listed in the output of "help(win32)" . Can somebody help me get this working? I also tried installing from the similarly named binary at http://www.lfd.uci.edu/~gohlke/pythonlibs/ but got the same results. From Ron at FascinatingElectronics.com Wed Apr 9 00:13:01 2014 From: Ron at FascinatingElectronics.com (Ron Jackson) Date: Tue, 8 Apr 2014 15:13:01 -0700 Subject: [python-win32] How to get access to SetupCopyOEMInf() through python-win32, or maybe use PnPUtil? Message-ID: I would like to write a python program to install a driver inf file in Windows. The information I have seen suggests that this would best be done using SetupCopyOEMInf(). http://msdn.microsoft.com/en-us/library/aa376990%28v=VS.85%29.aspx Is SetupCopyOEMInf() accessible through python-win32? It looks like the PnPUtil command might provide an alternative way to install the inf file. http://msdn.microsoft.com/en-us/library/ff550423%28v=vs.85%29.aspx The inf file I want to install is for a USB Communications Device Class gadget, and with the inf file installed it properly enumerates as a communications port. Has anyone installed an inf file in Windows through a python program? --Ron -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Apr 9 19:04:42 2014 From: timr at probo.com (Tim Roberts) Date: Wed, 9 Apr 2014 10:04:42 -0700 Subject: [python-win32] How to get access to SetupCopyOEMInf() through python-win32, or maybe use PnPUtil? In-Reply-To: References: Message-ID: <53457DAA.5020007@probo.com> Ron Jackson wrote: > I would like to write a python program to install a driver inf file in > Windows. The information I have seen suggests that this would best be > done using SetupCopyOEMInf(). > > Is SetupCopyOEMInf() accessible through python-win32? > > It looks like the PnPUtil command might provide an alternative way to > install the inf file. > > > The inf file I want to install is for a USB Communications Device > Class gadget, and with the inf file installed it properly enumerates > as a communications port. > > Has anyone installed an inf file in Windows through a python program? There's more to it than that. What you want to do is have your driver package installed to the "driver store". That way, Device Manager can find the package automatically when the device appears. It is possible to use "pnputil -i -a xxx.inf" to do that, and you should try that on a virgin system to see if it works for you, but in most cases it's better to use DPInst. That is is a tool that ships in the WDK that is designed for pre-installing driver packages. You put DPInst.exe in the same directory as the CAT, INF, and SYS files, then run "DPInst /lm". You can use a short XML directive file to customize its behavior. REMEMBER that you need different drivers on 32-bit and 64-bit systems. It's possible to make a single driver package that includes both, but many vendors supply a different package for each, because Microsoft is preferring that. If you do with DPInst, you need to use the matching bittedness for it as well. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mallard.pierre at gmail.com Sun Apr 13 18:48:21 2014 From: mallard.pierre at gmail.com (Pierre Mallard) Date: Sun, 13 Apr 2014 18:48:21 +0200 Subject: [python-win32] Could not load excelAddin demos Message-ID: Hello, I'm running on Windows8.1 64 bits, Excell 2013, Python 3.4 and pywin32-218.win-amd64-py3.4 That might be a newbee question but I'm running out of idea to fix this : First I ran makepy.py for both excel library and office and have been able to use excel interface as a com client in python. Next I have run C:\Python34\Lib\site-packages\win32com\demos\excelAddin.py to register excelAddin demo (as an administrator). Everything seems to be ok but when I open Excel I see that addin is set to inactive by excel. I also attempt to use the --debug option together with the pythonwin trace collector but nothing came up. Can anyone give me some advice on what I could do to make things work ? Do you know how I can debug addin load in excel ? Thanks a lot for your help Pierre From mc at mclaveau.com Mon Apr 14 07:40:26 2014 From: mc at mclaveau.com (mc@mclaveau) Date: Mon, 14 Apr 2014 07:40:26 +0200 Subject: [python-win32] Could not load excelAddin demos In-Reply-To: References: Message-ID: <534B74CA.7040800@mclaveau.com> Bonjour ! Il s'agit d'un probl?me avec les param?tres de s?curit? d'Office et de Windows 8(.1) V?rifier aussi si la mise en place de l'add-in n'aurait pas ?t? faite "en tant qu'Administrateur" et utilis? avec un compte autre. @-salutations -- Michel Claveau Le 13.04.14 18:48, Pierre Mallard a ?crit : > Hello, > > I'm running on Windows8.1 64 bits, Excell 2013, Python 3.4 and > pywin32-218.win-amd64-py3.4 > > That might be a newbee question but I'm running out of idea to fix this : > > First I ran makepy.py for both excel library and office and have been > able to use excel interface as a com client in python. > > Next I have run > C:\Python34\Lib\site-packages\win32com\demos\excelAddin.py to register > excelAddin demo (as an administrator). > > Everything seems to be ok but when I open Excel I see that addin is > set to inactive by excel. > > I also attempt to use the --debug option together with the pythonwin > trace collector but nothing came up. > > Can anyone give me some advice on what I could do to make things work > ? Do you know how I can debug addin load in excel ? > > Thanks a lot for your help > > Pierre > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 From mallard.pierre at gmail.com Mon Apr 14 09:46:52 2014 From: mallard.pierre at gmail.com (Pierre Mallard) Date: Mon, 14 Apr 2014 09:46:52 +0200 Subject: [python-win32] Could not load excelAddin demos In-Reply-To: <534B74CA.7040800@mclaveau.com> References: <534B74CA.7040800@mclaveau.com> Message-ID: Hello and thanks for your response Michel. As you stated I did install addIn as Administrator (I ran cmd as Administrator). I unregister as an admin and re-install addIn as a normal user (note that still it ask to raise priviledge, I guess it is for registry edition) Still PlugIn is automatically disabled when I open Excel. In Trust Center (Gestion de la confidentialit?) the check box for requiring trusted AddIn (Exiger la signature etc etc) is unchecked I'm not a windows developper but I guess they must be someway to have more information on why excel inactivate excelAddIn ... Any idea ? Thanks a lot, Pierre Mallard On Mon, Apr 14, 2014 at 7:40 AM, mc at mclaveau wrote: > Bonjour ! > > Il s'agit d'un probl?me avec les param?tres de s?curit? d'Office et de > Windows 8(.1) > V?rifier aussi si la mise en place de l'add-in n'aurait pas ?t? faite "en > tant qu'Administrateur" et utilis? avec un compte autre. > > @-salutations > -- > Michel Claveau > > > Le 13.04.14 18:48, Pierre Mallard a ?crit : >> >> Hello, >> >> I'm running on Windows8.1 64 bits, Excell 2013, Python 3.4 and >> pywin32-218.win-amd64-py3.4 >> >> That might be a newbee question but I'm running out of idea to fix this : >> >> First I ran makepy.py for both excel library and office and have been >> able to use excel interface as a com client in python. >> >> Next I have run >> C:\Python34\Lib\site-packages\win32com\demos\excelAddin.py to register >> excelAddin demo (as an administrator). >> >> Everything seems to be ok but when I open Excel I see that addin is >> set to inactive by excel. >> >> I also attempt to use the --debug option together with the pythonwin >> trace collector but nothing came up. >> >> Can anyone give me some advice on what I could do to make things work >> ? Do you know how I can debug addin load in excel ? >> >> Thanks a lot for your help >> >> Pierre >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 From alessandro.zanni at bt.com Mon Apr 14 10:08:07 2014 From: alessandro.zanni at bt.com (alessandro.zanni at bt.com) Date: Mon, 14 Apr 2014 09:08:07 +0100 Subject: [python-win32] Credential Manager "CredEnumerate" Message-ID: Hi guys, I'm working on a Windows project in Python and I have some questions concerning the windows credentials manager.The function "CredEnumerate" of the "win32cred" lib works really well to retrieve the credentials manager on Windows 7. But as you know, the way to retrieve the credential manager items changed from Windows 7 to 8. Do you know if there is another way in Python to do so ? Have a great day. Alessandro From iceblink at chello.nl Mon Apr 14 11:55:57 2014 From: iceblink at chello.nl (iceblink) Date: Mon, 14 Apr 2014 11:55:57 +0200 Subject: [python-win32] Could not load excelAddin demos In-Reply-To: <534B74CA.7040800@mclaveau.com> References: <534B74CA.7040800@mclaveau.com> Message-ID: <847426dd204b1e994e2d4db4c271311a@pro.dohd.org> Still waiting for a kickstarter campaign for a universal translator ;-) On 2014-04-14 07:40, mc at mclaveau wrote: > Hello! > > There is a problem with the parameters of Office security and Windows > 8 (.1) > Also check if the installation of the add-in was not made ??"as > Administrator" and used with another account. > > @-salutations > - > Michel Claveau > > > Le 13.04.14 18:48, Pierre Mallard a ?crit : >> Hello, >> >> I'm running on Windows8.1 64 bits, Excell 2013, Python 3.4 and >> pywin32-218.win-amd64-py3.4 >> >> That might be a newbee question but I'm running out of idea to fix >> this : >> >> First I ran makepy.py for both excel library and office and have >> been >> able to use excel interface as a com client in python. >> >> Next I have run >> C:\Python34\Lib\site-packages\win32com\demos\excelAddin.py to >> register >> excelAddin demo (as an administrator). >> >> Everything seems to be ok but when I open Excel I see that addin is >> set to inactive by excel. >> >> I also attempt to use the --debug option together with the pythonwin >> trace collector but nothing came up. >> >> Can anyone give me some advice on what I could do to make things >> work >> ? Do you know how I can debug addin load in excel ? >> >> Thanks a lot for your help >> >> Pierre >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 From mallard.pierre at gmail.com Mon Apr 14 13:09:22 2014 From: mallard.pierre at gmail.com (Pierre Mallard) Date: Mon, 14 Apr 2014 13:09:22 +0200 Subject: [python-win32] Could not load excelAddin demos In-Reply-To: References: <534B74CA.7040800@mclaveau.com> Message-ID: Using process Monitor I have been able to trace Excel calls to registry. I found that it wasn't looking for InProcServer32 entry but rather InProcHandler32 10:19:15,8501900 EXCEL.EXE 7416 RegOpenKey HKCR\CLSID\{C5482ECA-F559-45A0-B078-B2036E6F011A}\InprocHandler32 NAME NOT FOUND Desired Access: Maximum Allowed 10:19:15,8502050 EXCEL.EXE 7416 RegQueryKey HKCR\CLSID\{C5482ECA-F559-45A0-B078-B2036E6F011A} SUCCESS Query: HandleTags, HandleTags: 0x100 By moving keyNameRoot to \\Wow6432\\CLSID instead of \\CLSID it does correctly check for InProcServer32 However Excel failed trying to load pythoncom34.dll located in c:\Windows\System32 since it wasn't looking there I explictly update registry InProcServer32 entry to point to c:\windows\system32\pythoncom34.dll Excell first detects library but upon a second attempt (maybe first was just a check ?) it restrain its library search path to itself and WoW64 library .... I moved finally c:\windows\system32\pythoncom34.dll to c:\windows\wow64\. Library is found now but still Excel revert LoadBehavior registry key to 2 (i.e.set addin as inactive). What I guess is that there are something wrong around 32 vs 64 bits Any help appreciated :=D Pierre On Mon, Apr 14, 2014 at 9:46 AM, Pierre Mallard wrote: > Hello and thanks for your response Michel. > > As you stated I did install addIn as Administrator (I ran cmd as Administrator). > I unregister as an admin and re-install addIn as a normal user (note > that still it ask to raise priviledge, I guess it is for registry > edition) > Still PlugIn is automatically disabled when I open Excel. > In Trust Center (Gestion de la confidentialit?) the check box for > requiring trusted AddIn (Exiger la signature etc etc) is unchecked > > I'm not a windows developper but I guess they must be someway to have > more information on why excel inactivate excelAddIn ... > Any idea ? > > Thanks a lot, > > Pierre Mallard > > On Mon, Apr 14, 2014 at 7:40 AM, mc at mclaveau wrote: >> Bonjour ! >> >> Il s'agit d'un probl?me avec les param?tres de s?curit? d'Office et de >> Windows 8(.1) >> V?rifier aussi si la mise en place de l'add-in n'aurait pas ?t? faite "en >> tant qu'Administrateur" et utilis? avec un compte autre. >> >> @-salutations >> -- >> Michel Claveau >> >> >> Le 13.04.14 18:48, Pierre Mallard a ?crit : >>> >>> Hello, >>> >>> I'm running on Windows8.1 64 bits, Excell 2013, Python 3.4 and >>> pywin32-218.win-amd64-py3.4 >>> >>> That might be a newbee question but I'm running out of idea to fix this : >>> >>> First I ran makepy.py for both excel library and office and have been >>> able to use excel interface as a com client in python. >>> >>> Next I have run >>> C:\Python34\Lib\site-packages\win32com\demos\excelAddin.py to register >>> excelAddin demo (as an administrator). >>> >>> Everything seems to be ok but when I open Excel I see that addin is >>> set to inactive by excel. >>> >>> I also attempt to use the --debug option together with the pythonwin >>> trace collector but nothing came up. >>> >>> Can anyone give me some advice on what I could do to make things work >>> ? Do you know how I can debug addin load in excel ? >>> >>> Thanks a lot for your help >>> >>> Pierre >>> _______________________________________________ >>> python-win32 mailing list >>> python-win32 at python.org >>> https://mail.python.org/mailman/listinfo/python-win32 >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 From timr at probo.com Mon Apr 14 21:03:04 2014 From: timr at probo.com (Tim Roberts) Date: Mon, 14 Apr 2014 12:03:04 -0700 Subject: [python-win32] Credential Manager "CredEnumerate" In-Reply-To: References: Message-ID: <534C30E8.3040201@probo.com> alessandro.zanni at bt.com wrote: > I'm working on a Windows project in Python and I have some questions concerning the windows credentials manager.The function "CredEnumerate" of the "win32cred" lib works really well to retrieve the credentials manager on Windows 7. But as you know, the way to retrieve the credential manager items changed from Windows 7 to 8. I'm a little bit amused by your very polite "as you know" statement, because I strongly suspect that no one on this list DID know it. I'm deeply into Windows -- I write Windows drivers for a living -- and I did not know this had changed. What is the new way? MSDN doesn't mention any replacement. > Do you know if there is another way in Python to do so ? Any Windows DLL that does not already have a win32 wrapper can be called using ctypes. It's a little bit tedious, but it's incredibly flexible. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From alessandro.zanni at bt.com Tue Apr 15 10:18:14 2014 From: alessandro.zanni at bt.com (alessandro.zanni at bt.com) Date: Tue, 15 Apr 2014 09:18:14 +0100 Subject: [python-win32] Credential Manager "CredEnumerate" In-Reply-To: <534C30E8.3040201@probo.com> References: , <534C30E8.3040201@probo.com> Message-ID: Hi, First, thank you Tim for your response. In Windows 7 "CredEnumerate" enumerates the credential manager of the current user (except those having the flag: CRED_TYPE_DOMAIN_PASSWORD). However, in Windows 8 this function doesn't work. The mimikatz tool did it very well (I tried on Win7 and Win8 and it works well). When we saw the source code in C, it is possible to see that the function used to retrieve it are the same ("VaultGetItem"), but the structure not (there is a difference between PVAULTGETITEM7 and PVAULTGETITEM8). I know that it is possible to use ctype and a wrapper to call C functions. However, I wanted to know if there was a easier way to do it. Thank you for your help. Have a great day. Alessandro ________________________________________ De : python-win32 [python-win32-bounces+alessandro.zanni=bt.com at python.org] de la part de Tim Roberts [timr at probo.com] Date d'envoi : lundi 14 avril 2014 21:03 ? : Python-Win32 List Objet : Re: [python-win32] Credential Manager "CredEnumerate" alessandro.zanni at bt.com wrote: > I'm working on a Windows project in Python and I have some questions concerning the windows credentials manager.The function "CredEnumerate" of the "win32cred" lib works really well to retrieve the credentials manager on Windows 7. But as you know, the way to retrieve the credential manager items changed from Windows 7 to 8. I'm a little bit amused by your very polite "as you know" statement, because I strongly suspect that no one on this list DID know it. I'm deeply into Windows -- I write Windows drivers for a living -- and I did not know this had changed. What is the new way? MSDN doesn't mention any replacement. > Do you know if there is another way in Python to do so ? Any Windows DLL that does not already have a win32 wrapper can be called using ctypes. It's a little bit tedious, but it's incredibly flexible. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32 at python.org https://mail.python.org/mailman/listinfo/python-win32 From lukaszj at onet.pl Tue Apr 15 19:17:39 2014 From: lukaszj at onet.pl (=?iso-8859-2?B?o3VrYXN6IEpha3Vib3dza2k=?=) Date: Tue, 15 Apr 2014 19:17:39 +0200 Subject: [python-win32] Global ActiveScripting object not visible Message-ID: Hello, I have a problem with a file manager called Directory Opus 11. It supports ActiveScripting languages, but in case of python, its global objects are not visible in global namespace. Python packages (python-3.4.0, pywin32-218.win32-py3.4) seem to be installed correctly (fe. WScript object is visible in .pys scripts), and ActiveScripting engine is actually called by Directory Opus. Where should I start debugging? Are there some possible flags not set or attributes not presented by the Directory Opus objects that could be checked? Any namespaces to be searched? The exact error message is as follows: DOpus.OpenOutputWindow() ^ Traceback (most recent call last): File "