The following code used to work. It starts up notepad and types a few lines.
What am I doing wrong? I'm using VB.NET 2005 under Vista. It starts notepad
okay, but it can't 'type' into it.
'demonstrate "typing" into notepad
Dim psiProcessStart Info As New ProcessStartInf o
With psiProcessStart Info
.Arguments = "" 'command line arguments
.CreateNoWindow = False
.ErrorDialog = False
.FileName = "notepad.ex e"
.LoadUserProfil e = False
.RedirectStanda rdError = False
.RedirectStanda rdInput = True
.RedirectStanda rdOutput = False
.UseShellExecut e = False 'this must be false for
input/output/error redirection
.WorkingDirecto ry = ""
End With
Using prc As Process = Process.Start(p siProcessStartI nfo)
MsgBox("")
prc.StandardInp ut.WriteLine("T his line added by ProcessMgmtDemo ")
prc.StandardInp ut.WriteLine("T his line added by ProcessMgmtDemo ")
prc.StandardInp ut.WriteLine("T his line added by ProcessMgmtDemo ")
End Using
--
David Streeter
Synchrotech Software
Sydney Australia
What am I doing wrong? I'm using VB.NET 2005 under Vista. It starts notepad
okay, but it can't 'type' into it.
'demonstrate "typing" into notepad
Dim psiProcessStart Info As New ProcessStartInf o
With psiProcessStart Info
.Arguments = "" 'command line arguments
.CreateNoWindow = False
.ErrorDialog = False
.FileName = "notepad.ex e"
.LoadUserProfil e = False
.RedirectStanda rdError = False
.RedirectStanda rdInput = True
.RedirectStanda rdOutput = False
.UseShellExecut e = False 'this must be false for
input/output/error redirection
.WorkingDirecto ry = ""
End With
Using prc As Process = Process.Start(p siProcessStartI nfo)
MsgBox("")
prc.StandardInp ut.WriteLine("T his line added by ProcessMgmtDemo ")
prc.StandardInp ut.WriteLine("T his line added by ProcessMgmtDemo ")
prc.StandardInp ut.WriteLine("T his line added by ProcessMgmtDemo ")
End Using
--
David Streeter
Synchrotech Software
Sydney Australia
Comment