Yiannis Pliatsikas 0 Posted March 1, 2022 Share Posted March 1, 2022 Hello I'm trying to run a bat file from a remote location but it fails, even if it shows complete. When I run the bat file from a local location (ex windows/temp) it works fine. Is there a way to copy the file from the remote location to the local one, as all my efforts have failed (bat file with copy command, direct copy command ...) Thank you in advance Yiannis Pliatsikas Link to comment Share on other sites More sharing options...
Administrators Marcos 4,935 Posted March 1, 2022 Administrators Share Posted March 1, 2022 The "Run command" task is run in the local system account which doesn't have permissions to remote network shares. Link to comment Share on other sites More sharing options...
Yiannis Pliatsikas 0 Posted March 1, 2022 Author Share Posted March 1, 2022 Thank you. Any workaround in order to copy the bat file or even download it to windows/temp? Thank you in advance Yiannis Pliatsikas Link to comment Share on other sites More sharing options...
Yiannis Pliatsikas 0 Posted March 1, 2022 Author Share Posted March 1, 2022 Found a workaround https://superuser.com/questions/25538/how-to-download-files-from-command-line-in-windows-like-wget-or-curl (new-object System.Net.WebClient).DownloadFile('hxxp://x.y.z/a.pdf','C:\windows\temp\file.pdf') Did the trick to download the file locally. Now have to find a way to upload it again somewhere . Any Ideas? Thank you Link to comment Share on other sites More sharing options...
Recommended Posts