回答編集履歴
1
WorkingDirectory について追記
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
ProcessStartInfo を使
|
1
|
+
ProcessStartInfo を使い、WorkingDirectory を指定し起動しては?
|
2
2
|
|
3
3
|
```vb
|
4
4
|
Imports System.IO
|
@@ -11,10 +11,11 @@
|
|
11
11
|
Dim info As New ProcessStartInfo With {
|
12
12
|
.FileName = Path.Combine(batPath, "..\A.bat"),
|
13
13
|
.WorkingDirectory = Path.Combine(batPath, "..\"),
|
14
|
-
.RedirectStandardOutput = True,
|
15
14
|
.UseShellExecute = False
|
16
15
|
}
|
17
|
-
Process.Start(info)
|
16
|
+
Using p = Process.Start(info)
|
17
|
+
p.WaitForExit()
|
18
|
+
End Using
|
18
19
|
Console.ReadKey()
|
19
20
|
End Sub
|
20
21
|
|