VB.net MBSA

  • Thread starter Thread starter Keith Grefski
  • Start date Start date
K

Keith Grefski

I have the following code that works as long as I dont add the switch -h

'Dim sStartInfo As String = "/hf -z -s 1 -h " & CompName & ""
Dim sStartInfo As String = "/hf -z -s 1"
With securityprocess.StartInfo
.FileName = "C:\Program Files\Microsoft Baseline Security
Analyzer\mbsacli"
.Arguments = sStartInfo
.UseShellExecute = False
.CreateNoWindow = True
.RedirectStandardOutput = True
.RedirectStandardError = True
.RedirectStandardInput = True
End With
securityprocess.Start()

Do While Not securityprocess.HasExited
securityString = securityprocess.StandardOutput.ReadLine
Console.WriteLine(securityString)
Loop


any ideas why the switch for remote fails?

thanks

Keith
 
Keith,

I dunno,

However there is something strange in your statement

'Dim sStartInfo As String = "/hf -z -s 1 -h " & CompName & ""
Dim sStartInfo As String = "/hf -z -s 1"

What is the reason for adding that completly empty string at the end?

Cor
 
I was just trying out some different scenarios. It does format correctly
when you check it during debugging.
 
I was just trying out some different scenarios. It does format correctly
when you check it during debugging.

Of course however I thouth that you maybe was forgotten to set something
between quotes or something. The result will be the same with or withouth
adding nothing to something.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top