Jump to content

Run bat file from remote location


Recommended Posts

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

  • Administrators

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

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...