0
我已經執行了批處理文件從命令提示符與winrs命令它執行得很好,當我執行相同的命令與java程序使用進程生成器,我越來越像指定的路徑IOException不可用 錯誤2指定的路徑未被availble的REG - 從java本地機器運行遠程批處理文件
java.io.IOException: Cannot run program "cmd /c C:\Windows\System32\winrs.exe -r:http://ipaddress:port -u:username -p:password dir": CreateProcess error=2, The system cannot find the file specifiedProgram terminated!
at java.lang.ProcessBuilder.start(Unknown Source)
at com.sample.CmdExec.main(CmdExec.java:28)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 2 more