Good Afternoon All,
I am currently working to create a mechanism my users can use that will run a windows batch file (.bat).
I have searched around and found a few C# Scripts that purport to show how to do this, so I have created code activity object and attempted to use the script I have found to run several variations on the following:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "D:\\bin\\Test.bat";
process.StartInfo = startInfo;
process.Start();
The script validate function returns no issues, and I can deploy the solution with no errors. When I Click the command button that results in the script execution, again there is no error.
I have attempted to run the debugger, but it doesn't really give me a helpful result (it basically says "you wrote it, you fix it")
We have the installation on separate servers for the three tiers (Web, Engine, DB). The batch file resides on the Engine Server. Should it be on the Web Server?
I'm afraid I am a newbie with MBPM 9.2 and also to C#. Does anyone have a suggestion on something I may be doing wrong or on a different way to approach the problem?