Follow these steps and the following VB script to add a cool tool to Hyena that will allow you to run MBSA on a whatever computer you select
1) Install MBSA 1.2 into its default location. You can download it here: http://www.microsoft.com/technet/sec.../mbsahome.mspx
2) Copy the below code into notepad and name it "Run MBSA.vbs" and then save it to a location of your choosing.
3) In Hyena Select Tools, Settings, and then the Tools tab.
4) Click the "New" button and type "Scan with MBSA" for the Caption and in the Command Line box, type "wscript.exe <path you chose in step 2>Run MBSA.vbs //I //NoLogo %E%". For example, "wscript.exe "\\Server\stevec\Hyena Scripts\Run MBSA.vbs" //I //NoLogo %E%". Now click OK.
To use, R-click a computer in Hyena and select Tools, "Scan with MBSA".
Start of vb script code:
'-----------------------------
'================================================= =========================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 3.0
'
' NAME: Run MBSA.vbs
'
' AUTHOR: Steve Cathersal
' DATE : 6/13/2004
'
' COMMENT:
'
'================================================= =========================
Option Explicit
'On Error Resume Next
Dim strComputer, intProcessID, objWMIService, colProcessList, objProcess
Dim objArgs, objShell, ObjFileSys
Set objArgs = WScript.Arguments ' create object with collection
Set objShell = CreateObject("WScript.Shell")
Set ObjFileSys= CreateObject("Scripting.FileSystemObject")
strComputer = objArgs(0) 'assign the passed computer name to a variable
If strComputer = "" Or IsNull(strComputer) Then
WScript.Echo "Failure - You must have a Computer highlighted when you run this script."
WScript.Quit
End If
' Delete old report if it exists
If ObjFileSys.FileExists("""" & objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "SecurityScans" & strComputer & ".xml""") Then
ObjFileSys.DeleteFile("""" & objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "SecurityScans" & strComputer & ".xml""")
End If
' Call MSBasline against supplied computer
objShell.Run "%comspec% /c ""C:\Program Files\Microsoft Baseline Security Analyzer\mbsacli.exe"" /c " & strComputer & " /o " & strComputer & ".xml",1,TRUE
'Once scan is complete open in Gui
objShell.Run """C:\Program Files\Microsoft Baseline Security Analyzer\mbsa.exe"" """ & objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "SecurityScans" & strComputer & ".xml""",1,FALSE
1) Install MBSA 1.2 into its default location. You can download it here: http://www.microsoft.com/technet/sec.../mbsahome.mspx
2) Copy the below code into notepad and name it "Run MBSA.vbs" and then save it to a location of your choosing.
3) In Hyena Select Tools, Settings, and then the Tools tab.
4) Click the "New" button and type "Scan with MBSA" for the Caption and in the Command Line box, type "wscript.exe <path you chose in step 2>Run MBSA.vbs //I //NoLogo %E%". For example, "wscript.exe "\\Server\stevec\Hyena Scripts\Run MBSA.vbs" //I //NoLogo %E%". Now click OK.
To use, R-click a computer in Hyena and select Tools, "Scan with MBSA".
Start of vb script code:
'-----------------------------
'================================================= =========================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 3.0
'
' NAME: Run MBSA.vbs
'
' AUTHOR: Steve Cathersal
' DATE : 6/13/2004
'
' COMMENT:
'
'================================================= =========================
Option Explicit
'On Error Resume Next
Dim strComputer, intProcessID, objWMIService, colProcessList, objProcess
Dim objArgs, objShell, ObjFileSys
Set objArgs = WScript.Arguments ' create object with collection
Set objShell = CreateObject("WScript.Shell")
Set ObjFileSys= CreateObject("Scripting.FileSystemObject")
strComputer = objArgs(0) 'assign the passed computer name to a variable
If strComputer = "" Or IsNull(strComputer) Then
WScript.Echo "Failure - You must have a Computer highlighted when you run this script."
WScript.Quit
End If
' Delete old report if it exists
If ObjFileSys.FileExists("""" & objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "SecurityScans" & strComputer & ".xml""") Then
ObjFileSys.DeleteFile("""" & objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "SecurityScans" & strComputer & ".xml""")
End If
' Call MSBasline against supplied computer
objShell.Run "%comspec% /c ""C:\Program Files\Microsoft Baseline Security Analyzer\mbsacli.exe"" /c " & strComputer & " /o " & strComputer & ".xml",1,TRUE
'Once scan is complete open in Gui
objShell.Run """C:\Program Files\Microsoft Baseline Security Analyzer\mbsa.exe"" """ & objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "SecurityScans" & strComputer & ".xml""",1,FALSE
Comment