Closed FrostJanV closed 6 months ago
Hi @FrostJanV
thank you for your report.
It looks like a regression as I worked on enhanced publisher support. But I still don't see why this can affect windows inventory. I will audit the changed code to see what I could have missed.
In registry, did you check under:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall
HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/Windows/CurrentVersion/Uninstall
scan-profiles
option:
HKEY_USERS/*/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall
HKEY_USERS/*/SOFTWARE/Wow6432Node/Microsoft/Windows/CurrentVersion/Uninstall
If you find it, can you export the related parent registry key from regedit and share it here ?
Hi @g-bougard,
Thanks for your feedback I have searched for the key with the following script:
$SoftwarePub = @("Carter")
$HKLM = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
$HKLM_Wow = "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$HKCU = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
$registryKeys = Get-ChildItem $HKLM, $HKLM_Wow, $HKCU -ErrorAction SilentlyContinue
$installedSoftware = foreach ($key in $registryKeys) {
$publisher = $key.GetValue("Publisher")
if ($SoftwarePub | Where-Object { $publisher -like "*$_*" }) {
[PSCustomObject]@{
DisplayName = $key.GetValue("DisplayName")
Publisher = $publisher
Version = $key.GetValue("DisplayVersion")
InstallDate = $key.GetValue("InstallDate")
}
}
}
$installedSoftware | Select-Object DisplayName, Publisher, Version, InstallDate
I also just searched under HKEY_USERS and found nothing except this:
Computer\HKEY_USERS\S....\SOFTWARE\Microsoft\Notepad
So can you provide a full export of the Computer\HKEY_USERS\S....\SOFTWARE\Microsoft\Notepad
registry key ?
You can of course obfuscate the user sid in the exported reg file.
So you also confirm you're using scan-profiles
option.
And can you disable scan-profiles
option to see if this at least fixes the problem ?
Hey,
sorry to have taken up your time. Found the error. We do not use the scan-profiles option but an “AdditionalContent” option which our GLPI partner has built. If I upload the XML without this AdditionalContents it works...
I will probably have to contact the partner to adapt this VB script.
Bug reporting acknowledgment
Yes, I read it
Professional support
Yes, I know
Describe the bug
Hello everyone, unfortunately I get the following message with the GLPI Agent in version 1.8: ERROR: 400 Bad Request, JSON does not validate. Violations: Required property missing: name, data: {“publisher”: “Carter”} at #->properties:content->properties:softwares->items[534]:534
I do not get this message with the GLPI Agent in Version 1.7.3.
The “Inventory XML” contains the following:
In the registry I cannot find an entry under “Publisher” with the value “Carter ” Using a WMI query, I could not find any software product that has “Carter ” as its publisher.
To reproduce
Expected behavior
XML is not sent and the following error appears: ERROR: 400 Bad Request, JSON does not validate. Violations: Required property missing: name, data: {"publisher":"Carter "} at #->properties:content->properties:softwares->items[534]:534
Operating system
Windows
GLPI Agent version
1.8
GLPI version
10.0.12
GLPIInventory plugin or other plugin version
No response
Additional context
No response