Seite 1 von 1

hwaudit read from registry

Verfasst: 12 Jun 2014, 09:41
von kanderss
We are trying to get a piece of information from the registry in hwaudit.
So far I have not succeeded in getting hwaudit to read registry at all.

The hwaudit.log snip:
Apr 24 10:51:31 [debug] Hardware object is now: {u'verticalResolution': 200, u'vendor': None, u'name': u'Fax', u'paperSizesSupported': u'Letter, Letter, Legal, Other, Other, A4, Other, A5, JIS B6, Other, Other, Letter, NA-Number-9-Envelope, NA-Number-10-Envelope, Other, Other, Other, Other, Other, Other, Other, Other, Other, Other, Oth', u'serialNumber': None, u'capabilities': u'Color Printing, Duplex Printing', u'horizontalResolution': 200, u'driverName': u'Microsoft Shared Fax Driver', u'model': None, u'port': u'SHRFAX:', u'description': None} (hwaudit.py|672)
Apr 24 10:51:31 [notice] Fetching hardware information from Registry (hwaudit.py|872)
Apr 24 10:51:31 [notice] Fetching hardware information from Executing Command (hwaudit.py|875)
Apr 24 10:51:31 [info] Condition found, try to find the Condition (hwaudit.py|746)
Apr 24 10:51:31 [info] Hardware information from WMI:

So the line is there but no action?

Here is the entry from opsihwaudit.conf

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - MySoftware -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
"Class": {
"Type": "STRUCTURAL",
"Super": [ "HARDWARE_DEVICE" ],
"Opsi": "MySoftware",
"Registry": "[HKEY_CURRENT_USER\Software\MySoftware] result"
},
"Values": [
{
"Type": "int",
"Scope": "i",
"Opsi": "result"

},
]
},

--- snip end ---

The value result exists in the registry.

Also in the locales we have
MySoftware = MySoftware
MySoftware.name = Result
MySoftware.result = Result

Could someone post a working example of this?
Or anyone got this to work properly?

Thanks!

Kim

Re: hwaudit read from registry

Verfasst: 18 Dez 2014, 10:03
von wolfbardo
Above Windows Vista the opsi-client-agent runs as "system"

Therefore reading

Code: Alles auswählen

"Registry": "[HKEY_CURRENT_USER\Software\MySoftware] result"
works not as expected..

regards,
Bardo Wolf