I have an MVC .NET application, and I want to run some .exes on the server. The exes are jarsigner.exe and zipalign.exe, used to modify and re-sign an android APK. I want to run them from the Controller.
It works locally, using a Process to launch the application, but I have cheated and used hardcoded paths to the .exe and to the folder with the stuff to be used by the exe.
I've added the .exes to the top-level of my project in visual studio, and added a folder containing the files to be worked upon by the .exes.
I'm struggling to workout how I get the path to the exes, and to the folder of files. Once I have that I can then invoke the Process (I suspect I might hit permissions trouble, but one step at a time...).
var processInfo = new ProcessStartInfo(@"C:\jarsigner.exe", @"..arguments"){
CreateNoWindow = true, UseShellExecute = false
};