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

Robocopy as another user.

I am trying to make an application or script to run robocopy as a server administrator in order to copy folder structures and keep the permissions intact.

I have tried various ways but with little to no success.

I have tried creating an application to start the program as a process, passing the username, password and domain, but this runs into an issue with multiple users not being able to run this application.  Robocopy just flashes for a moment and I cannot see the particular issue but it seems that it the username gets locked up to a single user.

I have tried just running the program with runas with the /netonly tags and it does seem to work, but in order to automate it i build an application to send the keystrokes to the console the issue arose that if the focus is shifted to another application it just sends the keystrokes to whatever is open.

A coworker suggested using windows script host but before i delve into that I guess I would like to ask if there is any way to get this running by any other means I have over looked.

to recap i need a program, process, script or whatever to copy a folder structure on a server to another location on the same server and preserve the permissions.
0
mjelec
Asked:
mjelec
  • 2
  • 2
1 Solution
 
stavros41Commented:
Just run it from Task Scheduler, you can specify the user to run as.
0
 
mjelecAuthor Commented:
Could that be used to to add variable arguments?  For instance i need this to be run on demand and copy the template folders to a specified path.
0
 
stavros41Commented:
I know you can do this with Windows 2008 yes, there is an add agruments box
0
 
mjelecAuthor Commented:
How would one do a variable in the arguments box?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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