Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #32027

Re: Is there a way to programmatically turn on remote registry?

Date 2012-10-24 12:51 +0100
From Tim Golden <mail@timgolden.me.uk>
Subject Re: Is there a way to programmatically turn on remote registry?
References (11 earlier) <508691F2.6070001@timgolden.me.uk> <CAN4UfGwPgV6GYkWUPcmUqTeO_2HXxSWk5eB8wqbd6zQ-8iqLFw@mail.gmail.com> <5086BA1F.9090108@timgolden.me.uk> <CAN4UfGzrB8-P=ydCXiQ+rfJXn1kvfcpBHjz6eKctoY5Cz7HAJw@mail.gmail.com> <CAN4UfGzK2ndbaqaQyz4KUcTHcFEtbbHqtZGkfHL5XjyXPC7QmQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2749.1351079510.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 24/10/2012 12:40, Kevin Holleran wrote:> Here is the full traceback:
>
> [output]
> Scan_NIC_Driver_Info_1.2.py <http://Scan_NIC_Driver_Info_1.2.py> -i
> testing_MSK_Server.csv -o MSK_Test_output.csv -u unreachable.csv
> Parsing input file...
>
> Connecting to IP...
>
> Traceback (most recent call last):
>   File
> "D:\Development\Scripts\Python\Scan_NIC_Driver_Info\Scan_NIC_Driver_Info_
> 1.2.py <http://1.2.py>", line 70, in <module>
>     _, names = registry.EnumKey(HKLM,NICs)
>   File "C:\Python27\lib\site-packages\wmi.py", line 431, in __call__
>     handle_com_error ()
>   File "C:\Python27\lib\site-packages\wmi.py", line 241, in
handle_com_error
>     raise klass (com_error=err)
> wmi.x_wmi: <x_wmi: Unexpected COM Error (-2147352567, 'Exception
> occurred.', (0,
>  u'SWbemProperty', u'Type mismatch ', None, 0, -2147217403), None)>
>
> [/output]
>
> Basically, it parses a list of hosts from a CSV, outputs a series of
> lines: host, driverDesc, diverDate, driverVersion.  Basically it pings
> the host first to make sure its up.
>
> Here are the relevant parts to the script:
>
> [code]
>  registry = wmi.WMI(host, namespace="default").StdRegProv
>         _, names = registry.EnumKey(HKLM,NICs)

Could you confirm what version of Windows is running on the remote
machine? Also, could you show the output of the following, please:

<code>
import wmi

host = "<whatever>" # pick one

print wmi.WMI(host, namespace="default").StdRegProv

</code>


TJG

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Is there a way to programmatically turn on remote registry? Tim Golden <mail@timgolden.me.uk> - 2012-10-24 12:51 +0100

csiph-web