Jump to content

Run bat file from remote location

Recommended Posts


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


(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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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