[SK] Cody
[SK] Cody
CC#
Created by [SK] Cody on 2/14/2024 in #help
Execute batch file and keep cmd open
I've written my program to execute a batch file and pass in the needed arguments, however I'm having an issue of trying to figure out how to keep the cmd window open after the batch file has finished executing. I cannot modify the batch file. Originally the way I was performing my task was to add cmd /k at the start of a batch file that would then execute the batch file I was targeting and passing the arguments that way but I'm trying to automate the process more Currently it's just
c#
Process uatProcess = new Process();
uatProcess.StartInfo.FileName = uatPath; // Path to the bat file
uatProcess.StartInfo.Arguments = arguments; // Aruments being passed in
c#
Process uatProcess = new Process();
uatProcess.StartInfo.FileName = uatPath; // Path to the bat file
uatProcess.StartInfo.Arguments = arguments; // Aruments being passed in
11 replies