If the all-permissions element is specified, you can try to set an environment variable that you can read from your C # application.
Set environment variable in Java:
System.getenv().put("returnValue", "yourValue");
Reading a C # environment variable:
ProcessStartInfo p = new ProcessStartInfo("start ...."); .... string returnValue = p.EnvironmentVariables["returnValue"];
source share