I want to run a batch file present on my remote computer but I am getting an error that you don't have permission to access the share.
errorcode--: 0x80070035 the network Path was not found
Please help me out
Thanks in advance
public class Remotly {
public static void main(String arr[]) {
String cmd;
try {
Process r = Runtime.getRuntime().exec("cmd /c start \\\\xx.xx.xx.xx\\D:\\batch\\sas.bat");
} catch (Exception e) {
System.out.println("Execution error");
}
}
}
The UNC path is incorrect, it contains a drive letter.
\\\\xx.xx.xx.xx\\D:\...
Instead, the folder must be shared by a name
\\\\xx.xx.xx.xx\\DriveD\...
To use it, you must map the network drive before, e.g. via
net use * \\\\xx.xx.xx.xx\\DriveD <Password> /User:<Username>
User contributions licensed under CC BY-SA 3.0