1

We have a virtual server running Windows Server 2012 R2. On Friday the version of java was updated from 1.8.0_27 to 1.8.0_40. As far as I know, this was the only change made.

Since that time, I can run java directly from the command line or in batch files, but previously working powershell scripts that use Start-Process to start java, e.g. $process = Start-Process -FilePath c:\ProgramData\Oracle\java\javapath\java.exe -ArgumentList $report_args -PassThru -Wait give the error "Start-Process : This command cannot be run completely because the system cannot find all the information required." The java executable actually is started and finishes its task correctly, but in the meantime the powershell script has gone down the path to reporting the error.

System.Diagnostics.Process.Start (in C#) is also reporting a failure when starting java.

Any ideas on things to look into for the message "Start-Process : This command cannot be run completely because the system cannot find all the information required."?

nebulopathy
  • 101
  • 7
  • 1
    Not sure if you found a fix. The c:\ProgramData\Oracle\java\javapath\java.exe file in (on my computer) is not the exe but a SYMLINK file. You should check that the Properties-> Target is set to the correct directory that you installed the new version of java to. I am also having issues using System.Diagnostics.Process.Start when it point to the SYMLINK on my PATH Variable. It seems to not know how to use is and asks me to select a default program for file type .exe. (Do not select a file association for .exe... ). You coudl Point your Path to C:/ProgramFile/Java/Bin/ for java.exe instead. – Michael Shaffer Sep 11 '15 at 18:34
  • No fix yet and my workaround has been to keep java at an old revision (which is less than ideal) -- I'll play around with your ideas this weekend. If it has something to do with symlinks that might explain why I'm not having this problem on the other server. Thanks for the suggestion! – nebulopathy Sep 11 '15 at 21:22
  • Many years later, I'm running into a similar issue when using `Start-Process` with `-Wait` and `-Verb RunAs`. The details are spelled out well in this SO answer: https://stackoverflow.com/a/58721935/1876622 – HeyZiko Apr 05 '22 at 02:14

0 Answers0