Module: check_mk
Branch: master
Commit: 7d743604e49d5ff65302164e556bb32c6c332609
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d743604e49d5f…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Feb 3 09:13:03 2016 +0100
windows agent: fixed potential crash in mk_inventory.ps1 plugin
---
agents/windows/plugins/deprecated/mk_inventory.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents/windows/plugins/deprecated/mk_inventory.ps1
b/agents/windows/plugins/deprecated/mk_inventory.ps1
index 160b0fd..c14e6d5 100644
--- a/agents/windows/plugins/deprecated/mk_inventory.ps1
+++ b/agents/windows/plugins/deprecated/mk_inventory.ps1
@@ -81,7 +81,7 @@ Get-WmiObject Win32_Product -ComputerName $name | foreach-object {
write-host -s
write-host
"<<<win_reg_uninstall:sep(124):persist($until)>>>"
$paths = @("HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall")
foreach ($path in $paths) {
- Get-ChildItem $path -Recurse | foreach-object { $path2 =
$path+"\"+$_.PSChildName; get-ItemProperty -path $path2 |
+ Get-ChildItem $path | foreach-object { $path2 = $path+"\"+$_.PSChildName;
get-ItemProperty -path $path2 |
foreach-object {
$Publisher = $_.Publisher -replace "`0", ""