java - I want to run a batch file present on my remote computer -


i want run batch file present on remote computer getting error don't have permission access share.

errorcode--: 0x80070035 network path not found

please 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 incorrect, contains drive letter.

\\\\xx.xx.xx.xx\\d:\... 

instead, folder must shared name

\\\\xx.xx.xx.xx\\drived\... 

to use it, must map network drive before, e.g. via

net use * \\\\xx.xx.xx.xx\\drived <password> /user:<username> 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -