Hi again, Second post of the day for me... sorry.
I have the following code that work fine in my windows test app:
Public Function GetAuditCode()
'////Get Audit Code +++++++++++++++++++++++
Dim p As New Process
p.StartInfo.UseShellExecute = False
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
p.StartInfo.RedirectStandardOutput = True
p.StartInfo.StandardOutputEncoding = System.Text.Encoding.ASCII
p.StartInfo.FileName = My.Settings.AppDir
p.StartInfo.Arguments = "-audit"
p.Start()
Dim i As Integer = 0
Dim c(1) As Char
While Not p.StandardOutput.EndOfStream
p.StandardOutput.Read(c, 0, 1)
Me.TextBox1.Text += c(0).ToString()
strAudit = strAudit + c(0).ToString()
i += 1
Application.DoEvents()
End While
Return strAudit
End Function
The thing is I need this functionality in a Windows Service...
Is there something that can do this for me in a Windows Service?
TIA!
I have the following code that work fine in my windows test app:
Public Function GetAuditCode()
'////Get Audit Code +++++++++++++++++++++++
Dim p As New Process
p.StartInfo.UseShellExecute = False
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
p.StartInfo.RedirectStandardOutput = True
p.StartInfo.StandardOutputEncoding = System.Text.Encoding.ASCII
p.StartInfo.FileName = My.Settings.AppDir
p.StartInfo.Arguments = "-audit"
p.Start()
Dim i As Integer = 0
Dim c(1) As Char
While Not p.StandardOutput.EndOfStream
p.StandardOutput.Read(c, 0, 1)
Me.TextBox1.Text += c(0).ToString()
strAudit = strAudit + c(0).ToString()
i += 1
Application.DoEvents()
End While
Return strAudit
End Function
The thing is I need this functionality in a Windows Service...
Is there something that can do this for me in a Windows Service?
TIA!