Hi folks,
I want to write a small exe with Visual Studio 05 to control an external dos-prgramm.
For the beginning I used this one:
It opens the command prompt and instert the test which is executed by the command prompt. That's fine but after that I can't write any word it doesn't accept any input anymore, why?
By the way ist there way too just write an word without line break, like
I found some examples that start with and useing
What's the difference?
The only way out I know is sendkeys but is more a *headtroughthewall* method.
thx
stefan
I want to write a small exe with Visual Studio 05 to control an external dos-prgramm.
For the beginning I used this one:
VB.NET:
Module Module1
Sub main()
Dim myProcess As System.Diagnostics.Process = New System.Diagnostics.Process()
myProcess.StartInfo.FileName = pfad3
myProcess.StartInfo.CreateNoWindow = False
myProcess.StartInfo.UseShellExecute = False
myProcess.StartInfo.RedirectStandardInput = True
myProcess.Start()
myProcess.StandardInput.WriteLine("cd " & pfad2)
myProcess.WaitForExit() 'else it closes immediately
End Sub
End Module
It opens the command prompt and instert the test which is executed by the command prompt. That's fine but after that I can't write any word it doesn't accept any input anymore, why?
By the way ist there way too just write an word without line break, like
VB.NET:
myProcess.StandardInput.Write("cd " & pfad2)
I found some examples that start with and useing
VB.NET:
Dim myProcess As Process = New Process()
Dim sIn As StreamWriter = myProcess.StandardInput
sIn.AutoFlush = True
sIn.Write("some text")
The only way out I know is sendkeys but is more a *headtroughthewall* method.
thx
stefan
Last edited by a moderator: