Execute command line utilities

February 2, 2009 on 7:31 am | In Programming | 1 Comment

A very usefull set of lines if you want to make a command line utility easier to use and manipulate the output.

Dim process As New Process()
process.StartInfo.UseShellExecute = False
process.StartInfo.FileName = path & “filename.exe”
process.StartInfo.CreateNoWindow = True
process.StartInfo.WindowStyle = ProcessWindowStyle.Minimized
Dim parameters As String = ” /?”
process.StartInfo.Arguments = parameters
process.StartInfo.RedirectStandardOutput = True
process.StartInfo.RedirectStandardError = True
Dim SR As System.IO.StreamReader = process.StandardOutput
TextBox1.Text = SR.ReadToEnd

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. […] View full post on Metallica’s blog […]

    Pingback by Execute command line utilities | Computer Security Articles — May 4, 2010 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^