Module: check_mk
Branch: master
Commit: e8e978f8f1a6e7ae75d575db26302db75b72a88b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8e978f8f1a6e7…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Mar 27 14:20:36 2014 +0100
windows_update.vbs: Cleanups
---
agents/windows/plugins/windows_updates.vbs | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/agents/windows/plugins/windows_updates.vbs
b/agents/windows/plugins/windows_updates.vbs
index b446d81..7ef05df 100644
--- a/agents/windows/plugins/windows_updates.vbs
+++ b/agents/windows/plugins/windows_updates.vbs
@@ -15,7 +15,7 @@
' some issues, so I went for a simpler solution using only one script
'
' Updated by Bastian Kuhn, 2014-03-03: Removed all caching functions cause the
current agent
-' has a native caching support. Make shure that you activate caching for this script
in check_mk.ini
+' has a native caching support. Make sure that you activate caching for this script
in check_mk.ini
'
-----------------------------------------------------------------------------------------
Option Explicit
@@ -39,9 +39,6 @@ end function
Dim result, reboot, numImp, numOpt, important, opti
Dim updtSearcher, colDownloads, objEntry
-Dim objFSO, stdout
-Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
-Set stdout = objFSO.GetStandardStream(1)
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
@@ -50,7 +47,7 @@ Dim RebootTime
Dim RegPath
If CreateObject("Microsoft.Update.AutoUpdate").DetectNow <> 0 Then
- stdout.WriteLine("<<<windows_updates>>>")
+ WScript.Echo "<<<windows_updates>>>"
WScript.Quit()
End If
@@ -76,22 +73,22 @@ For Each objEntry in colDownloads
important = objEntry.Title
else
important = important & "; " & objEntry.Title
- End If
- numImp = numImp + 1
+ End If
+ numImp = numImp + 1
Else
- If numOpt = 0 Then
+ If numOpt = 0 Then
opti = objEntry.Title
Else
opti = opti & "; " & objEntry.Title
- End If
- numOpt = numOpt + 1
+ End If
+ numOpt = numOpt + 1
End If
Next
- stdout.WriteLine("<<<windows_updates>>>")
- stdout.WriteLine(reboot & " " & numImp & " " &
numOpt)
- stdout.WriteLine(important)
- stdout.WriteLine(opti)
- stdout.WriteLine(RebootTime)
+WScript.Echo "<<<windows_updates>>>"
+WScript.Echo reboot & " " & numImp & " " & numOpt
+WScript.Echo important
+WScript.Echo opti
+WScript.Echo RebootTime
WScript.Quit()