Re: WMI in Python

2010-09-14 Thread bli
On Sep 14, 7:46 am, KING LABS  wrote:
> On Sep 14, 10:39 am, KING LABS  wrote:
>
>
>
>
>
>
>
>
>
> > On Sep 13, 8:31 pm, Jerry Hill  wrote:
>
> > > On Mon, Sep 13, 2010 at 8:45 AM, KING LABS  wrote:
> > > > Hi All,
>
> > > > I am new to programming and python, Being a system administrator I
> > > > have chose Inventory (Software & Hardware ) as my first project.
>
> > > You'll probably want to look at the python WMI 
> > > module:http://timgolden.me.uk/python/wmi/index.html
>
> > > as well as the pywin32 module:http://sourceforge.net/projects/pywin32/
>
> > > IIRC, there's been quite a bit of discussion about inventorying
> > > installed software on the pywin32 mailing 
> > > list:http://mail.python.org/mailman/listinfo/python-win32
>
> > > --
> > > Jerry
>
> > Thank you all, I will go through the links provided and suggestions.
> > Shall get back to you on this soon.
>
> The following information is exactly what I am trying to collect for
> the inventory. I can find vb scripts with googling. I want to do the
> same with Python & Win32. Use Server/Client architecture .
> Client(agent) updates the information to server.
>
> 
>
> BIOS:
>
> System serial number, manufacturer, and model
> Bios manufacturer, version, and date
>
> Processors:
>
> Type, count (how many of them), manufacturer, speed, and cache
>
> Memory:
>
> Physical memory type, manufacturer, capacity, and slot number
> Total physical memory
> Total swap/paging memory
>
> Video:
>
> Video adapter: Chipset/model, manufacturer, memory size, speed, and
> screen resolution
>
> Display monitor: Manufacturer, description, refresh rate, type, serial
> number, and caption
>
> Storage/removable devices:
>
> Manufacturer, model, size, type, speed( all when applicable)
>
> Drive letter, filesystem type, partition/volume size, free space
>
> Network adapters/telephony:
>
> Manufacturer, model, type, speed, and description
> MAC and IP address, mask and IP gateway, DHCP server used
>
> Miscellaneous hardware:
>
> Input devices: Keyboard, mouse, and pointing device
> Sound devices: Manufacturer name, type, and description
> System slots: Name, type, and designation
> System ports: Type, name, caption, and description
>
> Software Information: ( from registry & add/remove program )
>
> Operating system: Name, version, comments, and registration info
> Installed software: Name, publisher, version (from Add / Remove
> software or Programs and Features menu)
> Custom-specified registry queries (applicable to Windows OS)
>
> --

when I found Python :-) I downloaded from a Ms site many (+- 120)  py
programs for hardware and os stuff and collated them into one script.
Astonishing amount of data in the innards of a computer, do not print
some of the...@#!
I meant to wrap it in a neat menu (any time now), but it is easy to
use as is.
A few of the options :
102 --- -List Terminal Services Terminals-
   103 --- -List Terminal Services Permissions-
   104 --- -List Terminal Services Session Settings-
   105 --- - List Terminal Services Session Directory Settings-
   106 --- - List Terminal Services Network Adapter-
   107 --- -List Terminal Services Environment Settings-
   108 --- -List Terminal Services Logon Settings-
   109 --- -List Terminal Services General Settings-
   110 --- -List Terminal Services Client Settings-
   111 --- -List Terminal Services Terminal Settings-
   112 --- -List Terminal Service Service Properties-
   113 --- -List Info about Binary Files used on Computer-
   114 --- -List Info about CODECS on this computer-
   115 --- -List Installed Software-
   116 --- -List Installed Software Features-

Happy to send to you, will post it somewhere soon.
-- 
http://mail.python.org/mailman/listinfo/python-list


win32com/python different behavour.

2006-11-09 Thread bli
I have been developing an application driving a device through COM. I
used win32com (brilliant )
and was at a fairly advanced stage being able to access the functions
of the device and access/ retrieve its data.
A week or two ago I did some overdue upgrading to all the components of
the application.win32com, python to 2.4.4 and wxpy to latest.
Then the problem began (I think!).
My app still accesses the device and some functions still perform as
expected. Howeve some important data retrieval functions now behave
very differently.
Initially a tuple was returned, which was made into a list. This tuple
returned (true,'1234xyz'), the first element was the success or failure
of the operation, the second the required data.
Now all these functions return only the boolean, True or False.
I cannot seem to produce the tuple that initially worked extremely
well.

eg. initially

xx.GetMACAddr(param1,param2)  <-- params as per 'intellisense' would
return
(True,'123xyz')

now
xx.GetMACAddr(param1,param2)  returns
True(type boolean)

I have exhausted my relative inexperience on this one.
Any Ideas  BTW VB extracts the data just fine , so I dont think that
the Device or firmware is at fault here.
Python has been great so far, I trust this problem is an oversight on
my part.

Thanks in keen anticipation for any ideas to get over this one!!

I am in the middle of returning to Python 2.4.3 just to be sure that
this is not the issue.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32com and name of com

2006-06-25 Thread bli
Roger Upole wrote:
> "bli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> >
> > (All authors are fairly sparse on the topic using Microsoft examples
> > that are more self evident.)
> > thanks muchly!
> >
>
> Your best bet is the documentation for the application.
> However, if the dll is registered correctly you can also
> find the progid in the registry by searching for the dll name.
>
>Roger
>
>
>
>
> == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet 
> News==
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 
> Newsgroups
> ---= East/West-Coast Server Farms - Total Privacy via Encryption =---

Thank you! Phew, over that one, now passing parameters by reference or
value!
slight gripe : there is a more extended example of VB code than Python
in Mark Hammonds 
seminal Py win32 book!  viva comp.lang.python viva!

-- 
http://mail.python.org/mailman/listinfo/python-list


win32com and name of com

2006-06-22 Thread bli
hi all
first post.
I am using python to connect to dll. I have read everything I can find
on [EMAIL PROTECTED]
and tried all variations of the name of the dll to use in the Dispatch.
I get a com error-(-2147...1005, 'Invalid class string',None,None)
Do I add .Application to the name? (eg ' Control
Library.Application')
Any help appreciated?!? How do I get the info?
I have tried the gencache lines suggested in the lit. maybe I use them
wrong.
(All authors are fairly sparse on the topic using Microsoft examples
that are more self evident.)
thanks muchly!

-- 
http://mail.python.org/mailman/listinfo/python-list