I'm calling a powershell script from my C# application using:
System.Diagnostics.Process.Start("powershell.exe", " -executionpolicy unrestricted -file myscript.ps1");
Within this script is a call to Java (which relies on the CLASSPATH & PATH system variables). This is where the script fails and reports that:
java is not recognized as an internal command or external command
I believe this is because the system variables for PATH are not being used when I'm executing Powershell from C#. Any help ?
FYI, if I open Powershell manually and run the command it works correctly.