computing
  • 5

I Want The Java Code That Executes .Bat File Remotely

  • 5

.bat file not executed remotely using java
here iam using the code like the following
Process process=Runtime.getRuntime().exec(“/cmd /c start \\\\<Host_Name>\\<Shared_Folder_name>\\BatFileName.bat”);
Instead of executing the remote computers shared folders .bat file it is executing my local computers .bat file any help please

Share

1 Answer

  1. An alternative is to spawn an instance of psexec or wmic to create a process on the remote machine via Java.

    Tony

    • 0