473,480 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VB.net MBSA

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
Nov 21 '05 #1
3 1396
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

"Keith Grefski" <kg******@optonline.net> schreef in bericht
news:%2****************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #2
I was just trying out some different scenarios. It does format correctly
when you check it during debugging.
Cor Ligthert wrote:
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

"Keith Grefski" <kg******@optonline.net> schreef in bericht
news:%2****************@TK2MSFTNGP14.phx.gbl...
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


Nov 21 '05 #3
>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
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1115
by: Ashwani | last post by:
After creating database in SQL Server , it generates .mdf , .ndf datafiles . Generally if we get those datafiles then we can create the database with tables/data on another machine by using those...
3
1673
by: Paul | last post by:
I have an installation of SQL Server 2000. Both MBSA and @@version show this to be the gold release. When I install Service Pack 3a, it shows no error. But after restart of the server, it's...
3
1544
by: Jo Davis | last post by:
www.shanje.com does sql server hosting, on shared servers, at a reasonable price. It seems. They also allow client connections. Just playing around I've managed to connect an Access Data Project...
1
2140
by: Daniel Cayouette | last post by:
Hi Where would I find the xml schema for MBSA xml files (microsoft baseline secuirty analyzer)? I've tried the inferschema (C#) mode but it throws exceptions on the multiple Col I'm...
0
968
by: Troy | last post by:
Hello, This may be a very stupid question but I've writen a C# app that continuosly monitors eventlogs on four servers and send's out an email alert when an error is logged. I'd like to take...
3
1274
by: mykhan | last post by:
Hi All! I need to ask a question about windows 2003 server. I have my webserver configured on it and a domain registered. Now I put my whole website along with Access db file in specified folder. ...
60
7852
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type?...
0
912
by: =?Utf-8?B?Vmlkbw==?= | last post by:
I'm running WinXP SP2 and IE 7.0.5730.11 I ran MBSA 1.2 and I got a report that I needed to upgrade MBSA to version 2.0 I ran MBSA 2.0 and got this error message: "Failed to download...
0
780
by: =?Utf-8?B?bWFya3ltYXJr?= | last post by:
Hi all here is a poser for you, ive been running MBSA, and the same thing keeps coming up that auditing on some files cannot be completed, following the "how to correct this route" administrive...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7087
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6944
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.