I have a process that works.
On a button click it (WIth hidden widnow)
executes a java command
The cmd.exe is using an append to file with > myfile.txt
The process runs...opens a connection to my vendor and starts receiving the inbound data
Now this is an open connection so as long as this runs I will get a continuous stream of telephone data on our network.
(No...I don't work for the NSA...LOL)
I allso have a process.kill() command.
WHat I want is for this to continuously append to the file
BUt it looks like the file isn't written until I kill the process?
Is that the way it works?
I really need it going into the file in an ongoing manner
This is what is running
Private Sub btnProcessStart_Click(sender As System.Object, e As System.EventArgs) Handles btnProcessStart.Click
' New ProcessStartInfo created
Dim p As New ProcessStartInfo
' Specify the location of the binary
p.FileName = "cmd.exe"
p.WorkingDirectory = "C:\Program Files (x86)\Java\jre7\bin\"
' Use these arguments for the process
p.Arguments = "/c java -cp m5.jar;m5-data-objects.jar;webservices-rt.jar;log4j-1.2.13.jar > C:\temp\Output3.txt"
' Use a hidden window
p.WindowStyle = ProcessWindowStyle.Hidden
' Start the process
Dim intResponse As Integer
intResponse = MsgBox("End?", vbYesNoCancel, "Alert")
If intResponse = vbYes Then
For Each jr In Process.GetProcessesByName("Java")