I want to run a CSharp process from my java server under a different user. I use PSExec to do this - it works fine on my PC, but when doing it on a "real" server, the process immediately crashes. (It seems that the CSharp app does not even start - i tried to print something to a file as the first command, but nothing was written).
Both the user that run the java process and the other user are in the Administrator group.
I have no idea why the application crashes.
This is my code:
ProcessBuilder processBuilder = new ProcessBuilder(
"c:\\pstools\\PsExec.exe",
"-u",
"username",
"-p",
"password",
appPath,
arg1,
arg2);
processBuilder.start();