• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5213
  • Last Modified:

robocopy run as a specified user

I need to run a robocopy script as a certain user (\\computername\accountname) can I specify this somewehere within the script?

1 Solution
Miguel Angel Perez MuñozCommented:
On script no, but you can schedule a job with special credentials or run robocopy using runas: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/runas.mspx?mfr=true
i copied this from robocopy manual .

You can configure the Schedule service to log on as a user account. Once the user account has been granted appropriate access to source and destination servers, you can schedule Robocopy jobs to copy files between them.
To configure the Schedule service to log on as a user account
      1.      In Services in Control Panel, click Schedule, and then click Startup.
      2.      In the Startup Type box, click Automatic or Manual.
      3.      In the Log On As box, select the account in which to run the service, and specify the correct logon password.

another way that i am thinking of is to create a batch file , and create a service with the apropriate credentials to run it.
hope that helps

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now