0
私はdsqueryとdsgetの結果を、クリーンアップ用に設定する必要がある小さなアプリケーションに取り組んでいます(スペースやその他の不要な文字を置き換える)。 ReadToEndでストリームの結果を表示することはできますが、文字列を取得する際に何も見つからないようです。コンソールの文字列への出力
VB.net -
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim p As New Process
p.StartInfo.UseShellExecute = False
p.StartInfo.CreateNoWindow = True
p.StartInfo.FileName = "program"
p.StartInfo.Arguments = "lots here"
p.StartInfo.RedirectStandardOutput = True
p.Start()
Dim reader As StreamReader = p.StandardOutput
p.WaitForExit()
MsgBox(reader.ReadToEnd)
End Sub
ちょうど 'reader.ReadToEnd'の最後に括弧を追加します。 –