V
Volker Jobst
Hi.
I have this code:
Dim p As New Process
Dim info As New ProcessStartInfo
Dim sa As New ArrayList
Dim s As String
Try
With info
..FileName = "c:\test.bat"
..RedirectStandardError = True
..UseShellExecute = False
..RedirectStandardOutput = True
End With
p = Process.Start(info)
While Not (p.HasExited)
End While
sa.Add("StandardError: " & p.StandardError.ReadToEnd())
sa.Add("StandardOutput: " & p.StandardOutput.ReadToEnd())
sa.Add("ExitCode: " & p.ExitCode)
sa.Add("ExitTime: " & p.ExitTime)
sa.Add("HasExited: " & p.HasExited)
Catch ex As Exception
sa.Add("Exception: " & ex.Message)
End Try
It works great if the C:\test.bat file contains something like:
copy D:\*.* X:\
But it dows not work if the C:\test.bat file contains somthing including
xcopy like:
xcopy D:\*.* X:\
The data to transfer is not more than ~1 MB in both cases, though xcopy
copies the
sub directories too.
Could anyone please help me.
Thanx a lot.
volker
I have this code:
Dim p As New Process
Dim info As New ProcessStartInfo
Dim sa As New ArrayList
Dim s As String
Try
With info
..FileName = "c:\test.bat"
..RedirectStandardError = True
..UseShellExecute = False
..RedirectStandardOutput = True
End With
p = Process.Start(info)
While Not (p.HasExited)
End While
sa.Add("StandardError: " & p.StandardError.ReadToEnd())
sa.Add("StandardOutput: " & p.StandardOutput.ReadToEnd())
sa.Add("ExitCode: " & p.ExitCode)
sa.Add("ExitTime: " & p.ExitTime)
sa.Add("HasExited: " & p.HasExited)
Catch ex As Exception
sa.Add("Exception: " & ex.Message)
End Try
It works great if the C:\test.bat file contains something like:
copy D:\*.* X:\
But it dows not work if the C:\test.bat file contains somthing including
xcopy like:
xcopy D:\*.* X:\
The data to transfer is not more than ~1 MB in both cases, though xcopy
copies the
sub directories too.
Could anyone please help me.
Thanx a lot.
volker