Is there a way to programmatically turn on remote registry?

Kevin Holleran kdawg44 at gmail.com
Mon Oct 22 16:01:33 EDT 2012


Tim,

I am looking here:

SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BF9F6FB0-C999-4D19-BED0-144F77E2A9D6}

Enumerating the keys for a BusType == 5, then grabbing the values of
DriverDesc, DriverDate, & DriverVersion.

So I am doing this:

 try:
            hKey = _winreg.OpenKey (keyPath,
r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BF9F6FB0-C999-4D19-BED0-144F77E2A9D6}",
0, _winreg.KEY_READ)
            i=0
            while True:
                try:
                    subkey = _winreg.EnumKey(hKey, i)
                    i += 1
                    if (subkey.QueryValueEx(hKey,"BusType") == "5"):
                        outputline = host + "," +
subkey.QueryValueEx(hKey,"DriverDesc") + "," +
subkey.QueryValueEx(hKey,"DriverDate") + "," +
subkey.QueryValueEx(hKey,"DriverVersion") + "\n"
                        print outputline
                        outputFile.write(outputLine)
                except WindowsError, e:
                    # WindowsError: [Errno 259] No more data is available

                    pass
        except:
            print "Unable to query registry key for NIC adapters"

Thanks.  I am reviewing the WMI Registry piece you sent over right now.  I
am certainly open to anyway I can get the info.  I have some odd behaviors
across some servers during vulnerability scanning & have a suspicion that
some driver discrepancies on the NIC are to blame.

Kevin


On Mon, Oct 22, 2012 at 3:29 PM, Tim Golden <mail at timgolden.me.uk> wrote:

> On 22/10/2012 16:38, Kevin Holleran wrote:
>
>> Thanks, I will look into that.  WMI is enabled, but everything WMI query I
>> wrote (& I am NOT a WMI expert.... or even close) gave me a bunch of NIC
>> info, but not the info I am after in the registry (driver description,
>> driver date, driver version for the NICs).
>>
>
> I assume you've found things like the Win32_NetworkAdapter which doesn't
> include driver details. If you cared to come across with the registry keys
> / values you needed I'm sure I could rustle up a sample query to get you on
> the right path.
>
> TJG
>
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20121022/6c46f5b5/attachment.html>


More information about the Python-list mailing list